View Single Post
Old 08-04-2008   #4 (permalink)
Jon


 
 

Re: elevate privilege

"Calin Iaru" <CalinIaru@xxxxxx> wrote in message
news:FC2C8688-FA7E-4D09-B2D4-453C4F056415@xxxxxx
Quote:

> And a shortcut that can do this? For instance, run-elevated
> e:\bin\procexp.exe?

Not sure what you mean by a 'shortcut'. If you have set up a suitable
registry association with .ps1 files then you can click on one or a
shortcut to it eg containing these 2 lines

$Shell = New-Object -ComObject "Shell.Application"
$Shell.ShellExecute("e:\bin\procexp.exe",$null,$null,"runas")




I would like to add the command to a profile script and
Quote:

> sign it. Can you please indicate how to sign a script using the default
> certificates or vendor supplied certificates?

You use 'Set-AuthenticodeSignature' for this with a suitable certificate

help Set-AuthenticodeSignature
help about_signing

--
Jon




My System SpecsSystem Spec