Scripting Blog

A place to learn about PowerShell and share stories of automation

How Can I Determine if a Particular Patch is Installed?

Hey, Scripting Guy! How can I use a script to determine if a particular patch has been installed?-- GM Hey, GM. You know, not too long ago this would have been a question we might have “accidentally” dropped in the wastebasket and pretended never to have seen. Why? Well, back in the old days the only way to get information about patches...

How Can I Determine the Logon Name for a User?

Hey, Scripting Guy! How can I determine the user logon name for a user named John Smith?-- FR Hey, FR. You know, we’d like to tell you how to determine the user logon name for a user named John Smith, but we can’t: that’s because we have a specific list of names representing the only user names we can reference in one of our sample ...

How Can I Find All the Drives Mapped to a Share and Remap Them?

Hey, Scripting Guy! How can I find all the drives mapped to \\server1\share and remap them to \\server2\share? -- H T-S Hey, H T-S. You know, not too long ago Malcolm Gladwell published a book called The Tipping Point. Loosely speaking, the book posited that something could be ignored for the longest time, at least until it reached the so-...

How Can I Delete Specific Files in a Specific Folder?

Hey, Scripting Guy! How can I access the files in the folder T:\Act and delete any files that have the string “current” somewhere in the file name?-- SC Hey, SC. We have to admit, the notion of deleting anything current has a certain appeal, doesn’t it? Well, not for the Scripting Guys, of course; after all, our lives are so perfect ...

Feedback usabilla icon