What’s My PID?

Summary: Ed Wilson, Microsoft Scripting Guy, creates a function to capture the process ID of a Windows PowerShell host. Microsoft Scripting Guy, Ed Wilson, is here. One of the things I like to know is the process ID (PID) of specific processes. Often this is trivial. I can use the Get-Process cmdlet and, for example,…


Launch Elevated PowerShell Shell

Summary: Ed Wilson, Microsoft Scripting Guy, talks about launching an elevated Windows PowerShell shell. Microsoft Scripting Guy, Ed Wilson, is here. Today I had a great talk with Steve, the Scripting Manager. One of the things we talked about was the importance of community, and how the Windows PowerShell community seems to be really engaged…


Use Function to Determine Elevation of PowerShell Console

Summary: Ed Wilson, Microsoft Scripting Guy, talks about using a function to determine if a Windows PowerShell console is elevated. Microsoft Scripting Guy, Ed Wilson, is here. I had a friend tell me that nearly half of all the cmdlets, functions, and whatever’s in Windows PowerShell 4.0 on Windows Server 2012 R2 required elevation to Admin rights. I…


One of My Favorite PowerShell Functions

Summary: Ed Wilson, Microsoft Scripting Guy, discusses one of his favorite functions: Get-EnumValues. Microsoft Scripting Guy, Ed Wilson, is here. Today I am working on my presentation for Atlanta TechStravaganza 2015, which will happen on August 21. It will be a really cool event, and the Scripting Wife and I are looking forward to attending it….


Describe Your PowerShell Variables

Summary: Ed Wilson, Microsoft Scripting Guy, talks about adding a description to variables. Microsoft Scripting Guy, Ed Wilson, is here. There is a “water feature” outside that keeps running and running and running. It is a bit strange, and to be honest, it makes me think that it is raining all the time. In central…


Weekend Scripter: Back Up Your PowerShell Profile

Summary: Ed Wilson, Microsoft Scripting Guy, talks about automatically backing up your Windows PowerShell profile. Microsoft Scripting Guy, Ed Wilson, is here. My rule for making backups is that when the loss of the item would cause me grief, it is backed up. Otherwise, there is not too much need for a backup. This includes…


PowerTip: Launch PowerShell Without a Profile

Summary: Learn how to launch Windows PowerShell without using a profile.  I suspect my profile is causing issues with Windows PowerShell. How can I launch Windows PowerShell            without starting the profile?  Use the Run command to launch Windows PowerShell with the –noprofile switch: PowerShell -noprofile


Weekend Scripter: Replace One PowerShell Function with Another

Summary: Ed Wilson, Microsoft Scripting Guy, talks about replacing one Windows PowerShell function with a different one. Microsoft Scripting Guy, Ed Wilson, is here. One of the problems with writing Windows PowerShell code every day is that you eventually… No, it’s not what you think. I am often asked if I run out of ideas,…


Two Cool PowerShell Functions

Summary: Ed Wilson, Microsoft Scripting Guy, talks about a pair of cool Windows PowerShell functions to add to your profile. Microsoft Scripting Guy, Ed Wilson, is here. At times, it seems like a Windows PowerShell profile is like a filing cabinet. Whether you have good organizational skills or you organize in a more ad-hoc, random,…


Sorting PowerShell Transcript Files

Summary: Ed Wilson, Microsoft Scripting Guy, talks about creating a sortable transcript name. Microsoft Scripting Guy, Ed Wilson, is here. One of the great things about Windows PowerShell is that if there is something that annoys you, you can generally fix it. Don’t get me wrong, Windows PowerShell is great, but like any program, there…