Scripting Blog

A place to learn about PowerShell and share stories of automation

Hey, Scripting Guy! How Can I Remove Old Files From All the Folders That Share a Folder Name?

Hey, Scripting Guy! We have a whole bunch of folders named Archive, all on the same computer. How can I search for all these folders, go through each one, and remove any files that are older than XX number of days?-- CH Hey, CH. Well, it’s Day 2 of TechEd IT Forum here in Barcelona, and today’s the day the Scripting Guys really go back ...

Hey, Scripting Guy! How Can I Extract a User Name and Drive Name From a String Value?

Hey, Scripting Guy! We currently have user home directory information stored in this format: kenmyer on 'atl-fs-001\vol' (U:). How I can extract the user name and drive letter and change the format to this: U:\kenmyer?-- AR Hey, AR. Well, it’s Monday, day 1 of the TechEd IT Forum, and the Scripting Guys have arrived in Barcelona, Spain. ...

Hey, Scripting Guy! How Can I Save Information in an HTA as a Tab-Separated Values File?

Hey, Scripting Guy! I have an HTA that includes five text boxes. How can I save the values in those text boxes to a tab-separated values file?-- EL Hey, EL. According to their itinerary, the Scripting Guys should land in Paris sometime around 8:00 AM on Friday, November 9th. OK, technically, Paris isn’t exactly Barcelona, and the ...

Hey, Scripting Guy! How Can I Get the Name and whenCreated Values for All the Users in Active Directory?

Hey, Scripting Guy! How can I get the Name and whenCreated values for all the users in my Active Directory domain and then write that information to a comma-separated values file?-- MM Hey, MM. Well, assuming all has gone according to plan, by the time most of your read this column the Scripting Guys will be on a plane and winging their way...

Hey, Scripting Guy! How Can I Remove a Value From the Path Environment Variable?

Hey, Scripting Guy! How can I remove a value from the Path environment variable?-- MG Hey, MG. You know, today is Wednesday, November 7th, the day before the Scripting Guys head for Barcelona and Tech IT Forum. Even as we speak, Scripting Guy Jean Ross is running around frantically, trying to tie up all the loose ends before we go. ...

Feedback usabilla icon