Scripting Blog [archived]

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

How Can I Remove a Group from the Local Administrators Group?

(image) Hey, Scripting Guy! How can I remove a group from the local Administrators group?-- SB(image) (image) (image) Hey, SB. One of the Scripting Guys has very vague memories of an old TV show called Branded, in which the hero (played by Chuck Connors) was accused of cowardice and then dishonorably discharged from the US Cavalry. About ...

How Can I Read a Text File on a Remote Computer?

(image) Hey, Scripting Guy! How can I read a text file on a remote computer?-- BM(image) (image) (image) Hey, BM. We have a confession to make: we’re using you and your question for our own nefarious purposes. Earlier this week we answered a question about reading the last line in a group of text files; in our answer we promised we’d ...

How Can I Verify That a Folder Has Files in It and, If So, Delete Those Files?

(image) Hey, Scripting Guy! How can I verify that a certain folder (C:\TestLog) has files in it and, if so, delete all those files?-- DC(image) (image) (image) Hey, DC. Before we begin we should point out that - when using WMI - it doesn’t matter whether or not a folder has any files in it: you can still tell WMI to delete all the files ...

Hey, Scripting Guy! How Can I Configure the Hide From Exchange Address Lists Property for All the Contacts in a Domain?

(image) Hey, Scripting Guy! How can I configure the Hide From Exchange Address Lists property for all the contacts in a domain?-- MM(image) (image) (image) Hey, MM. You know what the say: you can run, but you can’t hide (especially from Microsoft Exchange!). But what they forgot to add is that you can hide, as long as you’ve set the ...

How Can I Add the Last Lines from a Group of Text Files to a Word Document?

(image) Hey, Scripting Guy! How can I take the last line in a group of text files and paste that information into a Word document?-- JV(image) (image) (image) Hey, JV. You know, one thing we try to do in this column is focus on practical system administration tasks. We’ll deviate from that focus every now and then, but for the most part ...