Scripting Blog [archived]

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

How Can I Extract Information Located Between Two Known Values in a Text File?

(image) Hey, Scripting Guy! In a text file, how can I extract the information that appears between the string HOSTNAME= and a blank space?-- B(image) (image) (image) Hey, B. You’ll have to pardon us if we seem a little sluggish today; we’re still recovering from all the fun and excitement of Windows PowerShell Week. What if you missed ...

How Can I Map a Drive, Copy a File to That Drive, and Then Unmap the Drive?

(image) Hey, Scripting Guy! How can I map a drive, copy a file to that drive, and then unmap the drive?-- ZK(image) (image) (image) Hey, ZK. You know, sometimes these questions are difficult for us to answer, simply because we don’t usually find ourselves performing the task being asked about. Remove every other line in a text file? Well, ...

How Can I Change the Default Highlight Color for a Microsoft Word Document?

(image) Hey, Scripting Guy! How can I change the default highlight color for a Microsoft Word document?-- TW(image) (image) (image) Hey, TW. You know, any time the Scripting Guy who writes this column wants to terrify the Scripting Son, he tells the blood-curdling saga of the first TV the Scripting Dad remembers: a TV that showed everything ...

How Can I Use Windows PowerShell to Get a List of All My Computers?

(image) Using Windows PowerShell, how can I retrieve a list of all the computer accounts in my domain?-- TE(image) (image) (image) Hey, TE. You know, several years ago the Scripting Guy who writes this column was playing basketball with one of his brothers. Because there were a total of 5 people at the park they had to play 2-on-2, with one ...