$a=Get-RDUserSession -CollectionName restsh |? sessionstate -eq ‘STATE_DISCONNECTED’
ForEach ($a1 in $a){
Invoke-RDUserLogoff -HostServer $a1.HostServer -UnifiedSessionID $a1.UnifiedSessionId -Force }
Мои заметки в ИТ области
$a=Get-RDUserSession -CollectionName restsh |? sessionstate -eq ‘STATE_DISCONNECTED’
ForEach ($a1 in $a){
Invoke-RDUserLogoff -HostServer $a1.HostServer -UnifiedSessionID $a1.UnifiedSessionId -Force }