The issue we're running into with the release version of Windows 2008, is it
seems for any start service (or worker process) command to work (e.g. net
start <service>, Start-Service <service>, AppCMD start site MySite), the
shell you run it in (e.g. Power Shell or Command) has to be run in "elevated"
mode. If we were to run this script manually, we could Right Click on Power
Shell and say Run as Administrator. But we call this install script remotely
through a mass deployment process.
Does anyone know of a way to force Power Shell to run "elevated" when we
call our script remotely? Basically I don't want to worry about having to
specify that "hey Windows 2008, I want to run the command in an 'elevated'
shell so I can make sure services are started."
--
Jon
"Mac" <M...@discussions.microsoft.com> wrote in message
news:E7B9ED7D-AF89-4EEF...@microsoft.com...
Then entire install is writen in Power Shell. Basically when we launch our
script (i.e. powershell .\myscript.ps1), any service commands (e.g.
start-service w3svc) will not run because Power Shell is not running in
"elevated" mode.
Does that make sense?
It takes a while to get used to, but it would probably violate even more
security principles were I to show how to run powershell scripts elevated
with no UAC prompts when UAC prompts are enabled - but there's nothing to
stop you setting up your systems to best suit your particular usage, as
you've done so.
--
Jon
http://huddledmasses.org/vista-setuid-how-to-elevate-without-prompting/
--
Joel "Jaykul" Bennett