Browse by Tags

Tagged Content List
  • 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: 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: 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...
  • Blog Post: PowerTip: Find PowerShell Providers

    Summary : Learn how to find Windows PowerShell providers and their capabilities. How can I find what Windows PowerShell providers I have on my system? Use the Get-PSProvider cmdlet. Note Beginning with Windows PowerShell 3.0, some providers load on-demand, and therefore, they do not appear unless...
  • Blog Post: Create Custom Type Data in PowerShell to Format WMI Display

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about creating custom type data to control the way a WMI class displays. Hey, Scripting Guy! Yesterday, you said you could create custom type data to control the way the Win32_Volume WMI class reports back. How would one go about doing that? I looked...
  • Blog Post: PowerTip: Use PowerShell to Find File or Folder

    Summary : Learn how to use Windows PowerShell to find a file or a folder. How can I use Windows PowerShell to determine if a variable contains a path that leads to a file or folder? Use the Test-Path cmdlet to test the path stored in the variable, and then specify the PathType parameter, for example...
  • Blog Post: Weekend Scripter: Use PowerShell to Work with Embedded Objects

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to work with embedded objects. Microsoft Scripting Guy, Ed Wilson, is here. This morning I have my Zune 1.0 cranked up, and I am listening to some tunes. I have a nice cup of English Breakfast tea, and a warm croissant...
  • Blog Post: Weekend Scripter: Use PowerShell to Analyze Custom Objects

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to analyze custom objects. Microsoft Scripting Guy, Ed Wilson, is here. Last week, I talked about using a Windows PowerShell script to collect the number of words and documents for each of several years. To this, I...
  • Blog Post: PowerTip: Find Stats with PowerShell

    Summary : Use Windows PowerShell to find stats of objects. How can I use Windows PowerShell to see the minimum, maximum, and average values of a specific property in a series of objects? Pipe the objects to the Measure-Object cmdlet, specify the property you seek, and use the Average , Maximum...
  • Blog Post: Weekend Scripter: Use PowerShell to Count Words and Display Progress Bar

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to display a progress bar while counting the number of words in Word documents. Microsoft Scripting Guy, Ed Wilson, is here. One of the things that a writer does is keep track of words. This is not so much because one...
  • Blog Post: Weekend Scripter: Using PowerShell to Look for Documents

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about different approaches to find documents with Windows PowerShell. Microsoft Scripting Guy, Ed Wilson, is here. It is a lovely weekend down here in the deep south USA. I am sipping a nice cup of English Breakfast tea with lemon, lime, orange pith...
  • Blog Post: PowerTip: Use Filter Parameter with Get-ChildItem in PowerShell

    Summary : Use the –Filter parameter with the Get-ChildItem Windows PowerShell cmdlet. Why can't I get the –Filter parameter to work with the Get-ChildItem cmdlet? Try using the FileSystem provider. The –Filter parameter will accept two wildcard characters ( ? and * ) and a...
  • Blog Post: PowerTip: Look at Most Recent Error in PowerShell

    Summary : Learn how to see the most recent error in Windows PowerShell. I ran a script that fails. How can I use Windows PowerShell to find the most recent error? Use $error , and to see the most recent error, look at error 0: $error[0]
  • Blog Post: Use PowerShell to Compare Two Files

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to compare two files. Hey, Scripting Guy! I have a script that I wrote to compare two files, but it seems really slow. I am wondering what I can do to speed things up a bit. —JW Hello JW, Microsoft Scripting...
  • Blog Post: PowerTip: Create Array in PowerShell

    Summary : Use Windows PowerShell to easily create an array. Can I use Windows PowerShell to create an array of strings and avoid typing quotation marks around all the strings? Instead of creating an array, such as this: $array = “a”,”b”,”c”,”d”,”e”...
  • Blog Post: Use PowerShell to Remove Optional Features from Windows VHD

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to remove optional features from Windows virtual hard disks. Hey, Scripting Guy! I have a number of virtual machines that have optional features that they do not need, such as Windows Media Player. In fact, the virtual...
  • Blog Post: PowerTip: Find DISM-Related PowerShell Cmdlets

    Summary : Learn how to find all Windows PowerShell cmdlets that work with DISM. How can I find all Windows PowerShell cmdlets that work with Deployment Image Servicing and Management (DISM)? Use the Get-Command cmdlet and specify the DISM module: Get-Command -Module dism