VbsEdit, the award-winning VBScript editor that dramatically reduces the time you spend writing .VBS scripts

Sample scripts


Active Directory
   Computer Accounts
       Copy an Active Directory Computer Account , LDAP

' Copy an Active Directory Computer Account


Set objCompt = _
    GetObject("LDAP://cn=Computers,dc=NA,dc=fabrikam,dc=com")
Set objComptCopy = objCompt.Create("computer""cn=SEA-SQL-01")
objComptCopy.Put "sAMAccountName""sea-sql-01"
objComptCopy.SetInfo
 
Set objComptTemplate = GetObject _
    ("LDAP://cn=SEA-PM-01,cn=Computers,dc=NA,dc=fabrikam,dc=com")
arrAttributes = Array("description""location")
 
For Each strAttrib in arrAttributes
    strValue = objComptTemplate.Get(strAttrib)
    objComptCopy.Put strAttrib, strValue
Next
 
objComptCopy.SetInfo



VbsEdit includes all these samples!



Download version 3.4.1
Released Friday, December 19, 2008  -   The evaluation version never expires


Home   Buy Now   HtaEdit   Support   Video   What's new ?   Awards

Copyright (C) 2001-2009 Adersoft