Jump to content

JamesOFarrell

Member
  • Posts

    2
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Australia

About JamesOFarrell

JamesOFarrell's Achievements

0

Reputation

  1. I fixed this issue by including the file adsmsext.dll on the WinPE disk. EDIT: Typo
  2. We have been using this to enable ADSI in WinPE for a few months now. This has been working flawlessly for creating computer objects in AD and setting some attributes (like guid/description). I tried to update my code to allow the new computer object to be added to groups after it has been created. This works fine under Vista/XP but fails under WinPE. I get the error "Object does not support this property or method." set objLDAP = GetObject("LDAP:") PreStageUsername = "DOMAIN\username" PreStagePassword = "password" GroupPath = "LDAP://Domain.Com/CN=GroupName,OU=Groups,DC=Domain,DC=com" Set objGroup = objLDAP.OpenDSObject(GroupPath, PreStageUsername, PreStagePassword, 0) ComputerPath = "LDAP://Domain.Com/CN=ComputerName,OU=Computers,DC=Domain,DC=com" Set objComp = objLDAP.OpenDSObject(ComputerPath, PreStageUsername, PreStagePassword, 0) msgbox objGroup.Get("sAMAccountName") objGroup.Add(objComp.ADsPath) msgbox objGroup.IsMember(objComp.ADsPath) In Vista/XP this displays the "sAMAccountName" of the Group Object, adds the Computer Object as a member of the Group Object then displays "True" In WinPE this displays the "sAMAccountName" of the Group Object, then crashes out with the above error. If you remove the objGroup.Add(objComp.ADsPath) line then the scripts will error out on the msgbox objGroup.IsMember(objComp.ADsPath) line with the same error. If I replace objComp.ADsPath with the ADs Path "LDAP://Domain.Com/CN=ComputerName,OU=Computers,DC=Domain,DC=com" it still bombs out. Does anyone know what is going on here?
×
×
  • Create New...