PowerShell - Backing Up System State
Provided system restore points are enabled on your machine and your script has admin privileges, PowerShell can easily create restore points and restore the system if anything went bad.
Research and Development
Provided system restore points are enabled on your machine and your script has admin privileges, PowerShell can easily create restore points and restore the system if anything went bad.
Here's a useful function that will tell you the current location the script is executed from.
Here's an one-liner that copies all commands from your command history to the clipboard.
Using System User or group names like Administrators in scripts may not always be a good idea because they are localized and may not work on machines that use a different UI language.
Here's a simple filter that will show only those files and folders that a specific user is owner of.
The Stop-Service cmdlet cannot stop services remotely. One easy way of doing so is via Set-Service.
The whoami.exe is a useful little tool that ships with Windows 7/Server 2008 R2, and it becomes even more useful when you instruct it to output its result in CSV format.
This will not hide drive letters but prohibit access to drive content. You need administrative privileges to set this setting.
Sometimes you may want to hide drive letters in Windows Explorer from users. There's a Registry key that can do this for you.
The main advantage of BITS is that it can copy things silently in the background, and it is resilient to interruptions such as reboots.