Scripting Blog

A place to learn about PowerShell and share stories of automation

How Can I Set the Document Orientation in Microsoft Word to Landscape?

Hey, Scripting Guy! How can I set the document orientation in Microsoft Word to landscape?-- EE Hey, EE. We think the script that we’re about to show you will answer your question; if it doesn’t, however, we’ll hope you cut us a little slack. After all, according to an exercise bike at the local gym, the Scripting Guy who writes this ...

How Can I Use Windows PowerShell to Locate All the .WMA Files on My Computer?

Hey, Scripting Guy! How can I use Windows PowerShell to locate all the .wma files on my computer?-- LC Hey, LC. Harry Potter. Hogwarts. Ron Weasley. Dumbledore. Quiddich. What’s all that about? Oh, nothing: just a few words that idly floated through the head of the Scripting Guy who writes this column. And before you ask, no, those words ...

How Can I Cause a Script to Run Inside an HTA Any Time a User Presses ENTER?

Hey, Scripting Guy! How can I cause a script to run inside an HTA any time a user presses ENTER?-- JJ Hey, JJ. Before answering your question we should state, for the record, that the Scripting Guys are unanimously opposed to the recent decision by the International Astronomical Union (IAU) to remove Pluto from the list of planets. (OK, ...

How Can I Append a Location to the Path Environment Variable?

Hey, Scripting Guy! How can I append a location to the Path environment variable?-- AC Hey, AC. You know, there’s a TV commercial out in which a guy is watching a baseball game when his wife suddenly decides that the two of them should do something else. Talk about a dilemma: after all, according to the narrator, “In life there’s only...

How Can I Determine the First Friday in a Month?

Hey, Scripting Guy! How can I determine the first Friday in a month?-- JB Hey, JB. You know, when we first glanced at this question we were hoping it said, “How can I determine if any given day in a month is a Friday?” Why? Well, if that was the case then we had a sure-fire method for you: just walk through the cafeteria in the ...

Feedback usabilla icon