Skip to content

Instantly share code, notes, and snippets.

@sytone
Created June 26, 2020 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sytone/59bd08ece312dbc0a71b5e15d2a95807 to your computer and use it in GitHub Desktop.
Save sytone/59bd08ece312dbc0a71b5e15d2a95807 to your computer and use it in GitHub Desktop.
$toolingRoot = "c:\idt"
$runLog = "$toolingRoot\run.log"
if(-not (Test-Path $toolingRoot)) {
New-Item -Path $toolingRoot -ItemType Directory -Force -ErrorAction SilentlyContinue
}
"Running as $($Env:USERNAME) at $(Get-Date)" | Set-Content -Path $runLog
function log($message) {
$message | Add-Content -Path $runLog
}
log "Machine: $($env:COMPUTERNAME)"
log "PSScriptRoot: $PSScriptRoot"
log "PSCommandPath: $PSCommandPath"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment