Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

Hey, Scripting Guy! Part 2: How Can I Update Many Office Word Documents at Once?

(image) (Editor's note: This is part 2 of a two-part article originally intended for TechNet Magazine. Part 1 was published yesterday.)  Now we arrive at the entry point to the script. The first thing to do in the entry point of the script is to create a collection of all the .doc and docx files in the folder indicated by the $path ...

Hey, Scripting Guy! Part 1: How Can I Update Many Office Word Documents at Once?

(image) (Editor's note: This is part 1 of a two-part article originally intended for TechNet Magazine. Part 2 will be published tomorrow.)   Little clouds of dust rise from the ground like miniature tornados carrying powdery sand that drifts along lazily on a nearly still breeze. The tires that support the ancient bus grind well...

Hey, Scripting Guy! Part 2: How Can I Make Sure That a WMI Provider Exists Before Using It in a Script?

(image) (Editor's note: This is part 2 of a two-part article originally intended for TechNet Magazine. Part 1 was published yesterday.)    To obtain information about the provider for a WMI class, you will need to open the class. Click the Open Class button, and type the name of the WMI class in the box that appears. We are ...

Hey, Scripting Guy! Part 1: How Can I Make Sure That a WMI Provider Exists Before Using It in a Script?

(image) (Editor's note: This is part 1 of a two-part article originally intended for TechNet Magazine. Part 2 will be published tomorrow.)  The sun had barely thought about coming up as I stepped aboard the catamaran that would take me from the Circular Quay across Sydney Harbor to Manly Beach. I staggered slightly as I navigated ...

Hey, Scripting Guy! How Can I List the Unique Words from a Microsoft Office Word Document?

(image) (image) Hey, Scripting Guy! I need to obtain a listing of unique words from a Microsoft Word document. I know that there is the Sort-Object cmdlet that can be used to retrieve unique items, and there is the Get-Content cmdlet that can read the text of a text file. However, the Get-Content cmdlet is not able to read a Microsoft...