Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

Hey, Scripting Guy! How Can I Grant Administrator Rights to Folders and Then Delete Them?

(image) (image) Hey Scripting Guy! Our previous network administrator was a slouch. He did not maintain proper backups, never reviewed event logs, and never cleaned up user folders when he deleted users in Active Directory. This last omission is particularly egregious because it has taken a lot of cleanup work to find and delete the user ...

Hey, Scripting Guy! How Can I Use Windows PowerShell to Determine the Owner of a File?

(image) Hey, Scripting Guy! Is it possible to determine the owner of a file using Windows PowerShell?-- GF(image) (image) (image) Hey, GF. Well, today is April 15th, which, in the US, can mean only one thing: it’s time to celebrate the birthday of Italian mathematician Pietro Antonio Cataldi, best known for discovering the sixth and ...

How Can I Take Ownership of a File or Folder By Using a Script?

(image) Hey, Scripting Guy! How can I take ownership of a file or folder using a script?-- RV(image) (image) (image) Hey, RV. Interesting question. In the past, the Scripting Guys have tried to take ownership of a Porsche 911, beachfront property in Hawaii, and the New York Yankees; all of those efforts failed. Considering our track record...

How Can I Determine the Owner of a File?

(image) Hey, Scripting Guy! Is there a way to determine the owner of a file by using a script?-- BD(image) (image) (image) Hey, BD. As a matter of fact there is a way to use a script to determine the owner of the file, though it’s understandable why you might not be able to find that information on your own. After all, there are two main...