Scripting Blog

A place to learn about PowerShell and share stories of automation

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

(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 nearly 100 ...

Hey, Scripting Guy! Quick-Hits Friday: The Scripting Guys Respond to a Bunch of Questions (10/16/09)

In this post:   Has the WMI Problem with Dates and Daylight Saving Time Been Resolved? Hey, Scripting Guy! Back in the spring, I ran into a problem using the Win32_NTLogEvent WMI class in a script. The problem was the change to daylight saving time (DST) back in March in the United States. After a couple of weeks, ...

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

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 Word document, ...

Hey, Scripting Guy! Can I Add an Endnote to a Word Document?

Hey, Scripting Guy! I have a rather strange question. Do you know how to add a reference to a document in Microsoft Word? I am not talking about by using the GUI tools, but by using a Windows PowerShell or a VBScript to add a reference at the bottom of a page in a document. I am not trying to play "stump the chump." I really do have a...

Hey, Scripting Guy! How Do I Count the Number of Pages in a Group of Office Word Documents?

Hey, Scripting Guy! I am so mad right now, I could just about scream. In fact, if you don't mind, I believe I will scream. We have this stupid printer at work that I have to use to print out a very important report. This printer is rather slow when printing out these reports; it prints out about 30 pages a minute. It has a hopper that ...

Feedback usabilla icon