Author Posts

October 9, 2017 at 8:42 pm

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

October 9, 2017 at 11:18 pm

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.

October 10, 2017 at 3:15 pm

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
 

October 10, 2017 at 3:25 pm

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  

October 10, 2017 at 11:06 pm

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 .