Powershell

WMI Search Tool

All PowerShell Versions WMI is a great and powerful technique: simply specify a WMI class name, and back you get all the instances of that class:...

read more

List All Information

All PowerShell Versions Most of the time, PowerShell will not show you the complete results that you get from cmdlets. Instead, PowerShell limits...

read more

Getting US ZIP Codes

All PowerShell Versions Ever wanted to find out the ZIP code of a city, or vice versa find out the city that belongs to a ZIP code? Then simply ask...

read more

Finding Files plus Errors

All PowerShell Versions When you use Get-ChildItem to recursively search directory paths for files, you may stumble across subfolders where you do...

read more

Renaming Variables

PowerShell ISE 3 and later Here is a simple variable renaming function that you can use in the built-in ISE editor that ships with PowerShell 3 and...

read more

Normalizing Line Endings

All PowerShell Versions When you download files from the Internet, you may run into situations where the file won’t open correctly in editors....

read more

Getting MAC Addresses

All PowerShell Versions Getting the MAC of a network adapter is rather simple in PowerShell. Here is one of many ways: PS> getmac /FO CSV |...

read more

Advanced Text Splitting

All PowerShell Versions When you use the –split operator to split text, then the split text is consumed: PS> 'Hello, this is a text,...

read more

Text Splitting

All PowerShell Versions With the –split operator, you can split text at given locations. The operator expects a regular expression, so if you...

read more

Creating TinyURLs

All PowerShell Versions You probably have heard about shortening long URLs. There are plenty of free services available. Here is a script that turns...

read more

Waiting for a Keystroke

All PowerShell versions, PowerShell Console only To keep the PowerShell console open when a script is done, you may want to add a “Press Any...

read more

Finding Errors in Scripts

All PowerShell Versions It’s never been easier to find scripts with syntax errors in them. Just use this filter: filter Test-SyntaxError {...

read more

Discarding Results

All PowerShell Versions Since PowerShell returns anything that commands leave behind, it is particularly important in PowerShell scripts to discard...

read more
1 70 71 72 73 74 130