Re: Add Domain User to Local Power Users group.
From: Al Dunbar [MS-MVP] (alan-no-drub-spam_at_hotmail.com)
Date: 02/08/05
- Next message: Al Dunbar [MS-MVP]: "Re: Copy files with rename messagebox"
- Previous message: Steve Seguis [MVP]: "Re: GUI Scripting applications?"
- In reply to: Torgeir Bakken \(MVP\): "Re: Add Domain User to Local Power Users group."
- Next in thread: Torgeir Bakken \(MVP\): "Re: Add Domain User to Local Power Users group."
- Reply: Torgeir Bakken \(MVP\): "Re: Add Domain User to Local Power Users group."
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 7 Feb 2005 19:56:41 -0700
"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:eo6b93WDFHA.560@TK2MSFTNGP15.phx.gbl...
> Arsi wrote:
>
> > This script works if the user is "Power User" or "Administrator" locally
> > but if it is a "Domain User" it doesn't. Anyone have a clue what to do?
> > I want to run it against all my users in domain. Yes I know I could do
> > this via GPO but I don't want to do that. I would only like to use this
> > script once so everyone would be Power User in their own computer.
> >
> > on error resume next
> > Set objNet = CreateObject("WScript.NetWork")
> > Dim strComputer
> > Dim strUser
> > strComputer = objNet.ComputerName
> > strUser = objNet.UserName
> >
> > Set objGroup = GetObject("WinNT://" & strComputer & "/Power Users")
> > Set objUser = GetObject("WinNT://MyDomain/" &strUser)
> > objGroup.Add(objUser.ADsPath)
> Hi
>
> As the current user account only have ordinary user rights, the
> script will not be able to add the account to a group.
>
> You could do it in a computer startup script (with a GPO) that runs
> as part of the boot up process (before the user logs in). It runs
> under the system context and has admin rights.
Or you could run a remote script against the workstations to do this from an
admin workstation. Since you seem to want ANY user who can logon to be a
power user, perhaps the easiest would be to add some global group that all
users are a member of, instead of adding individual domain accounts. I would
suggest using the "authenticated users" group.
/Al
- Next message: Al Dunbar [MS-MVP]: "Re: Copy files with rename messagebox"
- Previous message: Steve Seguis [MVP]: "Re: GUI Scripting applications?"
- In reply to: Torgeir Bakken \(MVP\): "Re: Add Domain User to Local Power Users group."
- Next in thread: Torgeir Bakken \(MVP\): "Re: Add Domain User to Local Power Users group."
- Reply: Torgeir Bakken \(MVP\): "Re: Add Domain User to Local Power Users group."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|