[Execute-ProcessAsUser] Fail in PSADT 3.10.1

Hey,

the function [Execute-ProcessAsUser] fails, if not user is logged in. In PSADT 3.9.3 the function works well when no user ist logged in…

I’ll have to test to see if there’s any different behaviour here - but it looks like you could just add -ContinueOnError $true as a workaround?

1 Like

Hey,
no, the default value is true. I wrapped around Get-LoggedOnUser …

I have reproduced this and am working on a fix, you can track this here:

Execute-ProcessAsUser throws terminating error when no users are logged on and ContinueOnError=$true (i.e. the default) · Issue #1026 · PSAppDeployToolkit/PSAppDeployToolkit (github.com)

3 Likes

Hey, is there a new “Deploy-Application.ps1” file somewhere?

AppDeployToolkitMain.ps1 would be the file you are looking for, you can try the version in the dev branch if you’re looking to test before it gets properly released:

1 Like