I have a simple question concerning a Do
loop running a RDP file (so the thin client always shows the login screen to enter credentials). Since we moved to Windows 2012 R2 RDS, I keep getting an infinite loop when launching the RDP file to connect to the RD Collection pool.
I am running:
Do {
Start-Process -wait c:\windows\system32\MSTSC.exe C:\Connection\Terminal-Server.RDP
}
while ($Process.Count -lt 1)
This will open up a RDP login where you can enter credentials. But it keeps opening ProcessNames for MSTSC, until the client crashes. The reason for this is the workspace id:s:Connection_broker.domain.local
line. But I have no idea why, or how to get the process.count
in order.
For some reason when using workspace id:s:
in the file, the mstsc
isn't noticed.