Q. Will a PowerShell cmdlet "keep going" after an error?

Yes, some cmdlets can produce non-terminating errors. An example is Get-WmiObject, which will produce one if it can't connect to a computer you've specified.

Don Jones

August 25, 2010

1 Min Read
blue code ERROR notification

Q. Will a PowerShell cmdlet "keep going" after an error?

A. Some cmdlets can produce non-terminating errors. An example is Get-WmiObject, which will produce one if it can't connect to a computer you've specified. If you specified multiple computers, however, the cmdlet will keep trying the rest of them—it won't just break down and stop. The exact behavior depends on the error itself and the cmdlet you're running.

 

Do you have a Windows PowerShell question? Find more PowerShell FAQs, articles, and other resources at windowsitpro.com/go/DonJonesPowerShell.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like