Scripting Blog [archived]

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

How Can I Format a Series of Numbers as a Phone Number?

(image) Hey, Scripting Guy! How can I format a series of numbers as a phone number in Windows PowerShell?-- HR(image) (image) (image) Hey, HR. You know, formatting is all about making things look a little nicer and a little more presentable. That’s why the Scripting Guy who writes this column always finds it strange when people ask him ...

Hey, Scripting Guy! How Can I Use Windows PowerShell to Get a List of All the Open Windows on a Computer?

(image) Hey, Scripting Guy! Someone told me that there’s a way to use Windows PowerShell to get a list of all the open windows on a computer. Any chance you could show me how to do that?-- JD (image) (image) (image) Hey, JD. You bet we can. Before we do that, however, we’d like to take a moment and salute Peter Costantini, the ...

How Can I Expand the Width of the Windows PowerShell Console?

(image) Hey, Scripting Guy! How can I expand the width of the Windows PowerShell console? When I display certain kinds of data – like information from the event logs – that data gets cut off because the console window isn’t wide enough.-- TB(image) (image) (image) Hey, TB. Wow, what a coincidence: we were just about to ask you that ...

How Can I Add a Function to a Windows PowerShell Script?

(image) Hey, Scripting Guy! How can I add a function to a Windows PowerShell script?-- TT(image) (image) (image) Hey, TT. You know, we’re going to do something a little unusual today: we aren’t going to mention the fact that the University of Washington defeated Washington State University in the annual Apple Cup football game. Granted, ...

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 ...