Would you like to know what your public IP address is that you are currently using while being connected to the Internet? It’s a one-liner:...
Powershell
Finding Location of IP Address
Most IP addresses can be located using web services. Here is a very simple function that takes an IP address and returns information about its...
Finding IP Address Assigned by DHCP
Beginning with Windows 8 and Server 2012, operating systems ship with extensive PowerShell modules to manage server and client. They provide cmdlets...
Enum Week: Enums in PowerShell 5
Requires PowerShell 5 or better This week we are looking at enumerations: what they are, and how you can benefit from them. Beginning in PowerShell...
Enum Week: Suppressing Cmdlet Errors – Fast
This week we are looking at enumerations: what they are, and how you can benefit from them. In the previous tips, we looked at enumerations, and...
Enum Week: Understanding Enumeration Values
This week we are looking at enumerations: what they are, and how you can benefit from them. In the previous tips, we explored how enumerations work....
Enum Week: Listing Enumeration Values
This week we are looking at enumerations: what they are, and how you can benefit from them. In the previous tip we explained how PowerShell converts...
Enum Week: Auto-Conversion for Enums
This week we are looking at enumerations: what they are, and how you can benefit from them. When a cmdlet or method requires an enumeration value,...
Working with UTC Times
When working across language boundaries, you might want to use a way to “normalize” date and time, for example for logging. Instead of...
Displaying Message Boxes
PowerShell can access all public .NET classes, so it is (fairly) easy to create a message box: $result = [System.Windows.MessageBox]::Show('Do...
Using a Stopwatch to Profile Scripts
Ever wanted to find out how long a particular command or portion of your script took to complete? Here is a simple Stopwatch object that can help...
Color Week: Using Token Colors in the PowerShell Console
PowerShell 3 or better This week we are looking at how you can change coloring both in the PowerShell console and PowerShell ISE so you can fine...
Color Week: Changing Error Message Colors in the PowerShell ISE
This week we are looking at how you can change coloring both in the PowerShell console and PowerShell ISE so you can fine tune your PowerShell...
Color Week: Changing Error Message Colors
This week we are looking at how you can change coloring both in the PowerShell console and PowerShell ISE so you can fine tune your PowerShell...
Color Week: Using Transparency in the PowerShell ISE Console
This week we are looking at how you can change coloring both in the PowerShell console and PowerShell ISE so you can fine tune your PowerShell...
Color Week: Setting PowerShell ISE Background Color
This week we are looking at how you can change coloring both in the PowerShell console and PowerShell ISE so you can fine tune your PowerShell...
Color Week: Using Clear Names for PowerShell ISE Colors
This week we are looking at how you can change coloring both in the PowerShell console and PowerShell ISE so you can fine tune your PowerShell...
Color Week: Setting PowerShell ISE Console Colors
PowerShell 3+ This week we are looking at how you can change coloring both in the PowerShell console and PowerShell ISE so you can fine tune your...
Saving PowerShell User Defaults
We are about to enter “Color Week” with plenty of tips how you can choose better colors for the PowerShell ISE editor and the console....
Finding ASCII Codes
Here is an easy way to find the ASCII code for any character you may have scraped from a website, or found in a script that you copied from the...
Checking Hard Drive Size (Local and Remote)
WMI can provide the raw data about hard drive size and free space. PowerShell then takes that information and provides user-friendly results like...
Enabling Remote Administration
PowerShell 2+ Many older DCOM-based commands require a “Remote Administration Firewall Exception” to access remote systems. This...
Finding Auto Starts
PowerShell 3+ If you’d like to know which programs start automatically on your machine, WMI may help: PS C:\> Get-CimInstance -ClassName...
Replacing CSV File Headers
PowerShell 2+ When you read in CSV data and would like to rename the CSV headers, here is a simple approach: just read in the text line by line, and...