Created
February 3, 2016 18:58
-
-
Save ploegert/1e7477793c2d0d8a2bf5 to your computer and use it in GitHub Desktop.
write log for powershell
This file contains hidden or 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
| function Write-Log | |
| { | |
| param([Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true)][AllowEmptyString()][string]$Message) | |
| Write-Verbose -Verbose ("[{0:s}] {1}`r`n" -f (get-date), $Message) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment