Re: Script needed: Users with Remote Access permissions on a server
- From: "Al Dunbar" <AlanDrub@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 15 Jan 2008 00:11:57 -0700
"Richard Mueller [MVP]" <rlmueller-nospam@xxxxxxxxxxxxxxxxxxxx> wrote in
message news:%23FDMkWvVIHA.4740@xxxxxxxxxxxxxxxxxxxxxxx
"eaguilar" <eaguilar@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:62352391-0004-4706-A6B3-4400EADDCD4E@xxxxxxxxxxxxxxxx
Does anybody have an idea how to write a vbs script to list all users
with
Remote Access permissions on a server?
Microsoft's "Scripting guy" archive has a script that lists all users
with
such permission, but it queries the domain controller for the full list:
<code>
objCommand.CommandText = _
"SELECT Name FROM 'LDAP://dc=fabrikam,dc=com' WHERE
objectCategory='user' " & "AND msNPAllowDialin = TRUE"
</code>
I need to query a particular server or list of servers.
Permissions for "Remote Desktop" and Terminal Services are for the domain,
not specific computers or servers. I believe a user must have
msNPAllowDialin set equal to TRUE and they must be members of the builtin
group "Remote Desktop Users". The later is a domain local group.
As I understand it, msNPAllowDialin is not required to access a system using
RDP, only to achieve a dialup connection into the network. And if you can
dialin to a computer, I do not think you need to have "remote desktop"
permission, unless you are actually going to use RDP.
In order to RDP to my own workstation, I had to enable remote access (my
computer - properties - remote - allow users to connect remotely to this
computer) and add my domain account to the "Remote Desktop Users" group
local to the workstation (i.e. not a domain group).
/Al
To access any machine remotely with WMI you must be a member of the local
Administrators group on the computer. By default when the computer is
joined to the domain the group "Domain Admins" is added to the local
Administrators group. If you need to enumerate all members of the local
Administrators group, you can use the script linked here:
http://www.rlmueller.net/Enumerate%20Local%20Group.htm
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--
.
- References:
- Re: Script needed: Users with Remote Access permissions on a server
- From: Richard Mueller [MVP]
- Re: Script needed: Users with Remote Access permissions on a server
- Prev by Date: Re: open latest file
- Next by Date: Re: calling executable program
- Previous by thread: Re: Script needed: Users with Remote Access permissions on a server
- Next by thread: execute vbscript when mail arrives to mailbox/outlook
- Index(es):
Relevant Pages
|