My script is running a command that returns me a list of computer objects that I need to move to another OU. I can connect to the domain using:
<script>
Set DomainObj = GetObject("WinNT://" & DomainString)
</script>
and then delete the computers with:
<script>
DomainObj.Delete "computer", CompString
</script>
Unfortunately, I don't want to delete them, I just want to move them to a different OU.
If I could derive the OU from the WinNT, I think I could connect with LDAP & do the move.
Or is there a way to connect the LDAP without knowing the current OU?
<script>
Set DomainObj = GetObject("WinNT://" & DomainString)
</script>
and then delete the computers with:
<script>
DomainObj.Delete "computer", CompString
</script>
Unfortunately, I don't want to delete them, I just want to move them to a different OU.
If I could derive the OU from the WinNT, I think I could connect with LDAP & do the move.
Or is there a way to connect the LDAP without knowing the current OU?