I have a null-valued expression error on this code that involves
microsofts dsf com objects but to my knowledge usually this means
i have a null variable somewhere:
You cannot call a method on a null-valued expression. At C:\Powershell\VMStartStop.ps1:31 char:35 + $result = $vmshut.InitiateShutdown <<<< ("$true","no comment") + CategoryInfo : InvalidOperation: (InitiateShutdown:String) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull unable to shutdown TEST_VM
microsofts dsf com objects but to my knowledge usually this means
i have a null variable somewhere:
You cannot call a method on a null-valued expression. At C:\Powershell\VMStartStop.ps1:31 char:35 + $result = $vmshut.InitiateShutdown <<<< ("$true","no comment") + CategoryInfo : InvalidOperation: (InitiateShutdown:String) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull unable to shutdown TEST_VM