Last active
December 14, 2015 19:09
-
-
Save rpunt/5134886 to your computer and use it in GitHub Desktop.
Writes a log of the console output from a powershell script to $PWD. Very useful for unattended scripts.
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
$log=Join-Path (Get-ChildItem $MyInvocation.MyCommand.Definition).Directory (Get-ChildItem $MyInvocation.MyCommand.Definition).Basename | |
Start-Transcript "$log.log" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment