Using PDQ to run as SYSTEM or elevated account in cmdline, but prompting logged-on user for reboot?

Hi

I’m new and learning fast! But, I just want to check I should be able to run the toolkit as a user with local admin rights using command line/PDQ deployment but then give the logged-on user, if there is one, the post-installation reboot/defer prompts. This isn’t the Execute-ProcessAsUser command is it? I only want to execute the interactive bit as the logged-on user.

Alas no. PSADT (or any other solution) does not magically give the local user Admin rights to install an application.

While running as SYSTEM, you can install all the bits requiring Admin permissions to install and then it can launch something running as the user to install the bits that only the user can do. There are different methods: Installing in user profiles - ActiveSetup vs. Execute-ProcessAsUser - The Toolkit / Tips & Tricks - PSAppDeployToolkit Community

For the “post-installation reboot/defer prompts” PSADT will detect if there is a user or not and display accordingly.

ah great, thanks.

I’ll maybe do something like have the main app install as system or the admin user used to deploy the package (a bios update in this case), then have the user part be a script to check for success error code in install package log file, if it find success code it’ll start the user reboot prompt/defer options to the logged-on user.

You can or you can use some of PSADT’s Show- functions.

Something like this:

If ($SuccessErrorCode -eq $true) {
	Show-InstallationRestartPrompt -Countdownseconds 300 -NoSilentRestart $false -SilentCountdownSeconds 10
} Else {
	Show-InstallationProgress -StatusMessage "BIOS Update Failed...`nWe will try again at a later date."
}

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.