Daniel Schröter's Blog
  • Home
  • About
  • Impressum
KEEP IN TOUCH

How Can I Find All the Users with Remote Access Permissions?

Mrz19
2008
Kommentieren Geschrieben von Daniel

Jeder der ein Windows Server besitzt und VPN aktiv hat benötigt irgendwann eine Liste mit allen usern die “Allow Access” aktiviert haben.

Folgendes Script in eine .vbs Datei kopieren und mit cscript myscript.vbs > c:\logallowaccess.txt ausführen. Dann werden alle user die unter Dial-In, Allow Access aktiviert haben unter C:\logallowaccess.txt abgespeichert.

Bemerkung: Vorher muss im script die zeile “SELECT Name FROM ‘LDAP://dc=domaene,dc=com’ WHERE objectCategory=’user’ ” & _” editiert werden. (dc=domaene und dc=com)
On Error Resume Next

Const ADS_SCOPE_SUBTREE = 2

Set objConnection = CreateObject(“ADODB.Connection”)
Set objCommand = CreateObject(“ADODB.Command”)
objConnection.Provider = “ADsDSOObject”
objConnection.Open “Active Directory Provider”
Set objCommand.ActiveConnection = objConnection

objCommand.Properties(“Page Size”) = 1000
objCommand.Properties(“Searchscope”) = ADS_SCOPE_SUBTREE

objCommand.CommandText = _
“SELECT Name FROM ‘LDAP://dc=domaene,dc=com’ WHERE objectCategory=’user’ ” & _
“AND msNPAllowDialin = TRUE”
Set objRecordSet = objCommand.Execute

objRecordSet.MoveFirst
Do Until objRecordSet.EOF
Wscript.Echo objRecordSet.Fields(“Name”).Value
objRecordSet.MoveNext
Loop

Quelle:

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

http://www.microsoft.com/technet/scriptcenter/resources/qanda/aug04/hey0817.mspx

Geposted in Tipps&Tricks, Win Stuff
Weiterempfehlen: Twitter Facebook Delicious StumbleUpon E-mail
« Warcraft III patch 1.22 Changelog
» HP Care Pack Umregistrierung bei Gerätetausch

Zur Zeit keine Kommentare

Hinterlasse eine Antwort Antworten abbrechen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *

*

*

Du kannst folgende HTML-Tags benutzen: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Letzte Kommentare

  • toto bei 5 Euro Gutschein für computeruniverse.net
  • lehmann bei winlogon.exe – Komponente nicht gefunden (XmlLite.dll)
  • Truk bei Youporn Alternativen
  • Uta Dmoch bei winlogon.exe – Komponente nicht gefunden (XmlLite.dll)
  • Katja bei WLAN-Leistung verstärken (N80 bzw alle WLAN-fähigen Smartphones)

Kategorien

  • Allgemein (39)
  • Börse (6)
  • Coding (7)
    • C (1)
    • PHP (4)
  • eBooks (3)
  • Forex Stuff (2)
  • Games (3)
  • General (3)
  • Handy Stuff (4)
  • Hardware (2)
  • Informatives (5)
  • iPhone (1)
  • Lesenswertes (12)
  • Linux Stuff (20)
    • Plesk (7)
  • Mac Stuff (14)
    • Bugs (1)
    • Tipps&Tricks (6)
  • News (1)
  • SAP (1)
  • Security Informations (14)
  • SEO (2)
  • SEO @en (1)
  • Stock market (1)
    • Forex (1)
  • Testberichte (1)
  • Vorlagen (9)
  • Web Stuff (3)
  • Win Stuff (56)
    • Bugs (21)
    • Downloads (4)
    • Tipps&Tricks (28)
  • XXX (1)

RSS

  • Artikel-Feed (RSS)
  • Kommentare als RSS

Tags

abo abzocke auslesen SN Handy authentication verschwunden Chartformationen Charting demekon ag Domains Expert Advisors fishing page Forderung gegen Handy IMEI handy seriennummer Handy sn herrausfinden IMEI aus handy auslesen IMEI auslesen Indikatoren linux linux commands mac office setup assistent Metatrader mysql login office 2008 sp1 office 2008 SP1 bug office setup assistent online abo abzocke online abos outlook sicherheitswarnungen porn routerpws schleife beim sp1 update sp3 bug SP3 IEEE 802.1X Authentication aktivieren sp3 lan authentication Sparschwein ag betrug std routerpasswörtern Technische Analyse Trendanalyse Tube8 tux cmds U+C Rechtsanwälte victim xserv xVideos Zugriff gewählen beim Outlook

EvoLve theme by Theme4Press  •  Powered by WordPress Daniel Schröter's Blog
blog.danielschroeter.de

close