VMware Horizon Community
RAJESH3311
Enthusiast
Enthusiast

View Power CLI to get disconnected session information filtered by duration

Hello,

Please help me to find a powercli command to find disconnected session filtered by duration. For example we need to find all disconnected sessions for a duration more than 24 Hrs.

I am using the below command to get the list of disconnected session.

Get-RemoteSession -state disconnected.

I tried the below command to get the list of disconnected session more than 2 days, but it displays all disconnected sessions for more than 2 days, 2 hrs, 22 hrs

Get-RemoteSession -state disconnected | Where-Object {$_.Duration -gt '2 00 00 00'} | ft DNSName, Duration.

Thanks in advance,

Rajesh

Reply
0 Kudos
0 Replies