Scripting Blog

A place to learn about PowerShell and share stories of automation

How Can I Delete Unread Emails That Are More Than 6 Months Old?

Hey, Scripting Guy! We have a lot of users who let unread email messages pile up in their Outlook Inboxes; after awhile, that causes their Inboxes to fill up. How can I write a script users could run that would delete any unread messages that are more than 6 months old?-- ST Hey, ST. You know, sometimes it’s tough being a Scripting Guy. ...

How Can I Prompt for a Computer Name and Then Delete That Computer Account From Active Directory?

Hey, Scripting Guy! How can I write a script that prompts the user for a computer name, then goes out and deletes that computer account from Active Directory?-- PH Hey, PH. As a general rule, technical writers never experience writer’s block. Why not? Well, writer’s block usually comes about because you can’t figure out how to get ...

How Can I Remap Network Drives So They Use an IP Address Rather Than a Computer Name?

Hey, Scripting Guy! How can I remap network drives so they point to the IP address of the remote computer rather than the computer name?-- YM Hey, YM. You know, yesterday we started off this column by saying, “Never mind,” referring to the fact that, in a previous article, the Scripting Guy who writes this column lamented the fact that...

How Can I Search For Red Text in a Microsoft Word Document?

Hey, Scripting Guy! I have a huge document that features occasional lines printed in red. How can I extract just the lines that are printed in red?-- GH Hey, GH. To begin with, the Scripting Guy who writes this column would like to say just one thing: never mind. In yesterday’s column the Scripting Guy who writes this column bemoaned the...

How Can I Create a Folder for Each User in My Domain?

Hey, Scripting Guy! How can I create a folder for each user in my domain? I’d like the folder name to consist of the user’s first initial and their last name (for example, KMyer).-- GN Hey, GN. You know, this has been an interesting week for the Scripting Guys. Why? Because absolutely nothing interesting has happened to any of the ...

Feedback usabilla icon