Hi Guys,
Need some help/suggestions on using OpenDSObject.
Just as a reminder, this is a method to bind to an object using WinNT or LDAP providers. Its importance is that it allows binding to a remote object using ALTERNATE credentials.
The single example I have seen uses this code:
However when I try to use this or a variation of it, I simply get the following error message:
Microsoft VBScript compilation error: Cannot use parentheses when calling a Sub
The above is an example I found on the internet. I'm actually trying to ennumerate local group membership on a remote server. However my script bombs out with the same error message.
PLEASE NOTE, CORRECT SUBSTITUTION IS MADE IN THE ABOVE STRING - BUT THE ERROR OCCURS EVEN BEFORE THE CODE EXECUTES
Now I've tried to cut this in various ways, but it always bombs out with some kind of error.
Does anybody know how to make this work?
If this cant work, does anybody know if there are any other simple methods of quering remote group membership, without using the WinNT or LDAP providers?
Need some help/suggestions on using OpenDSObject.
Just as a reminder, this is a method to bind to an object using WinNT or LDAP providers. Its importance is that it allows binding to a remote object using ALTERNATE credentials.
The single example I have seen uses this code:
Code:
userName = "login"
oldPasswd = "oldPasswd"
newPasswd = "newPasswd"
Set obj = GetObject("WinNT:")
Set dom = "orion"
obj.OpenDSObject("WinNT://myWinNTDomain","myWinNTDomain\anAdministrator","adminPassword", 1)
for each usr in dom
if usr.Name = userName Then
exit for
End if
Next
Microsoft VBScript compilation error: Cannot use parentheses when calling a Sub
The above is an example I found on the internet. I'm actually trying to ennumerate local group membership on a remote server. However my script bombs out with the same error message.
PLEASE NOTE, CORRECT SUBSTITUTION IS MADE IN THE ABOVE STRING - BUT THE ERROR OCCURS EVEN BEFORE THE CODE EXECUTES
Now I've tried to cut this in various ways, but it always bombs out with some kind of error.
Does anybody know how to make this work?
If this cant work, does anybody know if there are any other simple methods of quering remote group membership, without using the WinNT or LDAP providers?