Bad link, sorry. This example queries for all users that have the
msNPAllowDialin attribute value set.

http://www.microsoft.com/technet/scriptcenter/resources/qanda/aug05/hey0
825.mspx

Tony

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tony Murray
Sent: Tuesday, 10 January 2006 11:17 a.m.
To: [email protected]
Subject: RE: [ActiveDir] OT: Scripting Issue.

More info on this here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rras/rr
as/rasadminusersetinfo.asp

Tony

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Erik Brown
Sent: Tuesday, 10 January 2006 11:06 a.m.
To: [email protected]
Subject: [ActiveDir] OT: Scripting Issue.

I have a script that I run in an ASP page to list all RAS Users as a
check to make sure that we don't have anyone with permissions that
shouldn't have them. However, I'm finding now that we are migrating to
W2k3 that this script doesn't work on 2k3. I read in a newsgroup that
the "RasPermissions"
in ADSI was removed due to security concerns. Is this correct? Is there
another way to access this information via ADSI?
 
<Script is below>

Thanks,
Erik


Function ReportRasUsers()
If DOM = "" Then DOM = "corp"
strRasUsers="<Table id="""& "table1""" & " cellspacing=""" & "1""" & "
cellPadding=""" & "1""" & " width="""& "500""" & " border="""& "1"""  &
">"
strRasUsers=strRasUsers & "<TH>User Name</TH><TH>Full Name</TH><TH>RAS
Type</TH>"
Dim AccountObj,MachObj,PassAge,fs,fsOut,strRasUsers,strFN
Set AccountObj = GetObject("WinNT://"&DOM)

AccountObj.Filter = Array("User")
For Each User In AccountObj
        Set UserObj = GetObject("WinNT://" &DOM&"/" & User.Name)
        Ras=UserObj.get("RasPermissions")
        strFN=UserObj.get("FullName")
        
    If Ras=9 Then 
                strRasUsers=strRasUsers & "<TR><TD>" & User.Name &
"</TD><TD>"& strFN & "</TD><TD>No Dial Back</TD></TR>"
    ElseIf Ras=10 Then 
                strRasUsers=strRasUsers & "<TR><TD bgcolor=""" & "Red"""
& ">" & User.Name & "</TD><TD bgcolor=""" & "Red""" & ">"& strFN &
"</TD><TD bgcolor=""" & "Red""" & ">Dial Back Enabled</TD></TR>"
    ElseIf Ras=12 Then 
                strRasUsers=strRasUsers & "<TR><TD bgcolor=""" & "Red"""
& ">" & User.Name & "</TD><TD bgcolor=""" & "Red""" & ">"& strFN &
"</TD><TD bgcolor=""" & "Red""" & ">Dial Back Enabled</TD></TR>"
    End If
    
Next
response.Write(strRasUsers)
End Function



List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive:
http://www.mail-archive.com/activedir%40mail.activedir.org/

r.org/


This communication, including any attachments, is confidential. If you
are not the intended recipient, you should not read it - please contact
me immediately, destroy it, and do not copy or use any part of this
communication or disclose anything about it. Thank you. Please note that
this communication does not designate an information system for the
purposes of the Electronic Transactions Act 2002.

List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive:
http://www.mail-archive.com/activedir%40mail.activedir.org/

.org/


List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/

Reply via email to