Browse by Tags

Tagged Content List
  • 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: 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: PowerShell Code Breaks: Break Line, Not Code

    Summary : Ed Wilson, Microsoft Scripting Guy, talks about line continuation without breaking Windows PowerShell code. Hey, Scripting Guy! I have a problem sometimes when I copy code from the Hey, Scripting Guy! Blog. It does not seem to work. I try to take out spaces, but it still doesn’t...
  • Blog Post: PowerShell Custom Type Module

    Summary : Create custom types in Windows PowerShell with a free module by Jon Newman. Microsoft Scripting Guy, Ed Wilson, is here. Microsoft Scripting Guy, Ed Wilson, is here. Today we have a guest blogger who was with us in 2011, when he wrote Automate Facebook with a Free PowerShell Module ....
  • Blog Post: Weekend Scripter: Find Coolest PowerShell Parameter Names

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about finding the coolest Windows PowerShell parameter names. Microsoft Scripting Guy, Ed Wilson, is here. This morning, my friend and colleague, Dr. Thomas Shinder, posted on Facebook that his favorite Windows PowerShell parameter name is –NoClobber...
  • Blog Post: Weekend Scripter: What to Include in a PowerShell Comment Block

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about what to include in a Windows PowerShell comment block. Microsoft Scripting Guy, Ed Wilson, is here. Something that tends to confuse new scripters, regardless of the language, is what to include in a comment block at the beginning of a script...
  • Blog Post: Let Sleeping VBScript Scripts Lie

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about when to replace a VBScript script and when not to. Microsoft Scripting Guy, Ed Wilson, is here. One of the really awesome things about the Microsoft Ignite conference in Chicago this year was the chance to talk to literally thousands of people...
  • Blog Post: Write TargetResource Functions for PowerShell DSC

    Summary : Guest blogger and Microsoft PFE, Jason Walker, talks about writing Get , Set , and Test TargetResource functions for DSC. Microsoft Scripting Guy, Ed Wilson, is here. Microsoft PFE and Honorary Scripting Guy, Jason Walker , is back with us today for Part 2 of his two-part series. Yesterday...
  • Blog Post: Anatomy of a PowerShell DSC Resource

    Summary : Guest blogger and Microsoft PFE, Jason Walker, talks about the anatomy of a Windows PowerShell DSC resource. Microsoft Scripting Guy, Ed Wilson, is here. Today is Part 1 of a two-part series written by Microsoft PFE and Honorary Scripting Guy, Jason Walker . The majority of my "PowerShelling"...
  • Blog Post: PowerShell Tips and Tricks: Using Default Parameter Values

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using default Windows PowerShell parameter values. Microsoft Scripting Guy, Ed Wilson, is here. The last thing I want to talk about from the tips and tricks session of the Charlotte Windows PowerShell User Group with Lee Holmes is using default...
  • Blog Post: Select History Via PowerShell Out-Gridview

    Summary : Microsoft Scripting Guy, Ed Wilson, continues his tips and tricks series by talking about select Windows PowerShell commands via Out-GridView . Microsoft Scripting Guy, Ed Wilson, is here. One of the great things about getting a bunch of Windows PowerShell people together is that they begin...
  • Blog Post: PowerTip: Better Way to View PowerShell Help

    Summary : Learn a better way to view Windows PowerShell Help. I like the Windows PowerShell Help files, but I do not like trying to read them in the Windows PowerShell console window. What is a better way to read the content? Use the –ShowWindow parameter from Get-Help . This example displays...
  • Blog Post: PowerShell Tips and Tricks: Extended History

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about a module that provides extended command history. Microsoft Scripting Guy, Ed Wilson, is here. One of the things that came up during the Charlotte Windows PowerShell User Group meeting was the HistoryPx module that was written by Windows PowerShell...
  • Blog Post: Use PSReadLine for More Efficient PowerShell Console

    Summary : Microsoft Scripting Guy, Ed Wilson, presents a tip from the Charlotte User Group meeting about using PSReadLine. Microsoft Scripting Guy, Ed Wilson, is here. One really big tip that came out during the Charlotte User Group meeting was to use the PSReadLine module. It provides is syntax highlighting...
  • Blog Post: Favorite PowerShell Tips and Tricks

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about Windows PowerShell tips and tricks from the Charlotte User Group meeting. Microsoft Scripting Guy, Ed Wilson, is here. Last week was a special meeting at the Charlotte Windows PowerShell User Group. It followed immediately after the Windows...
  • Blog Post: PowerTip: Determine if Property is Member of Object

    Summary : Determine if a property is a member of an object in Windows PowerShell. How can I determine if a specific property is actually a member of an object in my Windows PowerShell script? Use the Get-Member cmdlet, and cast the response into a Boolean data type by using the [bool] type accelerator...
  • Blog Post: Use PowerShell to Move User Files and Update Registry

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to move user files and update the registry. Hey, Scripting Guy! I need to move a bunch of user files from their local computer to a network share so we can back up the user's data prior to migrating their desktops...
  • Blog Post: PowerTip: Roll Back Active PowerShell Transaction

    Summary : Learn how to roll back an active Windows PowerShell transaction. I started a transaction to modify the registry on my computer running Windows 8.1, but something failed, and I want to roll back the transaction. How can I do this? Use the Undo-Transaction cmdlet to roll back the active...
  • Blog Post: Using Transactions with PowerShell Registry Provider

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using transactions with the Windows PowerShell Registry provider. Hey, Scripting Guy! I was looking at the various providers and their capabilities (see Find and Use Windows PowerShell Providers ). I see that the Registry provider says it does...
  • Blog Post: PowerTip: Set Default Location Stack with PowerShell

    Summary : Use Windows PowerShell to set your default location stack. How can I use Windows PowerShell to set the default for some named location stacks that I created? Use the Set-Location cmdlet and specify the stack name, for example: Set-Location -StackName REG
  • Blog Post: Using Named Location Stacks in PowerShell

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using named location stacks in Windows PowerShell. Hey, Scripting Guy! If I need to move around in two types of locations, how would I do it? Suppose I need to look in various places in my profile, and then I need to do some work in data locations...
  • Blog Post: PowerTip: Display Locations Stored on Stack

    Summary : Use Windows PowerShell to display locations stored on the default stack. How can I use Windows PowerShell to see the locations that are stored on my default location stack? Use the –Stack parameter of Get-Location : Get-Location -Stack
  • Blog Post: Location, Location, Location in PowerShell

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about managing locations in Windows PowerShell. Hey, Scripting Guy! I don’t understand what is the big deal with Get-Location . I mean, I can look and see where I am at, so why do I need Get-Location ? For that matter, what are a PushD and...
  • Blog Post: PowerTip: Find PowerShell Cmdlets and Synopsis

    Summary : Use Windows PowerShell to find cmdlets and their associated synopsis. How can I easily find a list of specific Windows PowerShell cmdlets and their associated meanings? Use the Get-Command cmdlet, pipe the results to the Foreach-Object and Get-Help cmdlets, then select the name and synopsis...
  • Blog Post: Find and Use Windows PowerShell Providers

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about finding and using Windows PowerShell providers. Hey, Scripting Guy! I recently heard a Windows PowerShell MVP say that understanding the Windows PowerShell provider system is fundamental to understanding Windows PowerShell. I think I am in...