How Can I Save Word Documents as Text Files By Using a Script?

Hey, Scripting Guy! I have a series of Word files. I would like to open each of these files and save them as plain-text files. Is there a way to do that using a script?— CG Hey, CG. Yes, you can do this quite easily with a script; in fact, with very few exceptions anything…

7

How Can I Tell Whether a Group is a Security Group or a Distribution Group?

Hey, Scripting Guy! Is there any way to tell whether an Active Directory group is a security group or a distribution group?— AW Hey, AW. As a matter of fact, there is; this script will tell you what type of group you’re dealing with:Set objGroup = GetObject _ (“LDAP://cn=Finance Managers, ou=Finance, dc=Fabrikam, dc=com”) Wscript.Echo objGroup.groupType…

6

How Can I Connect to a Folder When There’s an Apostrophe in the Folder Name?

Hey, Scripting Guy! I’m using the WMI class Win32_Directory to get information about folders on a computer. It works great, except when there’s an apostrophe in the folder name; then, it doesn’t work at all. How can I use WMI to connect to folders that have apostrophes in their names?— JO Hey, JO. Ah, the…

2

How Can I Get a List of All the Domain Controllers in My Domain?

Hey, Scripting Guy! Is it possible to get a list of all the domain controllers in my domain?— KT Hey, KT. As a matter of fact, there are at least two ways to get a list of all domain controllers in your domain. The first way is pretty easy, but not guaranteed; depending on how…

7

How Can I Rename an Active Directory Group?

Hey, Scripting Guy! How can I rename an Active Directory group?— CL Hey, CL. This is actually pretty easy; as you’ll see, it only takes two lines of code. It’s not a hard problem, it’s just a little bit tricky. That’s because ADSI (at least when it comes to dealing with Active Directory) does not…

4

How Can I Run a Script Under Alternate Credentials?

Hey, Scripting Guy! Is there a way for me to log on to a computer using a regular user account, but then run a script as a domain administrator?— WW Hey, WW. In answer to your question, yes, both WMI and ADSI provide a way for you to run a script under alternate security credentials;…

3

How Can I Map Drives Based on Membership in a Group?

Hey, Scripting Guy! How can I map drives in a logon script based on a security group each user belong to?— RO Hey, RO. Considering the fact that this question has been asked by approximately 3,755,392 of our readers – oops, there’s another one; make that 3,755,393 of our readers – we decided it might…

7

How Can I Rename Files Based on the File’s Creation Date?

Hey, Scripting Guy! I have a folder that contains a bunch of log files. I would like to rename each file based on the date the file was created; for example, if a file was created on December 1, 2004, I’d like to rename it 20041201.log. Is that possible?— CK Hey, CK. Listen, when it…

1