Browse by Tags

Tagged Content List
  • Blog Post: Weekend Scripter: My First PowerShell Summit

    Summary : Microsoft PowerShell MVP, Will Anderson, talks about his first Windows PowerShell Summit. Microsoft Scripting Guy, Ed Wilson, is here. Wow! What a week...or part of a week. Windows PowerShell Summit North America 2015 was here in Charlotte, NC this past week. The Scripting Wife and I met...
  • Blog Post: PowerTip: Find Current Directory in PowerShell

    Summary : Easily find the current directory in Windows PowerShell. How can I return a path object that contains information about the current working directory in Windows PowerShell? Use the $pwd automatic variable: PS C:\> $pwd
  • Blog Post: Weekend Scripter: Scripting Guys Ignite Booth Schedule

    Summary : Microsoft PowerShell MVP, Teresa Wilson, talks about the Scripting Guys booth schedule. Microsoft Scripting Guy, Ed Wilson, is here. It is that time of year again. Conference time. TechEd North America is no more, but Microsoft Ignite is on the horizon. May 4-8, 2015 in Chicago! It is already...
  • 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: PowerTip: Return Specific Number of Letters from String

    Summary : Use Windows PowerShell to return a specific number of letters from a string. How can I use Windows PowerShell to easily to retrieve the first two letters from a string? Use the SubString method from a string, and then specify the starting the position and the number of letters to return...
  • 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: PowerTip: Save CSV Data and Maintain Unicode Encoding

    Summary : Use Windows PowerShell to save data as a CSV file and maintain the Unicode encoding. How can I use Windows PowerShell to save my data as a CSV file but ensure that it is saved as Unicode? Make sure you specify the –Encoding parameter when you call the Export-CSV cmdlet, for example...
  • 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: PowerTip: Remove Type Data with PowerShell

    Summary : Learn how to remove type data by using Windows PowerShell. How can I remove a custom type data that is producing an error message when I try to update it in my Windows PowerShell session? Use the Get-TypeData cmdlet to retrieve an instance of the type data, and pipe it to the Remove-TypeData...
  • 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...