Announcement

Collapse
No announcement yet.

connect to remote active diectory use vbscript

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • connect to remote active diectory use vbscript

    dear all,
    i connect to AD 2012 use VB script use following script:
    Set objDSO = GetObject("LDAP:")
    Set objRootDSE = objDSO.OpenDSObject("LDAP://cn=test,OU=Domain controllers,dc=lab,dc=com","lab\administrator", "[email protected]",1)
    set objOU = GetObject("LDAP://ou=acc,dc=lab,dc=com")
    For each objUser in objOU
    If (objUser.class="user" AND objUser.sAMAccountName = straccount) then
    objUser.SetPassword strPassd
    objUser.SetInfo

    if i have login to domain controller i run this script i work fine.

    but when i login to domain member ( join to domain) with normal permission on AD then run this script i get error: permission dined.

    could anyone suggest me resolve this issue?

    thanks in advance.

Working...
X