database-tools

Who am I?

If you'd like to know your current user account, of course you can query environment variables like this: PS> $env:userdomain PS>...

read more

Finding Domain Controllers

If your computer is logged on to an Active Directory, here is some code to get to your domain controllers. Note that this will raise errors if you...

read more

Formatting XML Files

Here's a cool little XML formatting tool. It takes the path to any XML file and allows you to specify an indent. Then, it saves the file as new...

read more

Parsing Date and Time

Parsing a date and/or time information is tricky because formatting depends on the regional settings. This is why PowerShell can convert date and...

read more

Map Network Drive

Sure you can use the command net use to map a network drive. But this would not check for existing mapped drives. Here's a small function that...

read more

Getting Windows Product Key

Ever wanted to read out the Windows license key? In the Windows Registry, this key is present, but it is stored as a digital ID. To convert it back...

read more

Mapping Printers Part 2

In a previous tip we explained how you can install and map printers remotely using a low level command: rundll32 printui.dll,PrintUIEntry /in /n...

read more

Sharing Folders

Console commands are first class PowerShell citizens, so sometimes it may be easier to use classic console commands to solve a problem. Here is a...

read more