Get-Command : The term 'Get-RDUserSession' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. https://powershelladministrator.com/2015/12/01/get-logged-on-users-and-sessions/ Hope these help.