Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Re: run powershell always as admin ?

Reply
 
Old 10-23-2007   #1 (permalink)
Joel Jaykul Bennett


 
 

Re: run powershell always as admin ?

I know I'm dredging up an old topic, but I don't see a better answer,
so I thought I'd throw this out there anyway.

On Mar 1, 1:43 pm, "Lee Holmes [MSFT]"
<lee.hol...@xxxxxx> wrote:
Quote:

> In Vista's UAC model, you don't enable your Administrator rights for an
> application until you've gone through an elevation prompt. So yes, this
> means that you will be required to type in your credentials (or click "OK")
This is not necessarily true -- you can use a scheduled task ...
Quote:
Quote:
Quote:

> >> > Is there a way to create a shortcut or link that has "run as
> >> > administrator" applied automatically? So that I do not have to bother
> >> > to rightclick and can use keyboard shortucts to run the powershell?
In Vista, if you type "Powershell" into the start menu and then press
CTRL+SHIFT+ENTER, you should get the elevation prompt without any need
for mouse interaction. Of course, you can also use a scheduled task,
if you're running in an account that's a member of the
"administrators" group...
Quote:
Quote:

> > This approach would still require me to enter the password for the
> > admin account each time I run the shell.
If you're using an account which is a member of the administrators
group, you can create a "scheduled" task, set it to run "with highest
privileges" and allow it to be run manually. The task can only be run
by your user account, so you're still protected against other users,
and it has to be run through scheduled tasks (so it's not a proper
'setuid' replacement), but it works. I posted about it awhile back
here:

http://huddledmasses.org/vista-setui...out-prompting/


My System SpecsSystem Spec
Old 10-24-2007   #2 (permalink)
Oisin Grehan


 
 

Re: run powershell always as admin ?

On Oct 23, 12:57 pm, Joel Jaykul Bennett <Jay...@xxxxxx> wrote:
Quote:

> I know I'm dredging up an old topic, but I don't see a better answer,
> so I thought I'd throw this out there anyway.
>
> On Mar 1, 1:43 pm, "Lee Holmes [MSFT]"
>
> <lee.hol...@xxxxxx> wrote:
Quote:

> > In Vista's UAC model, you don't enable your Administrator rights for an
> > application until you've gone through an elevation prompt. So yes, this
> > means that you will be required to type in your credentials (or click "OK")
>
> This is not necessarily true -- you can use a scheduled task ...
>
Quote:
Quote:

> > >> > Is there a way to create a shortcut or link that has "run as
> > >> > administrator" applied automatically? So that I do not have to bother
> > >> > to rightclick and can use keyboard shortucts to run the powershell?
>
> In Vista, if you type "Powershell" into the start menu and then press
> CTRL+SHIFT+ENTER, you should get the elevation prompt without any need
> for mouse interaction. Of course, you can also use a scheduled task,
> if you're running in an account that's a member of the
> "administrators" group...
>
Quote:
Quote:

> > > This approach would still require me to enter the password for the
> > > admin account each time I run the shell.
>
> If you're using an account which is a member of the administrators
> group, you can create a "scheduled" task, set it to run "with highest
> privileges" and allow it to be run manually. The task can only be run
> by your user account, so you're still protected against other users,
> and it has to be run through scheduled tasks (so it's not a proper
> 'setuid' replacement), but it works. I posted about it awhile back
> here:
>
> http://huddledmasses.org/vista-setui...out-prompting/
Sounds like a good basis for a new sidebar widget that can launch a
pre-set list of commonly used setuid apps. Any APIs for this?

- Oisin

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Launching process with Admin Credentials with out prompting user for Admin password PowerShell
Admin access to Vista Registry Remote & locally in Admin Approval Vista security
Modify PowerShell prompt when running as admin PowerShell
problem using Microsoft.Exchange.Management.PowerShell.Admin from C# PowerShell
run powershell always as admin ? PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46