Select Page

I needed a way to track which scripts had been run on machines that were being rebooted between script initiation.

Rather than using more complex methods, I decided that I could just dump a text file onto the desktop so that after the reboot, once logged in I could be reminded of which script ran most recently.

It’s a nice one-liner:

Out-File $env:USERPROFILEdesktop$(($MyInvocation)’completed successfully’.txt


more to follow…