Scripting Blog

A place to learn about PowerShell and share stories of automation

Hey, Scripting Guy! How Can I Ensure My Scripts Won’t Fail on Various Windows Operating Systems?

 Hey, Scripting Guy! I have a mixture of operating systems at work. We have Windows XP on the desktop, a few Windows Vista machines, Windows 7 on a few computers so far, Windows 2003 in the server room, and Windows 2008 and a couple of Windows 2008 R2 computers that are running Hyper-V on Windows Core edition. I know we are not ...

How Can I Determine Which Version of Windows Vista is Installed on a Computer?

Hey, Scripting Guy! How can I determine which version of Windows Vista is installed on a computer?-- GC Hey, GC. You know, Microsoft is one of the largest and most successful companies the world has ever known. And yet, despite all our successes, we’re really no different than any anyone else: for example, from time-to-time we get a ...

How Can I Tell Which of Our Windows Server 2003 Computers are Running R2?

Hey, Scripting Guy! We have a bunch of Windows Server 2003 computers in our organization. Some of these computers are running Windows Server 2003 R2 and some are not. How can I tell which of our Windows Server 2003 computers are running R2?-- TX Hey, TX. You know, that’s a question that people have been trying to answer for hundreds and ...

How Can I Tell Whether a Logon Script is Running on a Workstation or on a Server?

Hey, Scripting Guy! How can I tell whether a logon script is running on a workstation or on a server? If the script is running on a server, I want to skip a portion of the script.-- RT Hey, RT. You know, a few years ago one of the Scripting Guys helped a fellow Microsoft employee set up a computer lab that this other Microsoft employee ...

How Can I Determine Which Version of Word is Installed on a Computer?

Hey, Scripting Guy! How can I determine which version of Word is installed on a computer?-- RR Hey, RR. Turns out that this is a trickier question than you might expect. That’s because WMI does only a so-so job of retrieving information about the software installed on a computer. In theory, you can use a script like this one to get back ...