database-tools

Creating sudo for PowerShell (Part 1)

In Linux shells, there’s a command called “sudo” that lets you run a command with elevated privileges. In PowerShell, you’d have to open a...

Code-Signing PowerShell Scripts (Part 3)

In the previous parts, we created a code signing certificate and used it to add a digital signature to a PowerShell script file. Yet what good can a...

Code-Signing PowerShell Scripts (Part 2)

In our previous tip we explained how you can use New-SelfSignedCert to create a self-signed code signing certificate. Today, we’ll use a self-signed...

Professional Error Handling

Often PowerShell scripts use a very simple form of error reporting that is structured like this: # clearing global error list: $error.Clear() #...

Cleaning Hard Drive (Part 2)

In the previous post we introduced the Windows tool cleanmgr and its parameters /sageset and /sagerun that you can use to define and run automated...

Cleaning Hard Drive (Part 1)

Part of Windows is an ancient tool that can clean your hard drive: cleanmgr.exe. This tool can remove a variety of data garbage and at times removes...

Managing Bluetooth Devices (Part 3)

If you’d like to programmatically unpair a paired Bluetooth device, then there is no built-in cmdlet available. Still PowerShell can do the trick,...

Managing Bluetooth Devices (Part 3)

If you’d like to programmatically unpair a paired Bluetooth device, then there is no built-in cmdlet available. Still PowerShell can do the trick,...

Managing Bluetooth Devices (Part 3)

If you’d like to programmatically unpair a paired Bluetooth device, then there is no built-in cmdlet available. Still PowerShell can do the trick,...

Leveraging WMI (Part 3)

The new Get-CimInstance cmdlet lets you query WMI locally, and there is (limited) support for remote queries: you can specify the -ComputerName...

Managing Bluetooth Devices (Part 1)

Identifying Bluetooth devices that your computer has connected to is as easy as a one-liner: PS> Get-PnpDevice -Class Bluetooth Status Class...

Make SQL Server performance easy

Every database administrator hates to wake up at midnight just to learn there is an emergency with their database. Sometimes, even though their...

Leveraging WMI (Part 5)

WMI classes are organized in so-called namespaces that start at “root” and work like a directory structure. The default namespace is rootcimv2, and...

Cut SQL Server licensing costs

SQL Server resellers often send true-up forms to their customers more frequently than Microsoft requires. Some customers receive them every month....

Leveraging WMI (Part 4)

The secret to successfully leveraging WMI is knowing the class names that represent what you are after. In the previous tip we explained how to use...

1 8 9 10 11 12 159