下面这个函数段里的(!$?) 指的是什么呢?怎么理解?
# Copy the exe file to the public’s desktop
If(Test-Path “$dirFiles\test.exe”) {
Copy-Item -Path “$dirFiles\test.exe” -Destination “$envCommonDesktop” -force -ErrorAction SilentlyContinue
If (!$?) {
$ErrorMessage = $error[0].Exception.Message
ExitOnError -ExitErrorCode 69016 -ErrorLogDetailedMessage “$ErrorMessage” -WriteToLog $true
} Else {
WriteToLog -message “$dirFiles\test.exe was copied successfully to $envCommonDesktop” -task $pendingtask -severity “info”
}