RemoteApp and Desktop Connections fail to update via command

1.7k Views Asked by At

We're having problem in our environment and need to trigger the update for RemoteApp and Desktop Connections.

If i manually click the button, it prompts for credentials, the user enters them, and it updates correctly.

enter image description here

We would like to have a command for this, so I'm using :

Start-Process rundll32 -ArgumentList "tsworkspace,TaskUpdateWorkspaces2"

(Powershell)

The command triggers the update but it fails saying the credentials to this connection aren't valid.

I am running this command in the user environement with his credentials (so the same that work when clicking the button manually)

Even tried

Start-Process rundll32 -ArgumentList "tsworkspace,TaskUpdateWorkspaces2" -Credential $env:userdomain\$env:username

I put in the correct credential, command runs without error but RemoteApp complains about credentials and fails again. If i click the button providing the EXACT same info, it works. Weird! Really would need an automated solution instead of clicking buttons...

Do you know why clicking the button prompts for credentials but the command doesn't and fails? I'm assuming the command runned from the user environement would use his credential? Is there another command to pop-up the exact same box that appears when clicking the button manually?

0

There are 0 best solutions below