RDS Termainl Services Module

Does anyone know of a Terminal services module that will grab information about the RDS connections to a terminal server? The module ‘psterminalservices’ no longer seems to be available.

Import-Module : The specified module 'psterminalservices' was not loaded because no valid module file was found in any module directory.
    + CategoryInfo          : ResourceUnavailable: (psterminalservices:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

Hmmm … I don’t know what you expect but at least since Windows Server 2012 R2 RDS there are 2 Powershell modules built in. Depending on what information you’re after you could use Get-RDUserSession from the module RemoteDesktop.

For now I am looking for something similar to what ‘Qwinsta’ outputs put something I can easily manipulate as an object with Properties and methods.

Even when I run PS as an admin, it can’t find this module either.

PS C:\Users\bclanton\Google Drive\Code> Import-Module RemoteDesktop
Import-Module : The specified module 'RemoteDesktop' was not loaded because no valid module file was found in any module directory.
At line:1 char:1
+ Import-Module RemoteDesktop
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (RemoteDesktop:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
 

Actually, I am wondering if you meant ‘RemoteDesktopServices’. I can import this module, but I do not see a ‘Get-RDUserSession’ within this module.

PS C:\Windows> Get-Module

ModuleType Version    Name                                ExportedCommands                                                                                                                                            
---------- -------    ----                                ----------------                                                                                                                                            
Script     1.0.0.0    ISE                                 {Get-IseSnippet, Import-IseSnippet, New-IseSnippet}                                                                                                         
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content...}                                                                                          
Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Add-Member, Add-Type, Clear-Variable, Compare-Object...}                                                                                                   
Manifest   1.0.0.0    remotedesktopservices               {Add-VGPU, Clear-PersonalVirtualDesktop, Get-VGPUConfiguration, Get-VirtualDesktop...}  
PS C:\Windows> Get-Command -Module remotedesktopservices

CommandType     Name                                               Version    Source                                                                                                                                  
-----------     ----                                               -------    ------                                                                                                                                  
Cmdlet          Add-VGPU                                           1.0.0.0    remotedesktopservices                                                                                                                   
Cmdlet          Clear-PersonalVirtualDesktop                       1.0.0.0    remotedesktopservices                                                                                                                   
Cmdlet          Get-VGPUConfiguration                              1.0.0.0    remotedesktopservices                                                                                                                   
Cmdlet          Get-VirtualDesktop                                 1.0.0.0    remotedesktopservices                                                                                                                   
Cmdlet          Remove-VGPU                                        1.0.0.0    remotedesktopservices                                                                                                                   
Cmdlet          Set-PersonalVirtualDesktop                         1.0.0.0    remotedesktopservices                                                                                                                   
Cmdlet          Set-VGPUConfiguration                              1.0.0.0    remotedesktopservices  
I am wondering if you meant 'RemoteDesktopServices'.
... nope. ;-) I meant what I wrote. Powershell Module RemoteDesktop. What information are you after actually? If you have a tool what provides you with the information you want you could simply parse the output and pick the pieces you need .