ISMEMBER returning 0 
Author Message
 ISMEMBER returning 0

can someone explain why this always returns zero, when in fact, it should be
1.

Set oNet = CreateObject("Wscript.Network")
strLocalDC = "MYDOMAINCONTROLLER"

Set usr = GetObject("WinNT://" & strLocalDC & "/" & oNet.UserName & ",User")
Set group = GetObject("WinNT://MYDOMAIN/GL SOMEGROUP")
wSCRIPT.ECHO group.IsMember(usr.ADSPATH)



Sun, 02 May 2004 02:41:42 GMT  
 ISMEMBER returning 0
I have the same problem !!!



Quote:
> can someone explain why this always returns zero, when in fact, it should
be
> 1.

> Set oNet = CreateObject("Wscript.Network")
> strLocalDC = "MYDOMAINCONTROLLER"

> Set usr = GetObject("WinNT://" & strLocalDC & "/" & oNet.UserName &
",User")
> Set group = GetObject("WinNT://MYDOMAIN/GL SOMEGROUP")
> wSCRIPT.ECHO group.IsMember(usr.ADSPATH)



Sun, 02 May 2004 06:16:43 GMT  
 ISMEMBER returning 0
Try this :

  Dim o
  Set o = GetObject("WinNT://Domain/Group")
  if o.ismember("WinNT://Domain/UserId") = true then
    wscript.echo ("Member in group")
  else
    wscript.echo ("Member not in group")
  End If



Quote:
> I have the same problem !!!



> > can someone explain why this always returns zero, when in fact, it
should
> be
> > 1.

> > Set oNet = CreateObject("Wscript.Network")
> > strLocalDC = "MYDOMAINCONTROLLER"

> > Set usr = GetObject("WinNT://" & strLocalDC & "/" & oNet.UserName &
> ",User")
> > Set group = GetObject("WinNT://MYDOMAIN/GL SOMEGROUP")
> > wSCRIPT.ECHO group.IsMember(usr.ADSPATH)



Sun, 02 May 2004 06:24:34 GMT  
 ISMEMBER returning 0
thanks. will this still work if i go to Native mode ?


Quote:
> Try this :

>   Dim o
>   Set o = GetObject("WinNT://Domain/Group")
>   if o.ismember("WinNT://Domain/UserId") = true then
>     wscript.echo ("Member in group")
>   else
>     wscript.echo ("Member not in group")
>   End If



> > I have the same problem !!!



> > > can someone explain why this always returns zero, when in fact, it
> should
> > be
> > > 1.

> > > Set oNet = CreateObject("Wscript.Network")
> > > strLocalDC = "MYDOMAINCONTROLLER"

> > > Set usr = GetObject("WinNT://" & strLocalDC & "/" & oNet.UserName &
> > ",User")
> > > Set group = GetObject("WinNT://MYDOMAIN/GL SOMEGROUP")
> > > wSCRIPT.ECHO group.IsMember(usr.ADSPATH)



Sun, 02 May 2004 23:15:04 GMT  
 ISMEMBER returning 0
Will this work with SBS?

Thanks

John D

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sun, 26 Sep 2004 15:46:10 GMT  
 ISMEMBER returning 0
Got it working partially but keeps returning the user is not a member
when I know they are.....? Script below:

Dim net, o
  Set net = CreateObject("WScript.Network")
  Set o = GetObject("WinNT://Ntserver1/ITDept")
  If o.ismember("WinNT://Ntserver1/johnd") = True Then
    wscript.echo "Member in group"
  Else
    wscript.echo "Member not in group"
  End if

Have SBS server and I run this from a W2K machines.

Thanks

John D

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sun, 26 Sep 2004 16:46:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. IsMember - I don't get it

2. IsMember in ADSI not working.

3. Ismember method for checing group membership

4. Global & local groups Ismember

5. NT 4.0, user groups, PDC's, BDC's and IsMember

6. IsMember Function

7. isMember function

8. Can a script return a value?

9. search through two text files and return appropriate value

10. Function Returning Array - Losing Dimensions

11. Convert returns to <br>

12. getLocale in Internet Explorer does not return locale of Windows

 

 
Powered by phpBB® Forum Software