Browse by Tags

Tagged Content List
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: PowerTip: Read File with Backtick in Name

    Summary : Read the content of a text file with a backtick ( ` ) in the name. How can I use Windows PowerShell to read the content of a file that has a backtick ( ` ) in the file name? Use single quotation marks around the name when you supply the path to Get-Content , for example: Get-Content...
  • Blog Post: 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...
  • Blog Post: PowerTip: Find PowerShell Variables Defined for AllScope

    Summary : Find Windows PowerShell variables that are defined for all scopes. How can I find what variables are defined as AllScope in my Windows PowerShell environment? Get a list of all your variables, and filter for options that include AllScope , for example: (dir variable:).where({$_.options...
  • Blog Post: 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....
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: I Have a PowerShell Profile—Now What?

    Summary : Ed Wilson, Microsoft Scripting Guy, talks about the what to add into a Windows PowerShell profile. Microsoft Scripting Guy, Ed Wilson, is here. It was a beautiful sunny weekend in central Florida. The Scripting Wife and I headed to Tampa, where we met up with various Windows PowerShell peeps...
  • Blog Post: Weekend Scripter: The Big Decision about Scripts

    Summary : Ed Wilson, Microsoft Scripting Guy, talks about if you should write Windows PowerShell scripts or do something else. Microsoft Scripting Guy, Ed Wilson, is here. It is the weekend, and once again, it is a beautiful sunny morning in central Florida. I am sitting outside with my Windows Surface...
  • Blog Post: Understanding PowerShell Modules

    Summary : Ed Wilson, Microsoft Scripting Guy, talks about Windows PowerShell modules. Hey, Scripting Guy! I keep hearing about Windows PowerShell modules, but I do not know what they really mean. Is it something that comes with Windows PowerShell, or is it something I have to buy or download? I don’t...
  • Blog Post: Understanding Advanced Functions in PowerShell

    Summary : Ed Wilson, Microsoft Scripting Guy, talks about Windows PowerShell advanced functions. Hey, Scripting Guy! I keep hearing about advanced functions, but to be honest, I am not really sure what they are talking about. I mean, I can do a function, but when does it become advanced? Only when...
  • Blog Post: Fun with PowerShell Functions

    Summary : Ed Wilson, Microsoft Scripting Guy, talks about basic design considerations for Windows PowerShell functions. Hey, Scripting Guy! I keep hearing about functions, but I really do not know what they are, how to create one, or even how to use one. Can you help me with this? I am not a programmer...
  • Blog Post: A PowerShell Script Is…

    Summary : Ed Wilson, Microsoft Scripting Guy, talks about creating and using a Windows PowerShell script. Microsoft Scripting Guy, Ed Wilson, is here. This afternoon, it is raining—actually more like a thunderstorm because there is lightning and thunder. In the afternoon in central Florida,...
  • Blog Post: PowerShell Scripting: The Terms

    Summary : Ed Wilson, Microsoft Scripting Guy, talks about Windows PowerShell scripting terminology. Hey, Scripting Guy! So I am confused, and I am not afraid to admit that I am confused. In the old fashioned VBScript days, I wrote scripts. I could also write subroutines or functions. And that was...
  • Blog Post: Weekend Scripter: When to Write a PowerShell Script

    Summary : Ed Wilson, Microsoft Scripting Guy, talks about when to write a Windows PowerShell script. Microsoft Scripting Guy, Ed Wilson, is here. I am enjoying a beautiful sunny morning in central Florida. The sun is shining, there is hardly a cloud in the sky, and a gentle ocean breeze tickles my...
  • Blog Post: PowerTip: Determine What Character a String Starts With

    Summary : Use Windows PowerShell to determine what character a string starts with. How can I use Windows PowerShell to show me if a string starts with a particular letter (this also needs to be case sensitive)? Use the StartsWith method from the String class, and supply the character to the method...
  • Blog Post: Weekend Scripter: Welcome to the PowerShell Information Stream

    Summary : Learn about the Windows PowerShell information stream in this guest post by June Blender. Microsoft Scripting Guy, Ed Wilson, is here. Today we have another guest blog post by Honorary Scripting Guy, Windows PowerShell MVP, and Sapien technical evangelist, June Blender. Take it away June...
  • Blog Post: PowerTip: Multiply Value in Variable and Store Results

    Summary : Use Windows PowerShell to multiply the value stored in a variable and store the results. How can I use Windows PowerShell to multiply the value of a variable and store the results in the same variable? Use the *= operator, for example: PS C:\> $a = 2 PS C:\> $a *= 3 PS...
  • Blog Post: Weekend Scripter: Fun with Number Ranges and PowerShell

    Summary : Use Windows PowerShell to split arrays of numbers into contiguous ranges. Microsoft Scripting Guy, Ed Wilson, is here. Today I have a cool post from guest blogger, Zachary Loeber. Here is a little bit about Zachary: Zachary Loeber is a solution architect with PSC Group. Zachary is...
  • Blog Post: PowerTip: Select Two Random Numbers from 20 Possibilities

    Summary : Use Windows PowerShell to select two random numbers from twenty possible numbers. How can I use Windows PowerShell to select two of twenty attendees at user group to receive prizes? Create a range of input numbers with the Get-Random cmdlet, then use the –Count parameter to retrieve...
  • Blog Post: Five Best PowerShell Cmdlets

    Summary : Ed Wilson, Microsoft Scripting Guy, talks about the five best Windows PowerShell cmdlets. Microsoft Scripting Guy, Ed Wilson, is here. OK, I will admit that this post is completely arbitrary. What do I mean when I talk about the five best Windows PowerShell cmdlets (commands)? Well, I am...
  • Blog Post: Table of Basic PowerShell Commands

    Summary : Ed Wilson, Microsoft Scripting Guy, provides a table of basic Windows PowerShell commands. Microsoft Scripting Guy, Ed Wilson, is here. Some questions are simply confusing, and other questions can be misleading, or even wrong. What do I mean? Well, I recently received a question from a person...
  • Blog Post: Help: It Says Run a PowerShell Script

    Summary : Ed Wilson, Microsoft Scripting Guy, talks about running a Windows PowerShell script. Microsoft Scripting Guy, Ed Wilson, is here. Ninety two degrees Fahrenheit and sunny—that is what the weather is supposed to be this Saturday in Jacksonville when Teresa and I will be speaking at the...
  • Blog Post: Weekend Scripter: Understanding Quotation Marks in PowerShell

    Summary : Guest blogger, Don Walker, explores using single and double quotation marks in Windows PowerShell. Microsoft Scripting Guy, Ed Wilson, is here. Welcome new guest blogger, Don Walker. Don is a coworker of guest blogger, Tim Bolton, and he worked with Tim on a project that Tim blogged about...