Skip to content

Instantly share code, notes, and snippets.

@toenuff
Created November 18, 2013 22:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toenuff/7536659 to your computer and use it in GitHub Desktop.
Save toenuff/7536659 to your computer and use it in GitHub Desktop.
Write-Trace - Write a trace message with PowerShell
function Write-Trace {
param(
[Parameter(Mandatory=$true, Position=0, ValueFromRemainingArguments=$true)]
[string]$message,
[Parameter(Mandatory=$false)]
[string]$category="PS Script"
)
[System.Diagnostics.Debug]::WriteLine($message, $category)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment