0

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?

Rakha
  • 1,361
  • 1
  • 14
  • 42
  • Have you tried using `Start-Process ... -Credential` ? – jrider Oct 05 '18 at 19:31
  • Good idea, just tried : Start-Process rundll32 -ArgumentList "tsworkspace,TaskUpdateWorkspaces2" -credential "" I put in the correct credential, command runs without error but RemoteApp complains about credentials and faills again. If i click the button providing the exact same info, it works. Weird! Really would need an automated solution instead of clicking buttons... – Rakha Oct 05 '18 at 19:34
  • Try this: `Start-Process rundll32 -ArgumentList "tsworkspace,TaskUpdateWorkspaces2" -Credential $env:userdomain\$env:username` – jrider Oct 05 '18 at 19:49
  • Still not working, even like I said in my question with the EXACT same credentials used when manually clicking the button. I will never understand why this happens apparently...I guess the command doesn't do the exact same time as the button. :( – Rakha Oct 09 '18 at 11:55

0 Answers0