15 Posts

August 29th, 2013 12:00

Hey sharifr,

We currently do not support this through the PowerShell API. Like you said, the best you can do it query the terminal servers directly.

Using a combination of Get-QVWServer cmdlet from the vWorkspace module and Get-TSSession and Stop-TSSession from the PSTerminalServices module, you should be able to implement this functionality. I realize there are some permission implications using this method because the terminal services cmdlets require elevated permissions to execute. You could setup a restricted PowerShell endpoint on the terminal services machines that prevented execution of anything except the two require TS commands.

That said, I'll make sure we get this request into the roadmap. It's certainly something we should support directly.

PSTerminalServices

http://archive.msdn.microsoft.com/PSTerminalServices

Constrained PowerShell Endpoints

http://blogs.technet.com/b/heyscriptingguy/archive/2012/07/27/an-introduction-to-powershell-remoting-part-five-constrained-powershell-endpoints.aspx

Adam

No Events found!

Top