PC Review


Reply
Thread Tools Rate Thread

auto detect user account type

 
 
=?Utf-8?B?TWFpbGVlbg==?=
Guest
Posts: n/a
 
      19th Jan 2007
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.
 
Reply With Quote
 
 
 
 
Ramesh, MS-MVP
Guest
Posts: n/a
 
      19th Jan 2007
Here are some sample WMI scripts.

User Accounts:
http://www.microsoft.com/technet/scr....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


"Maileen" <(E-Mail Removed)> wrote in message news:414D0545-B07A-434E-9D7B-(E-Mail Removed)...
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.
 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      19th Jan 2007

"Maileen" <(E-Mail Removed)> wrote in message
news:414D0545-B07A-434E-9D7B-(E-Mail Removed)...
> 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".


 
Reply With Quote
 
--== Alain ==--
Guest
Posts: n/a
 
      19th Jan 2007
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.

Ramesh, MS-MVP wrote:
> Here are some sample WMI scripts.
>
> User Accounts:
> http://www.microsoft.com/technet/scr....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
>

 
Reply With Quote
 
Ramesh, MS-MVP
Guest
Posts: n/a
 
      19th Jan 2007
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


"--== Alain ==--" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
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.

Ramesh, MS-MVP wrote:
> Here are some sample WMI scripts.
>
> User Accounts:
> http://www.microsoft.com/technet/scr....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
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Detect if a local user/group account exists Roshan Microsoft Dot NET Framework 5 2nd Jul 2006 12:34 PM
Detect if a local user/group account exists Roshan Microsoft Dot NET 5 2nd Jul 2006 12:34 PM
Auto detect echange server and user name =?Utf-8?B?QmlnLUQ=?= Microsoft Outlook Discussion 1 14th Dec 2005 08:30 PM
Connection Type 'Auto Detect' always resets after reboot =?Utf-8?B?RGFpbmU=?= Microsoft Windows 2000 Networking 0 23rd Mar 2005 07:13 PM
Auto detect content-type Grzegorz Kaczor Microsoft ASP .NET 1 7th Feb 2005 04:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:55 PM.