不支援的 PowerShell 命令
Security Controls 指令碼引擎在 PowerShell 命令視窗或在 PowerShell_ISE 應用程式中執行指令碼時會有些許不同。 每個 PowerShell 應用程式都是一種不同的「主機」環境且支援不同的主機選項。 Security Controls 指令碼引擎目前並不會實作下列主機命令。嘗試在您的指令碼中使用這些命令時將會發生錯誤。
- Out-Host
- Read-Host
- Write-Host
- Out-GridView
使用 Out-Default、Out-String 或 Write-Output 來取代 Out-Host 和 Write-Host。 由於 Security Controls 指令碼會在背景服務中執行,因此不支援互動式指令碼。 此外也不會替換 Read-Host 或 Out-GridView。