Is this possible? I’d like to run a script with credentials from variables but I want it to run it with escelated priveleges so that it runs as administrator on the Powershell Universal server.
There are certain scripts that won’t run unless the user running them has local administrator access to the machine from which the script is run. For example the Powershell Windows Update scripts. Also the commands for requesting certificate enrollment from Windows CA doesn’t work properly without local admin permissions.
There are of course ways around this, like giving the PSU service account the same permissions as the accounts in the vault or using Invoke-Command but these are less clean and can be a bit unwieldly so I want to explore other options.