查看远程桌面服务器设置、属性,以及连接属性信息,可以参考以下相关指令:
$ErrorActionPreference = "SilentlyContinue"
$session=$args[0]
$rdpSession="Connection $session created"
$CorrelationId=(Get-WinEvent Microsoft-Windows-RemoteDesktopServices-RdpCoreTS/Operational `
| Where-Object -Property Message -Match $rdpSession )[0].ActivityID
if($error.count -ge 1) {
Write-host "Required RDP log not found"
exit
}
Get-WinEvent Microsoft-Windows-RemoteDesktopServices-RdpCoreTS/Operational `
| ?{$_.ActivityID -eq $CorrelationId} `
| Where-Object -Property Message -Match "client operating system type|Microsoft::Windows::RDS::Graphics|client supports version|Client not supported" `
|Sort-Object -Property id -Descending | ft id, Message -AutoSize