powertips

WMI Quick Primer (Part 4)

Typically, WMI objects contain properties with valuable information. This line would retrieve all information about all running Notepad instances...

WMI Quick Primer (Part 3)

In the previous tip we explained why Get-CimInstance may have advantages over the older Get-WmiObject cmdlet. Now here is another example that...

WMI Quick Primer (Part 2)

There are two cmdlets you can use to retrieve WMI data: the older Get-WmiObject cmdlet, and the more modern Get-CimInstance cmdlet. When used...

WMI Quick Primer (Part 1)

WMI is an awesome information source for admins. All you need is the name of a WMI class that represents something you find interesting. The easiest...

Listing Properties with Values (Part 2)

In the previous tip we introduced a new function called Remove-EmptyProperty that removes properties that have no value. Let’s expand it a bit so...

Enabling Remoting

There are many ways how cmdlets can get remote information from another computer. Here are just a few: # try and connect to this computer # (adjust...

Converting Error Records

Whenever PowerShell raises an error, an error record is written to $error which is an array storing the last errors that occurred. You can try and...

Creating Hexadecimal Values

Here are a couple of ways to convert decimal to hexadecimal notation: $value = 255 [Convert]::ToString($value, 16) '{0:x}' -f $value...

Installing PowerShell 6 with Chocolatey

In the previous tips, we explained how you can download and install Chocolatey, a free Windows package manager that can install software for you....

Using Chocolatey with PowerShell

Chocolatey is a free package manager for Windows that can be used to download and install software. Before you can use Chocolatey from PowerShell,...

Examining Digital Signature Signers

When you download a script from the internet, it may contain a digital signature that can help you find out where the script comes from. We looked...

Trusting Downloaded Scripts

Scripts downloaded via Internet have a great potential of being infected with malware, or originate from illegitimate sources. Digital signatures...

The Best Ways to Download Script Files

Occasionally, PowerShell scripts are made available via direct download. Let’s find the most efficient way to download text-based files via...

Colorizing Cmdlet Output

Starting in PowerShell 5.1, the PowerShell console supports VT escape sequences that can be used to position and format console text. Note that this...

Using Colors in PowerShell Console

Starting in PowerShell 5.1, the PowerShell console supports VT escape sequences that can be used to position and format console text. Note that this...

1 20 21 22 23 24 98