Skip to content
TheChatArchiveThe Chat Archive
gpt-4-0314· OpenAIAi2 WildChat-4.8M (AI2)

hi chat

  1. User

    hi chat

  2. Assistant

    Hello! How can I help you today?

  3. User

    can you create me a windows server 2019 PowerShell command to find out how many rdp users are logged in

  4. Assistant

    Sure! Here's a PowerShell command that will show the number of active RDP sessions on a Windows Server 2019 machine:

    (Get-WmiObject -Class Win32_LogonSession -Filter "LogonType = 10").Count
    

    This command uses "Get-WmiObject" to query the "Win32_LogonSession" class and filter the results for logon sessions with a LogonType of 10 (which corresponds to remote RDP sessions). The result of this query is a collection of logged-in RDP sessions, and the ".Count" attribute gives you the total number of these sessions.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.