1
我有一個PowerShell腳本是不斷拋出此錯誤測試,以檢查是否cmdlet用於支持
Get-ComputerRestorePoint : This functionality is not supported on this operating system.
At line:1 char:25
+ Get-ComputerRestorePoint <<<<
+ CategoryInfo : InvalidOperation: (:) [Get-ComputerRestorePoint], ArgumentException
+ FullyQualifiedErrorId : GetComputerRestorePointNotSupported,Microsoft.PowerShell.Commands.GetComputerRestorePoin
tCommand
有一個簡單的方法來測試,看看如果cmdlet運行之前支持?我知道我可以在cmdlet周圍試試,但與簡單檢查相比,這種方法看起來相當昂貴。
感謝