You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
. : The term '.\source\ressources\prerequirements_AsAdmin.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the
name, or if a path was included, verify that the path is correct and try again.
At C:\Code\Intune-Win32-Deployer\INSTALL_Intune-Win32-Deployer.ps1:142 char:11
+ . ".\source\ressources\prerequirements_AsAdmin.ps1" -choco $( ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (.\source\ressou...nts_AsAdmin.ps1:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
To fix this issue please consider adding the following code block the to the beginning of your script
#startregion
##Variables: Exit Code
[Int32]$mainExitCode = 0
##Variables: Environment
If (Test-Path -LiteralPath 'variable:HostInvocation') {
$InvocationInfo = $HostInvocation
}
Else {
$InvocationInfo = $MyInvocation
}
[String]$scriptDirectory = Split-Path -Path $InvocationInfo.MyCommand.Definition -Parent
## Dot source the required App Deploy Toolkit Functions
Try {
[String]$IntuneWin32DeployerMain = "$scriptDirectory\source\ressources\prerequirements_AsAdmin.ps1"
If (-not (Test-Path -LiteralPath $IntuneWin32DeployerMain -PathType 'Leaf')) {
Throw "Module does not exist at the specified location [$IntuneWin32DeployerMain]."
}
Else {
. $IntuneWin32DeployerMain
}
}
Catch {
If ($mainExitCode -eq 0) {
[Int32]$mainExitCode = 60008
}
Write-Error -Message "Module [$IntuneWin32DeployerMain] failed to load: `n$($_.Exception.Message)`n `n$($_.InvocationInfo.PositionMessage)" -ErrorAction 'Continue'
## Exit the script, returning the exit code to SCCM
If (Test-Path -LiteralPath 'variable:HostInvocation') {
$script:ExitCode = $mainExitCode; Exit
}
Else {
Exit $mainExitCode
}
}
#endregion
To fix this issue please consider adding the following code block the to the beginning of your script
then update the following line
. ".\source\ressources\prerequirements_AsAdmin.ps1" -choco $(if($install_choco -eq "y"){$true}else{$false}) -winget $(if($install_winget -eq "y"){$true}else{$false})
to
. "$IntuneWin32DeployerMain" -choco $(if($install_choco -eq "y"){$true}else{$false}) -winget $(if($install_winget -eq "y"){$true}else{$false})
The text was updated successfully, but these errors were encountered: