header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

Elevating priveleges
Last Post 21 Jan 2008 03:18 AM by marco.shaw. 1 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
jbrinkmanUser is Offline
New Member
New Member
Posts:5

--
20 Jan 2008 05:12 PM  

I have a number of scripts that I use in Vista for manipulating my dev environment.  In some cases, these scripts require elevated permissions to execute properly.  Is there a way to

  1. Detect from script that you are not executing in an environment with the appropriate permission
  2. Automatically launch a new console requesting the elevated permission

I always operate in a least privelege environment, so I don't elevate permissions unless I really need to.  Unfortunately, I don't always remember which scripts/functions require elevation, so having the scripts help me automate this would be awesome.

Joe Brinkman
--------------------------------------------------------
ASP.Net MVP
INETA Speaker
VP Core Technology, DotNetNuke Corp
marco.shawUser is Offline
Co-Community Director
Basic Member
Basic Member
Posts:195
Avatar

--
21 Jan 2008 03:18 AM  
I can't think of any other way than automating opening an elevated PSH console using AutoIT (www.autoitscript.com). Now, I've not played enough with Vista/2008 yet. Is there a basic command that will return a relevant error when trying to run it withouth the proper creds?
Marco

*Microsoft MVP - Windows PowerShell: http://www.microsoft.com/mvp
*PowerGadgets MVP: http://www.powergadgets.com/mvp
*Blog: http://marcoshaw.blogspot.com
You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer