Skip to content

Instantly share code, notes, and snippets.

@taisyo7333
Created August 28, 2015 03:50
Show Gist options
  • Save taisyo7333/10420317266fee6e3365 to your computer and use it in GitHub Desktop.
Save taisyo7333/10420317266fee6e3365 to your computer and use it in GitHub Desktop.
powershell : tee error
function Write-ErrorLog {
param( $file_name , $message )
Write-Error $message 2>&1 | Tee-Object -FilePath $file_name -Append
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment