Appendix F. Basic Troubleshooting Tips

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

  • Remember, spelling counts. Always look for misspelled cmdlet names, property names, method calls, and so on. In Windows PowerShell, if you do not spell a property name correctly, when you try to run the script, it will not generate an error. When the following code is typed inside the shell, there is no output—nothing to indicate that you choose a bad property of the WIN32_Service WMI class.

    PS C:\> $wmi = Get-WmiObject -Class win32_service
    PS C:\> $wmi.badproperty
    PS C:\>
  • Do not break the pipeline. This one is particularly easy to do. For example, say you start off with a command ...

Get Windows PowerShell™ 3.0 Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.