Showing archive results for April 2005

Apr 15, 2005
Post comments count0
Post likes count0

How Can I Search a Text File for 9-Digit Numbers?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I search for user names in a text file? In my case, the user names all consist of 9 digits, although they can be any 9 digits.-- GG Hey, GG. Interesting question. You want to search for 9-digit numbers (like 123456789) in a text file; the only problem is that these could be any 9-digit numbers. And that definitely is ...

Scripting Guy!scripting techniquesVBScript
Apr 14, 2005
Post comments count0
Post likes count0

How Can I Display a Multi-Valued Attribute Returned from an Active Directory Search?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I display a multi-valued attribute that I get back when using ADO to search Active Directory?-- ES Hey, ES. For the most part Active Directory is a script writer’s paradise; with very few exceptions anything you can do using the Active Directory snap-ins and GUI tools you can also do using a script. Of course, that do...

Scripting Guy!VBScriptActive Directory
Apr 13, 2005
Post comments count0
Post likes count0

How Can I Eliminate Duplicate Names in a Text File?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I have a text file that contains a bunch of names. How can I read through that text file and eliminate all the duplicate names?-- MW Hey, MW. We’re assuming you have a text file that looks something like this:Ken Myer Dean Tsaltas Jonathan Haas Ken Myer Dean Tsaltas Syed Abbas Gail Erickson Carol Phillips Dean Tsaltas Dylan M...

Scripting Guy!scripting techniquesVBScript
Apr 12, 2005
Post comments count0
Post likes count0

Hey, Scripting Guy! How Can I Bind to a User Account Using Something Other Than the CN Attribute?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! Can I bind to an Active Directory account using the user’s mailNickname or their sAMAccoutName, something other than the CN?-- MB Hey, MB. When you bind to an account in Active Directory, you need to pass GetObject the account’s ADsPath. That means you need to use a line of code similar to this: The ADsPath is act...

Scripting Guy!VBScriptActive Directory
Apr 11, 2005
Post comments count0
Post likes count0

How Can I Insert a Column into a Spreadsheet?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I insert a column into an Excel spreadsheet?-- HE Hey, HE. Let’s assume you have a spreadsheet that looks something like this: And, yes, it is a very nice little spreadsheet, except for one problem. As you can see, we goofed, and we forgot to insert Dataset 3; instead, we only have Datasets 1, 2, and 4. Even worse, D...

Scripting Guy!VBScriptOffice