Browse by Tags

Tagged Content List
  • Blog Post: Weekend Scripter: Create PowerShell Graphical Help Function

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about creating a graphical Help function in Windows PowerShell. Microsoft Scripting Guy, Ed Wilson, is here. Well, I should have known. In yesterday’s post, A Graphical Tool to Explore PowerShell Help , I said it would not take too long to...
  • Blog Post: Use a PowerShell Function to Determine Miles to Go

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about a Windows PowerShell function to determine miles remaining to meet challenge. Microsoft Scripting Guy, Ed Wilson, is here. If you are friends with me on Facebook, you know that in October I accepted a challenge to run a hundred miles before...
  • Blog Post: Convert a Script to a PowerShell Function

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about converting a script to a Windows PowerShell function. Microsoft Scripting Guy, Ed Wilson, is here. When I have a script that I think I will use more than once or twice, it often makes sense for me to convert it to a function. If it is something...
  • Blog Post: The Function of PowerShell Functions

    Summary: In this how to article, Microsoft Scripting Guy Ed Wilson discusses design considerations for Windows PowerShell functions. Hey, Scripting Guy! I am trying to decide how to configure my Windows PowerShell function. I have heard that functions should return objects, but I am thinking that...
  • Blog Post: I Found This Module—What Do I Do?

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about how to use a Windows PowerShell module. Hey, Scripting Guy! I found this module in the Scripting Guys Script Repository. Now what do I do? —SH Hello SH, Microsoft Scripting Guy, Ed Wilson, is here. This morning I have been busy...
  • Blog Post: I Found this PowerShell Function—Now What Do I Do? Part 2

    Summary : Microsoft Scripting Guy, Ed Wilson, continues his discussion about what to do with a Windows PowerShell function. Microsoft Scripting Guy, Ed Wilson, is here. Last week I did not get a chance to finish answering a question from JB about how to use a Windows PowerShell function. Note This...
  • Blog Post: Use PowerShell Parameter Attributes to Avoid Errors

    Summary: Use Windows PowerShell parameter attributes to avoid input errors in a function. Microsoft Scripting Guy Ed Wilson here. This week is great. The Scripting Wife and I are enjoying meeting Windows PowerShell luminaries. I am working with a group of IT pros to help them to learn Windows PowerShell...
  • Blog Post: How Do I Use a Windows PowerShell Script Containing Functions?

    Summary : Using a script containing Windows PowerShell functions can be as simple as dot-sourcing the script. Hey, Scripting Guy! I was looking in the Script Center Script Repository for Windows PowerShell scripts, and I found one that was really cool. Unfortunately, when I attempted to use...
  • Blog Post: Using PowerShell Functions: Best Practices

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about some best practices for using Windows PowerShell functions. Microsoft Scripting Guy, Ed Wilson, is here. Windows PowerShell functions are really powerful, and at the same time, they are incredibly simple to create. This makes Windows PowerShell...
  • Blog Post: Naming and Designing Advanced PowerShell Functions

    Summary : Microsoft Scripting Guy Ed Wilson discusses naming and designing advanced Windows PowerShell functions in relation to his Local User Management Module. Microsoft Scripting Guy Ed Wilson here. The cool thing about today is that it is Canada Day . This means that my boss back in Redmond is...
  • Blog Post: Hey, Scripting Guy! Weekend Scripter: How Much Wood?

    Microsoft Scripting Guy Ed Wilson here. I am out in my woodworking shop today, and I am laying out an arch that I will use to create a curved top for a box. I need to know how much wood will be required to make that arch — the radius of the arch. Another use might be to measure for drywall when creating...
  • Blog Post: Accepting Arguments for PowerShell Functions: Best Practices

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about the best practices surrounding accepting input for a Windows PowerShell function. Microsoft Scripting Guy, Ed Wilson, is here. April in the Carolina’s is a special time. In fact, it is my favorite time of the year here. This is because...
  • Blog Post: Hey, Scripting Guy! Australian Dispatch #2: A Metric Ton of Scripting

    After nearly 20 hours in airports and planes, the giant Boeing 747 aircraft touched down on the runway at Sydney International airport-my scripting eyes were glued to the insides of my eye lids. It is rather evil the way they give you a test to see if you are qualified to enter the country...not Australia...
  • Blog Post: Write PowerShell Functions That Accept Pipelined Input

    Summary: Learn how to write Windows PowerShell functions that accept pipelined input. Hey, Scripting Guy! I really like the way that some Windows PowerShell cmdlets enable me to pipeline things to it. I do not understand why some Windows PowerShell cmdlets do not allow me to pipeline stuff to it...
  • Blog Post: Weekend Scripter: Easily Add Whatif Support to Your PowerShell Functions

    Summary : Microsoft Scripting Guy, Ed Wilson, shows how to easily add whatif support to your Windows PowerShell functions. Microsoft Scripting Guy, Ed Wilson, is here. I love demoing Windows PowerShell to people who have never seen it—and believe it or not, there are still IT Pros who have not...
  • Blog Post: A PowerShell Function to Count String Length

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about creating a Windows PowerShell function that counts a string length and copies it to the clipboard. Microsoft Scripting Guy, Ed Wilson, is here. It is hot and humid outside—89 degrees Fahrenheit (32 degrees Celsius) and 75% humidity. That...
  • Blog Post: Hey, Scripting Guy! How Can I Reuse Functions?

    Hey, Scripting Guy! I have a bunch of functions I wrote in PowerShell that I would like to use in other scripts. I am getting tired of cutting and pasting these things into various scripts over and over again. Surely there has got to be an easier way to do this! Have any ideas? - JB Hi JB, Of course...
  • Blog Post: The 2011 Scripting Games Advanced Event 10: Use PowerShell to Create a Function to Create Temp Files

    Summary : Advanced Event 10 in the 2011 Scripting Games uses Windows PowerShell to create an advanced function to create temporary files. About this event Division Advanced Date of Event 4/15/2011 12:15 AM Due Date 4/22/2011 12...
  • Blog Post: I Found this PowerShell Function—Now What Do I Do? Part 3

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about combining functions into a single function file, and using them in scripts. Microsoft Scripting Guy, Ed Wilson, is here. This morning is sort of mellow. It seems as if the clouds are touching the ground, and all sound is suppressed by a thick...
  • Blog Post: Handle Formatted Output in PowerShell

    Summary : Microsoft Windows PowerShell MVP, Doug Finke, illustrates how to handle formatted output in a Windows PowerShell script. Microsoft Scripting Guy, Ed Wilson, is here. Doug Finke is our guest blogger. Doug Finke is a Microsoft PowerShell MVP working for Lab49, a company that builds...
  • Blog Post: Best Practice for Using Aliases in PowerShell Scripts

    Summary : Microsoft Scripting Guy, Ed Wilson, discusses the use of aliases in Windows PowerShell scripts. He covers the pros and cons in this blog. Weekend Scripter Microsoft Scripting Guy, Ed Wilson, is here. “You can have my aliases when you pry my cold dead fingers from my keyboard,”...
  • Blog Post: Use a PowerShell Function to Find Specific WMI Classes

    Summary: Use a Windows PowerShell function to find WMI classes with specific qualifiers. Microsoft Scripting Guy Ed Wilson here. In Thursday’s article , I talked about using the Set-WmiInstance cmdlet to work with WMI classes. One of the parameters, the class parameter, works with WMI singleton...
  • Blog Post: Reusing PowerShell Code—What is Best?

    Summary : In this Weekend Scripter blog, Microsoft Scripting Guy, Ed Wilson, discusses considerations for code reuse. Weekend Scripter Microsoft Scripting Guy, Ed Wilson, is here. It has been really fun these past few weeks reviewing all of the scripts that were submitted for the 2011 Scripting...
  • Blog Post: Named Arguments for PowerShell Functions: Best Practices

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using named arguments in Windows PowerShell functions. Microsoft Scripting Guy, Ed Wilson, is here. If I go to the trouble of writing a Windows PowerShell script, I generally do not use unnamed arguments (such as $args as I illustrated yesterday...
  • Blog Post: Learn How to Use Description Attributes in PowerShell Functions

    Summary : Microsoft Scripting Guy, Ed Wilson, teaches you how to use description attributes to enable a quick retrieval of Windows PowerShell functions. Weekend Scripter Microsoft Scripting Guy, Ed Wilson, is here. Well, the 2011 Scripting Games are nearly completely over. “What?” you...