PowerShell - Checking User Privileges
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.
Research and Development
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.
If your computer is logged on to an Active Directory, here is some code to get to your domain controllers.
In traditional batch files, you can use && to execute a second command only if the first one worked. In PowerShell, the same can be achieved by using the try/catch construct.
Parsing a date and/or time information is tricky because formatting depends on the regional settings. This is why PowerShell can convert date and time based on your regional settings or in a culture-neutral format.
Compare-Object is one of the most widely ignored most powerful cmdlet around. It can compare results and figure out differences.
Here is a powershell function that creates a local folder and also shares it so others can use it via network.
Here's a small function that first checks to see that the URL you are mapping to does not yet exist, avoiding duplicate mapped drives.