I need to develop a script that will compare a user account in an old NT4
domain to the new AD domain to see if the logon script entry matches. I
will need to have input boxes for the NT and AD domains. If the entry does
not match I will log it to a text file.

The main trouble I am having is the how to access all the user accounts for
a domain, compare it to the AD domain. I don't know how to enumerate that
account property to compare it. I have dozens of domains and thousands of
users...

I always get great advice here!

Thanks in Advance.

RE: Compare profile/logon script on accounts on old domain/AD domain by ESP

ESP
Mon Nov 07 10:55:07 CST 2005

NT 4.0 Domain Directory Services works with the GetObject and not the LDAP
way of AD ;-)

This is a generic layout to query NT 4.0 DS for Users:

Set objDomain = GetObject("WinNT://YourDomainName")
objDomain.Filter = Array("User")
For Each objUser in objDomain
Wscript.Echo "User name: " & objUser.Name
Wscript.Echo "Description: " & objUser.Description
Wscript.Echo "Logon script path: " & objUser.LoginScript
Wscript.Echo
Next


ESP



"GAZ" wrote:

> I need to develop a script that will compare a user account in an old NT4
> domain to the new AD domain to see if the logon script entry matches. I
> will need to have input boxes for the NT and AD domains. If the entry does
> not match I will log it to a text file.
>
> The main trouble I am having is the how to access all the user accounts for
> a domain, compare it to the AD domain. I don't know how to enumerate that
> account property to compare it. I have dozens of domains and thousands of
> users...
>
> I always get great advice here!
>
> Thanks in Advance.
>
>
>

Re: Compare profile/logon script on accounts on old domain/AD domain by rwh

rwh
Mon Nov 07 14:39:29 CST 2005

You can use this on your 2000 Domain to export all users and which
logon script they run.

ldifde -f users.txt -d "ou=users,dc=mydomain,dc=domain,dc=com" -r
objectClass=user -l scriptPath


Re: Compare profile/logon script on accounts on old domain/AD domain by GAZ

GAZ
Mon Nov 07 15:02:47 CST 2005

Thanks, but doesn't really help in this case. I would have to create a
script to export the OUs and the run a for /f to go down the list then I
still have to create another script to compare with the output which I might
have to format. I think it'd be much easier to handle the data inside the
SAM and the directory. I'm just not quite there in my skills.


<rwh@rodharrison.com> wrote in message
news:1131395969.703494.153780@g14g2000cwa.googlegroups.com...
> You can use this on your 2000 Domain to export all users and which
> logon script they run.
>
> ldifde -f users.txt -d "ou=users,dc=mydomain,dc=domain,dc=com" -r
> objectClass=user -l scriptPath
>