auto detect user account type

G

Guest

Hi,

Is there a way how to auto detect (via VBS script for example) the user
account type ? (i.e : administrator, user, power user,..)

I do not want to use "windows console" from Active Directory, because it
seems that if account type is change on local computer, AD (active directory)
is not able to detect this change (info from my colleague who is responsible
of AD server).

So, as i would like to ensure that my team members did well their work, i
would like to have (for example) in the logon script, some VBS to detect and
collect this user account type.

thanks a lot,

M.
 
R

Ramesh, MS-MVP

Here are some sample WMI scripts.

User Accounts:
http://www.microsoft.com/technet/scriptcenter/scripts/ds/local/users/default.mspx?mfr=true

You can create/modify a script to check if the current user name is a member of one of the following groups:

1. Administrators
2. Guests
3. Power Users

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Hi,

Is there a way how to auto detect (via VBS script for example) the user
account type ? (i.e : administrator, user, power user,..)

I do not want to use "windows console" from Active Directory, because it
seems that if account type is change on local computer, AD (active directory)
is not able to detect this change (info from my colleague who is responsible
of AD server).

So, as i would like to ensure that my team members did well their work, i
would like to have (for example) in the logon script, some VBS to detect and
collect this user account type.

thanks a lot,

M.
 
P

Pegasus \(MVP\)

Maileen said:
Hi,

Is there a way how to auto detect (via VBS script for example) the user
account type ? (i.e : administrator, user, power user,..)

I do not want to use "windows console" from Active Directory, because it
seems that if account type is change on local computer, AD (active directory)
is not able to detect this change (info from my colleague who is responsible
of AD server).

So, as i would like to ensure that my team members did well their work, i
would like to have (for example) in the logon script, some VBS to detect and
collect this user account type.

thanks a lot,

M.

A user's status is determined by his group memberships. Here is
how you can extract them in your logon script:

@echo off
net user "%UserName%" | find "*"

To find out if a user has administrative privileges, pipe the output of
this line into a further "find.exe" command and look for "administrator".
 
A

--== Alain ==--

Sorry but does mean GetObject("WinNT://" & strComputer & "")
basically i understood that GetObject will retrieve automation from a
file specified by WinNT:// & strComputer.

but what does mean WinNT:// ? the OS root folder ?

thx,

Al.
 
R

Ramesh, MS-MVP

Al,

It's a WMI provider used to access user account info.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Sorry but does mean GetObject("WinNT://" & strComputer & "")
basically i understood that GetObject will retrieve automation from a
file specified by WinNT:// & strComputer.

but what does mean WinNT:// ? the OS root folder ?

thx,

Al.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top