|
Guy recommends :
Find out which of your VMs are a waste of space and which VMs need more resources.
|
VBScript - Setting PasswordsIntroduction to Setting PasswordsNote 1: I have a new VBScript to Set Passwords Note 2: I have a new script to force users to change password at next logon When it comes to creating users, VBScript has a great advantage over CSVDE and that is it can set user passwords. Another benefit of using VBScript it that you can change properties in general, and passwords in particular. CSVDE only adds NEW user and computer objects to Active Directory. As well as showing you how to master the .SetPassword command, I have alternative examples which make learning points about space as in white space; and also the use of variables. VBScript Example 1' VBScript to create set a user's password Note 1: The power of this VBScript comes from the GetObject and the .SetPassword verbs. Note 2: If you try this script, then alter the LDAP path cn=Jeff1,ou=Droitwich,dc=cp,dc=com to reflect your domain and OU. Note 3: The WScript.Echo statement is not strictly necessary in this password script, but I like confirmation that action took place. Here are Alternative VBScripts to reset passwordsSpot the difference between Example 1 (above) and Example 2?VBScript Example 2' VBScript to create set a user's password Note 1: The difference is on line 4. There is space, as in spacebar, at the very beginning of the line and that causes VBScript to halt. A string variable example of setting a passwordBy using a string variable to control the actual password, you could have the passwords in one of the columns of an import spreadsheet. The other factor if you were importing would be a Do... Loop until to read through each row of users.
Guy Recommends: SolarWinds' Free Bulk Import Tool
|
||||
Custom Search
|
Guy Recommends: WMI Monitor and It's Free!
|
|
Author: Guy Thomas Copyright © 1999-2012 Computer Performance LTD All rights reserved. Please report a broken link, or an error to: | |