Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: host vs remote invoke-command

$
0
0

You may be right about UAC. Only local administrator is never prompted for elevation by UAC, so even if the user account that you are using to start the application is an admin on the machine, by default the computer would still prompt for elevation.

When you run this code on the VM directly (as you said), does it prompt for elevation?

Start-Process C:\Folder\SomeProgram.exe -ArgumentList /s -Wait

If so, I’d say you have 3 options,
1) Look into how to change UAC settings so it automatically elevates without prompting.
2) Try starting the process with the local administrator credentials for the machine.
3) Examine your installer further. I know a lot of exe installers are just wrappers for an MSI, and if so you may be able to extract the contents of the installer, retrieve the MSI and install using MSIEXEC, which plays much nicer with UAC.


Viewing all articles
Browse latest Browse all 13067

Trending Articles