Created
October 3, 2015 11:19
-
-
Save deangrant/9818c2ef6eec999fc680 to your computer and use it in GitHub Desktop.
Switch condition snippet from Write-Log function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Switch ($Level) | |
{ | |
'Info' {$Event = ("" + (Get-Date -Format s) + ": INFORMATION: " + $Message + ".")} | |
'Warning' {$Event = ("" + (Get-Date -Format s) + ": WARNING: " + $Message + ".")} | |
'Error' {$Event = ("" + (Get-Date -Format s) + ": ERROR: " + $Message + ".")} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment