database-tools

Using Closures

Script blocks are dynamic by default, so variables in a script block will be evaluated each time the script block runs. By turning a script block in...

Discovering Useful Console Commands

There are plenty of useful console commands such as ipconfig, whoami, and systeminfo. Most of these commands hide inside the Windows folder....

Check Windows License Status

In a previous tip we explained how you can use slmgr, a built-in VBScript, to check Windows licensing state. The core information used by this...

Calling Native Commands Safely

Sometimes it isn't easy to call a command-line tool with some arguments. The PowerShell parser may interfere, and your call may even return...

Manage Windows License Keys

To automatically manage Windows license keys, use slmgr which is a VBScript that you can call from PowerShell. Just make sure that cscript.exe is...

Unzipping Files

Unfortunately, there is no built-in cmdlet to unzip files. There are plenty of 3rd party tools, many of which are free. If you cannot use these...

Downloading Files from Internet

PowerShell v3 comes with a hugely useful new cmdlet called Invoke-WebRequest. You can use it to interact with websites which also includes...

BUMMER

USE mysql; SHOW FULL TABLES WHERE table_type = 'base table'; /* returns ... innodb_index_stats BASE TABLE innodb_table_stats BASE TABLE ......

Renaming Object Columns

In some of our previous tips, we showed how you can turn comma-separated data returned from different console tools into rich PowerShell objects....

Deleting Certificates

If you want to permanently delete a digital certificate in your certificate store, here is how. This line lists all your personal certificates:...

Normalizing Localized Data

Many console-based tools like driverquery, whoami, or tasklist provide useful information but the column names are localized and may differ,...

Finding Process Owners and Sessions

Get-Process returns a lot of information about running tasks but it does not return the process owners or the session a process is logged on to....

Powershell

Hi there, I have created a simple powershell script which I know works on my local machine running Windows 7 64bit. I have an evaluation copy of...

Exploring Group Membership

To find out the groups your account belongs to, there is a command line tool called whoami. This tool supports options to output the information as...

Installing PowerShell v3 Help

PowerShell v3 comes without help files. To get help, you need to download the help files first. In an elevated PowerShell console, use this command:...

Clean Your Temp Folder with PowerShell

When disk space gets low, you may want to clean up your temporary folder. The code deletes all files that are older than 30 days to make sure...

Office365 Cmdlets with PowerShell

Office365 comes with a complete set of PowerShell cmdlets. To review the cmdlets and what you can do with them, visit this URL:...