Ignoring an errorlevel != 0 in Windows PowerShell (ISE)
I have read this link but not sure how to run "Invoke-Command" my $ErrorActionPreference is "continue".
This is the error I am getting :
06:06:55 + & powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command '& ''E: ... 06:06:55 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 06:06:55 + CategoryInfo : NotSpecified: (root : 2020-10-...something:String) [], RemoteException 06:06:55 + FullyQualifiedErrorId : NativeCommandError
$errorActionPreference
应该在$errorActionPreference
中定义,如:
Invoke-Command {$ErrorActionPreference = 'SilentlyContinue'; REST OF THE CODE}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.