Browse by Tags

Tagged Content List
  • 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...
  • 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: Weekend Scripter: Use PowerShell to Create Users in Active Directory

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to read a CSV file and create users in Active Directory. Microsoft Scripting Guy, Ed Wilson, is here. Yesterday in Oh No! Oh Wait...PowerShell for the Win! , I created a CSV file from a Word document that I had been...
  • Blog Post: Weekend Scripter: Oh No! Oh Wait...PowerShell for the Win!

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to clean up an impossible document. Microsoft Scripting Guy, Ed Wilson, is here. Sometimes I just cringe. It is a reflex reaction born from many long (and at times, torturous) years in the IT field. I know, I should...
  • Blog Post: Combine PowerShell Remoting and CIM

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about combining Windows PowerShell remoting and CIM. Microsoft Scripting Guy, Ed Wilson, is here. One of the cool things about Windows PowerShell is remoting. It is not a new feature. In fact, it was introduced in Windows PowerShell 2.0—a time...
  • Blog Post: PowerTip: Use PowerShell to Remove All CIM Sessions

    Summary : Learn how to use Windows PowerShell to remove all CIM sessions. How can I use Windows PowerShell to delete all the CIM sessions I have created? Use the Get-CIMSession cmdlet to retrieve all CIM sessions, and pipe the results to the Remove-CIMSession cmdlet: Get-CimSession | Remove...
  • Blog Post: Look at Schema of WMI Class with PowerShell

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to look at the schema of a WMI class. Microsoft Scripting Guy, Ed Wilson, is here. One of the cool things about WMI is that it is largely self-describing. This means that I can use WMI and look at WMI. With the CIM...
  • Blog Post: PowerTip: Find WMI Parent Class with PowerShell

    Summary : Use Windows PowerShell to easily find a WMI parent class. How can I use Windows PowerShell to find what parent class a particular WMI class derives from? Use the Get-CimClass cmdlet, and select the CimSuperClassName property, for example: (Get-Cimclass win32_bios).CimSuperClassName
  • 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: Comparing CIM and WMI in PowerShell

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about comparing CIM and Windows PowerShell. Hey, Scripting Guy! When I query using a CIM function, I get back different stuff than when I query WMI. I don’t get it. Can you help? —BW Hello BW, Microsoft Scripting Guy, Ed Wilson...
  • Blog Post: Working with Volumes in CIM

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about working with volumes with Windows PowerShell and CIM. Hey, Scripting Guy! I don’t understand CIM at all. I mean, I thought it was basically WMI, but when I use WMI to look at volumes, I see different stuff. Can you help me? —AB...
  • 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...