O'Reilly logo

Windows PowerShell™ Scripting Guide by Ed Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix E. General Troubleshooting Tips

This appendix contains a collection of general troubleshooting tips. They are not necessarily in any particular order of importance.

Remember that spelling counts. Always look for misspelled cmdlet names, property names, method calls, and so on. One feature of Windows PowerShell is that if you do not spell a property name correctly, when you try to run the script, it doesn't generate an error. In the code below, note that there is no output typed inside the shell—no error, nothing to indicate that you chose a bad property of the Win32_Service WMI class.

PS C:\> $wmi = Get-WmiObject -Class win32_service
PS C:\> $wmi.badproperty
PS C:\>

Don't break the pipeline. This one is particularly easy to do. Start with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required