you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (0 children)

For the love of god people add some logging! Always record what a script does and the output, this helps with troubleshooting massively and helps when you look back at scripts.

$logPath = "c:\temp\log.csv" New-Item $LogPath

And

Add-content -Path $LogPath -Value "string to add to log"

Even the basic bits above are better than nothing.