blue code ERROR notification

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

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.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish