To verify that the configuration worked and the machine is reachable via WMI and ADSI you might do something like the following
We used this command to verify if WMI could be executed against remote machines in order to verify connectivity.
WMIC /node:clientpc /user:clientpc\administrator /password:password computersystem get totalphysicalmemory
For ADSI a script kinda like the one below to check if our ADSI WINNT:// calls function. We could modify the script below to just check for local group/user membership and use it
Dim objLocalGroup, objDomainGroup, objMember
' Bind to the local group.
Set objLocalGroup = GetObject("WinNT://MyComputer/Administrators,group")
' Bind to the domain group.
Set objDomainGroup = GetObject("WinNT://MyDomain/TestGroup,group")
' Enumerate direct members of the local group.
For Each objMember In objLocalGroup.Members
' Check if member also a member of the domain group.
If (objDomainGroup.IsMember(objMember.ADsPath) = True) Then
Wscript.Echo "Member " & objMember.Name & " is a member of the domain group"
Wscript.Echo "Member " & objMember.Name & " is NOT a member of the domain group"
January 2, 2018
I am willing to pay higher rates for the most experienced freelancers