我收到这样的 Powershell 错误:
PS C:\mydirectory> $Error[0]
Get-WmiObject :
At line:143 char:13
+ $Disk = Get-WmiObject MSCluster_Disk -ComputerName $Resource.OwnerNode -Auth ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException
+ FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
有没有办法可以避免触发错误的命令(即$Disk = Get-WmiObject MSCluster_Disk ...
)在错误消息中被截断?