fixed the issue. Will look into that further Even though the arguments to Workbook.Close() are all optional, all the examples on MSDN provide at least one (the SaveChanges argument), leading me to believe that PowerShell does not recognize the method signature when you don't provide any arguments. You might have better luck with:
Method invocation failed because [System.String] does not contain a method named 'SelectNodes'
hope this fix your issue I cannot find official documentation to support this but the answer comes from a related question. The error is correct. You are treating a string like xml. You need to explicitly cast that string to xml first, if it is indeed an xml formatted string.
I wish this helpful for you Suddenly this code ain't working anymore. I'm trying to google this but I can't seem to find any solution how to fix this. , Before getting your XML content, try adding this:
Hope this helps Although you don't make it clear where/how $services is defined, it seems that it is simply a list of service names (i.e. system.string as the error states). To use the WaitForStatus() method, you'll need an actual service object (i.e. System.ServiceProcess.ServiceController). Something like this should work better: