It is currently Sun Sep 05, 2010 3:14 am
News of Windows Server Administration
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSMBIOS = objWMIService.ExecQuery _
("Select * from Win32_SystemEnclosure")
For Each objSMBIOS in colSMBIOS
Wscript.Echo "Serial Number: " & objSMBIOS.SerialNumber
Next
'###########Script created by Praveen Kumar##################
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("./users.txt", 1) ' text file input for list of users
Do until objFile.AtEndOfStream
strPassword = "Password" 'enter the default password
intPwdValue = "0"
Line = objFile.ReadLine
Set objUser = GetObject("LDAP://" & Line)
If objUser.class="user" then ' just to make sure the object is user or not
objUser.SetPassword strPassword
objUser.Put "PwdLastSet", intPwdValue ...
Total posts 113 • Total topics 92 • Total members 34