In a previous tip we illustrated the double hop problem that can occur in remoting when your remote code tries to authenticate against a third...
powertips
Understanding the Double-Hop Problem in Remoting
Whenever you execute PowerShell code remotely with Invoke-Command, your credentials are locked to the machine you initially contacted. PowerShell...
Finding Hidden Autostart Programs
Ever wondered why some programs launch whenever you log into Windows? Here’s a one liner listing autostarts that affect your login: #requires...
Getting List of Current Group Memberships
While you can contact the Active Directory to retrieve a list of group memberships for a user, a much easier way gets that information directly from...
Translating SID to Username
Ever wanted to translate a security identifier (SID) to the real name? Here is a function helping you: #requires -Version 3.0 function...
Get GeoLocation of Computer
Here is yet another free source of geolocation information, exposing your current public IP and location information: #requires -Version 3.0...
Finding Operating System Architecture Information
Here is a one-liner that retrieves information about your operating system: Get-WmiObject -Class Win32_OperatingSystem | Select-Object -Property...
Finding Operating System Versions in Active Directory
If you have installed the free Microsoft RSAT tools with the “ActiveDirectory” PowerShell module, here is a quick way to get a list of...
Finding First and Last Day in Month
Did you ever need the first and last day in a given month? Here is a simple approach: # specify the date you want to examine # default is today...
Geolocating Your IP on a Map
As you have seen in previous tips, the Internet knows your IP address, and also where you are located. You can get the latitude and longitude of...
Finding Public IP Address
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:...
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...