Browse by Tags

Tagged Content List
  • 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
  • Blog Post: Weekend Scripter: Use PowerShell to Find Longest Cmdlet Name

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to find the longest cmdlet name. Microsoft Scripting Guy, Ed Wilson, is here. This is an exciting time of the year, as we get ready for the PowerShell Summit in Charlotte and for the Microsoft Ignite conference in Chicago...
  • Blog Post: Don’t Script: Create PowerShell Snippets

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about creating custom Windows PowerShell snippets. Hey, Scripting Guy! Thank you for yesterday's blog post, Don’t Write Scripts: Use Snippets . I like the idea of having access to Windows PowerShell script snippets. But I used to create...
  • Blog Post: Don’t Script: Edit PowerShell Command History

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about editing the Windows PowerShell command history. Hey, Scripting Guy! I liked your ideas in Avoid Scripting: Use PowerShell Command History . My problem is that I seldom (if ever) type commands perfectly the first time—often, not even the...
  • Blog Post: Avoid Scripting: Use PowerShell Command History

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about avoiding Windows PowerShell scripting by using command history. Hey, Scripting Guy! I used to have a program that I could use to keep track of commands I typed at the command prompt. It permitted me to use macros to replay those commands or...
  • Blog Post: Write and Run PowerShell Script Without Scripting

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about writing and running a Windows PowerShell script without scripting. Hey, Scripting Guy! I like using the Windows PowerShell ISE, but I do not have rights to run a script. I am stuck using a twenty year-old command prompt with Windows PowerShell...
  • Blog Post: What Is PowerShell?

    Summary : Microsoft Scripting Guy, Ed Wilson, explains Windows PowerShell. Hey, Scripting Guy! I keep hearing this term...all over...everywhere. But I do not know what it is. Can you tell me, "What is Windows PowerShell?" —DB Hello DB, Microsoft Scripting Guy, Ed Wilson, is...
  • Blog Post: Weekend Scripter: Playing with PowerShell Prompt

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about playing with the Windows PowerShell prompt. Microsoft Scripting Guy, Ed Wilson, is here. It is time to round up all of those end-of-the-year kinds of things. This is, in fact, the last weekend Hey, Scripting Guy! Blog post of 2014. Not sure...
  • Blog Post: Weekend Scripter: Exploring IP Address Functions

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell with TCP/IP. Microsoft Scripting Guy, Ed Wilson, is here. This morning, I decided to make a cup of orange spice tea. I did not even do it manually. I used a tea bag. I know, I know, I know. But hey, sometimes I like...
  • Blog Post: Access Objects Inside Other Objects in PowerShell Pipeline

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about accessing objects inside other objects in the Windows PowerShell pipeline. Hey, Scripting Guy! Yesterday in Create Custom PowerShell Objects , you talked about writing a script to access embedded objects. That seems like a lot of trouble. Is...
  • Blog Post: Create Custom PowerShell Objects

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about creating custom objects via Windows PowerShell. Hey, Scripting Guy! Yesterday in Understand Embedded Objects in PowerShell , you said the easy way to expand a Windows PowerShell object was to use the –ExpandProperty parameter from the...
  • Blog Post: Understand Embedded Objects in PowerShell

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about understanding embedded objects in Windows PowerShell. Hey, Scripting Guy! I don’t get it. Some things in Windows PowerShell are so easy, and others are so complicated. It seems to go from ridiculously easy to ridiculously hard all at...
  • Blog Post: Use PowerShell to Find Hotfixes Installed in Time Range

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to find hotfixes that were installed during a certain time range. Hey, Scripting Guy! I have a problem at work. It seems there was a hotfix that was installed in the last couple of months that is causing problems...