Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6985713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:42:54+00:00 2026-05-27T18:42:54+00:00

Our team has geographically dispersed and many virtual machine will be connected by them

  • 0

Our team has geographically dispersed and many virtual machine will be connected by them using remote desktop. I would like to find who is accessing a remote desktop session and how long it is being used.

I tried to do it with powershell. I wrote a script where user will invoke mstsc using powershell. It will log who has logged in and when he logged. But i would like to find when some one log off from mstsc or disconnect mstsc . Is there any way to capture that information in log file using powershell. Whether any event will be triggered while closing mstsc which could be used for it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:42:55+00:00Added an answer on May 27, 2026 at 6:42 pm

    I wrote a PowerShell module,PSTerminalServices (http://psterminalservices.codeplex.com), that is built on Cassia.
    Here’s a sample command output:

    PS> Get-TSSession | fl *
    
    IPAddress          :
    State              : Active
    ApplicationName    :
    Local              : False
    RemoteEndPoint     :
    InitialProgram     :
    WorkingDirectory   :
    ClientProtocolType : Console
    ClientProductId    : 0
    ClientHardwareId   : 0
    ClientDirectory    :
    ClientDisplay      : Cassia.Impl.ClientDisplay
    ClientBuildNumber  : 0
    Server             : Cassia.Impl.TerminalServer
    ClientIPAddress    :
    WindowStationName  : Console
    DomainName         : homelab
    UserAccount        : homelab\shay
    ClientName         :
    ConnectionState    : Active
    ConnectTime        : 12/15/2011 2:47:02 PM
    CurrentTime        : 12/23/2011 4:35:21 PM
    DisconnectTime     :
    LastInputTime      :
    LoginTime          : 12/15/2011 3:11:58 PM
    IdleTime           : 00:00:00
    SessionId          : 1
    UserName           : shay
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our team has built a site using Sharepoint and a few custom webparts. We've
Our team has been using Microsoft's AJAX Toolkit since the days of Atlas. In
Our team has some code guidelines that I would like to enforce via stylecop
Moving forward with re-designing a web service architecture using WCF, our team has been
I am using WPF, and attempting to follow the MVVM pattern. Our team has
Our team has a task system where we post small incremental tasks assigned to
Our team has been experiencing a recurring problem with velocity templates. Upon rendering, some
Our team has just started developing for the Sitecore CMS. We find that after
Our team has recently been working on a logic and data layer for our
Our team has recently been considering pushing out a minor registry fix to users

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.