Last active
August 28, 2016 15:15
-
-
Save rafalf/75aab3690d80d70be930 to your computer and use it in GitHub Desktop.
Logger 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
# | |
# powershell logger function | |
# | |
function log ([string]$logdata) | |
{ | |
$date = get-date | |
Write-Output "$date - $logdata" | Out-File $log -width 240 -Append | |
} | |
log "Script started" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment