Browse CLASSROOM TRAINING REGISTER for classroom training CONTACT us

SAPIEN Solutions

SAPIEN homepage
PrimalScript script editor+ide
PrimalScope script debugger
Free Tools script utilities
SAPIEN Press tech books
ScriptingAnswers.com learn+share
ScriptingOutpost.com online store
Blog.Sapien.com official blog
Contact Us

 

Archive for the ‘VBScript Scripts’ Category

Writing an LDAP Search Filter

Thursday, April 10th, 2008 by Don Jones
 http://confluence.atlassian.com/display/DEV/How+to+write+a+LDAP+search+filter is a great article on writing LDAP search filters.…   More »

Target a list of names

Friday, February 15th, 2008 by Essentials Administrator
 If you have a file with one name per line - be they user names, or more commonly computer names, this script will read them all and execute a block of your code for each name in the file. The comments provide an example that you can completely replace. The…   More »

Targeting Active Directory objects (users, computers, etc)

Friday, February 15th, 2008 by Essentials Administrator
 Here's a great example of how to do something to every user, computer, or other object in the directory. This enumerates through every object, recursing the entire directory. ' ' ScriptingAnswers.com Essentials - by Don Jones ' ' Targeting AD ' This shows how to target every user, computer, '…   More »

Sending keystrokes to applications

Friday, February 15th, 2008 by Essentials Administrator
 The last-resort way of automating anything using VBScript is to launch a GUI application and just send keystrokes (but not mouse movement or clicks - try AutoIt if you need mouse control, too). Here's an example, using Notepad, of how sending keystrokes works. Note that this takes a lot of…   More »

Running command-line tools

Friday, February 15th, 2008 by Essentials Administrator
 These examples show how to run command-line tools from within a VBScript, capturing the tool's output. ' ' ScriptingAnswers.com Essentials - by Don Jones ' ' Run cmdline tools ' This shows how to launch a command-line ' tool and retrieve its output into a string variable ' to then…   More »

Enumerating a hierarchy (like files and folders)

Friday, February 15th, 2008 by Essentials Administrator
 This example uses files and folders, but really any hierarchy - such as Active Directory - uses the same technique. You'll want to really read through this one and understand what it's doing to be able to take advantage of it: It shows how to have a function recursively call…   More »

A VBScript Debug Window

Friday, February 15th, 2008 by Essentials Administrator
 This is one of my favorite tricks for debugging. Rather than adding MsgBox() calls to display variables' contents, I write them to a separate IE window. When I'm done debugging, I uncomment one line (as noted below) to disable the debugging functionality - which is easier than going through and…   More »

Automating Internet Explorer

Friday, February 15th, 2008 by Essentials Administrator
 This quick example shows how to automate Internet Explorer. In this example, I just pop up IE and navigate to a particular page, and then write the page's HTML content out to a local file. ' ' ScriptingAnswers.com Essentials - by Don Jones ' ' Automate IE example ' This…   More »

Alternate Credentials - ADSI and WMI

Friday, February 15th, 2008 by Essentials Administrator
 Here's an example of using alternate credentials to connect to either WMI or ADSI. Note that WMI doesn't allow alternate credentials if you're connecting to the LOCAL computer - only for remote connections. Both of these examples use a function. GetPassword, which I've included. This prompts you for a password…   More »

Checking for group membership

Friday, February 15th, 2008 by Essentials Administrator
 Here's a script that demonstrates how to check for group membership from within VBScript. http://www.rlmueller.net/IsMember8.htm…   More »


Entries (RSS) and Comments (RSS).