Support
 
Phone Get Quote
 
Support
 
US: +1 888 720 9500
US: +1 888 791 1189
Intl: +1 925 924 9500
Aus: +1 800 631 268
UK: 0800 028 6590
CN: +86 400 660 8680

Direct Inward Dialing: +1 408 916 9892

How to get remote desktop user sessions with PowerShell and ADAudit Plus

The Get-RDUserSession cmdlet retrieves user sessions in a Remote Desktop deployment or in a collection. Get-RDUserSession takes two parameters. '-Collection name' and 'Connection Broker'. The 'Collection Name' defines the array that contains names of the remote desktop collection where the user sessions reside. The 'Connection broker' defines the server that was used to deploy the remote desktop.

The following is a comparison that shows how you can obtain a list of remote user sessions with PowerShell and ADAudit Plus. The ADAudit Plus console gives you an easy way to access remote desktop activity. You can also employ the powerful search and filter options to find a specific event in the report.

Windows PowerShell

Steps to obtain a remote desktop user sessions report in Windows PowerShell

  • Define the Get-RDUserSession cmdlet to initiate the collection of remote user sessions.
  • Define the '-Collection name' that contains the virtual desktop sessions you want to retrieve.
  • Define the '-Connection broker' server. Users connect to this server to access the network remotely.
  • Execute the script.

Code to obtain list of remote user sessions in a collection

Get-RDUserSession -ConnectionBroker "rdcb.xyz.com" -CollectionName @("Session Collection","Virtual Desktop Collection")
 Copied
Click to copy entire script

ADAudit Plus

Steps to obtain a remote desktop user sessions in ADAudit Plus

  • Login to ADAudit Plus web console using administrator credential. Navigate to the 'Reports' tab.
  • Under the 'Local Logon-Logoff' section on the left pane, choose 'Remote Desktop Services Activity'. Select the 'Domain' and 'Period'.
get-rdusersession-1

Why ADAudit Plus is the better solution for you?

  • Comprehensive dashboard so you can correlate reports.
  • ADAudit Plus allows you to export reports in the desired format with a single click easily.
  • Advanced filter options to save you the trouble of creating complex LDAP queries.
  • Avoid complex PowerShell-scripting, and simplify AD change auditing with ADAudit Plus.
  • Avoid complex PowerShell-scripting, and simplify AD change auditing with ADAudit Plus.
  •  
  • By clicking 'Get Your Free Trial', you agree to processing of personal data according to the Privacy Policy.
  •  
  • Thanks!
  • Your download is in progress and it will be completed in just a few seconds! If you face any issues, download manually here.

Related Resources

ADAudit Plus Trusted By