Computer Library windows 2008 exchange server power shell security register

Configure Debug, Verbose, and Progress Output

1. Problem
You want to manage the detailed debug, verbose, and progress output generated by cmdlets and scripts.
2. Solution
To enable debug output for scripts and cmdlets that generate it:
       
        $debugPreference = “Continue”
        Start-DebugCommand

To enable verbose mode for a cmdlet that checks for the -Verbose parameter:
        Copy-Item c:\temp\*.txt c:\temp\backup\ -Verbose

To disable progress output from a script [...]


Manage the Error Output of Commands

1. Problem
You want to display detailed information about errors that come from commands.
2. Solution
To list all errors (up to $MaximumErrorCount) that have occurred in this session, access the $error array:
        $error

To list the last error that occurred in this session, access the first element in the $error array:
        $error[0]

To list detailed information about an [...]