Scripting Blog

A place to learn about PowerShell and share stories of automation

How Can I Clear the List of URLs That Appear in the Internet Explorer Address Bar?

Hey, Scripting Guy! How can I clear the list of URLs that appear in the Internet Explorer address bar?-- GA Hey, GA. You know, if you’ve ever pondered the question, “What is it that makes the Scripting Guys different from other Microsoft employees?” well, we can save you some time and trouble by just giving you the answer: the ...

How Can I Map Network Drives Based on a Computer’s Site?

Hey, Scripting Guy! How can I parse information in a text file, and then use that information to map network drives based on a computer’s site?-- BH Hey, BH. We’ll be with you in a second - we’re still replaying last night’s baseball game, in which the Kirkland Fire dropped a tough 7-5 decision to a very good team from Bothell. ...

How Can I Force Users to Type Command-line Arguments in a Specific Order?

Hey, Scripting Guy! How can I force users to type command-line arguments in a specific order?-- JA Hey, JA. You know, the Scripting Guy who writes this column has a 16-year-old son. He coaches Colt League baseball. He works every day with all the other Scripting Guys. With that background, it probably come as no surprise to hear that he ...

How Can I Query a Text File and Retrieve Records That Occurred on a Specific Date?

Hey, Scripting Guy! We have tons of text files in which each line in the file represents a record or an event of some kind. How can I use a script to retrieve records or events that occurred on a specified date?-- TW Hey, TW. You know, in your email you sort of apologized for using text files, noting that “I know, I know, we should ...

How Can I Remove Blank Spaces Before and After a String Value?

Hey, Scripting Guy! We have a custom in-house application that writes data to a log file. The problem is that the data often has a bunch of blank spaces before and after it. How can I remove all the blank spaces that come before and after my data?-- KS Hey, KS. You might find this hard to believe, but the Scripting Guy who writes this ...

Feedback usabilla icon