Browse by Tags

Tagged Content List
  • Blog Post: Expert Solution for 2011 Scripting Games Advanced Event 10: Use a PowerShell Proxy Function to Create Temporary Files

    Summary : Microsoft PowerShell MVP Shay Levy shows how to use a proxy function to easily create temporary files and solve Advanced Event 10 in the 2011 Scripting Games. Microsoft Scripting Guy, Ed Wilson, here. As we wrap up the 2011 Scripting Games today, we have Shay Levy as our expert commentator...
  • Blog Post: How to Reuse Windows PowerShell Functions in Scripts

    Summary : When writing a Windows PowerShell script, code reuse can speed up the process. Ed Wilson discusses best practices for reusing code. Hey, Scripting Guy! I often write Windows PowerShell scripts, and when I need to use a function that I wrote for a different script, I copy and paste the...
  • Blog Post: Create a Truly Advanced PowerShell Function

    Summary : Learn how to create a true advanced function that interacts with the Windows PowerShell pipeline. Microsoft Scripting Guy Ed Wilson here. Sean Kearney, Microsoft Windows PowerShell MVP, has been burning up the keyboard lately with ideas for guest blog posts. I hate to disappoint him by not...
  • Blog Post: Hey, Scripting Guy! Weekend Scripter: Fibonnaci Sequence This!

    Microsoft Scripting Guy Ed Wilson here, it is warming up a bit down here in Charlotte, North Carolina in the United States, and therefore I tend to gravitate outside on weekends. At least, far enough outside to make it to my woodworking shop. Today, I was thinking about building a series of boxes. One...
  • Blog Post: I Found this PowerShell Function—Now What Do I Do? Part 1

    Summary : A reader found needed code, but it is contained in a function. Microsoft Scripting Guy, Ed Wilson, provides the scoop about how to use functions. Hey, Scripting Guy! I have some experience with scripting—primarily VBScript script. I also have written a lot of batch files. But recently...
  • Blog Post: PowerShell Pie for Pi Day

    S ummary : Use the built in pi value in an impromptu function to get the circumference of a circle by using Windows PowerShell. Microsoft Scripting Guy, Ed Wilson, is here. The Scripting Wife and I are still pretty geeked out from the first ever Windows PowerShell Saturday that was held in Columbus...
  • Blog Post: Weekend Scripter: Cmdletbinding Attribute Simplifies PowerShell Functions

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using the cmdletbinding attribute to simplify Windows PowerShell functions. Microsoft Scripting Guy, Ed Wilson, is here. This morning I was sitting around playing with Windows PowerShell, and I realized that I had not written much about...
  • Blog Post: Hey, Scripting Guy! Weekend Scripter: A Function to Calculate Fuel Cost

    Microsoft Scripting Guy Ed Wilson here. The cool thing about scripting on the weekend is you can take two hours for breakfast, hang out with friends on Facebook and Twitter, and not feel bad about it all. The Scripting Wife headed out with her friend to a rodeo and left me in the kitchen unattended....
  • 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: 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...
  • 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...