Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 2.0 » Set-PSDebug

Set-PSDebug - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.

Set-PSDebug


Short description
Turns script debugging features on and off, sets the trace level, and toggles strict mode.

Syntax
Set-PSDebug [-Off] [<CommonParameters>]

Set-PSDebug [-Step] [-Strict] [-Trace <int>] [<CommonParameters>]

Description
The Set-PSDebug cmdlet turns script debugging features on and off, sets the trace level, and toggles strict mode. 

When the Trace parameter is set to 1, each line of script is traced as it is executed. When the parameter is set to
 2, variable assignments, function calls, and script calls are also traced. If the Step parameter is specified, you
 are prompted before each line of the script is executed.