Get-NAVServerSession

Returns information about active sessions for a Business Central Server instance.

Syntax

Get-NAVServerSession
   [-Tenant <TenantId>]
   [-ServerInstance] <String>
   [-Force]
   [<CommonParameters>]

Description

Use the Get-NAVServerSession cmdlet to return information about active sessions for a Business Central Server instance. The following information is returned for each session:

Server Instance ID
Session ID
User SID
Server Instance Name
Server Computer Name
User ID
Client Type
Client Computer Name
Login Datetime
Database Name

Examples

EXAMPLE 1

Get-NAVServerSession -ServerInstance BC -Tenant default

ServerInstanceID   : 1

SessionID                 : 1

UserSID                   : DE8B398E-C154-45BC-931A-3A74A8AF5A85

ServerInstanceName : DynamicsNAV90

ServerComputerName : MyServer

UserID                    : CRONUSNavUser1

ClientType                : WindowsClient

ClientComputerName : MyComputer

LoginDatetime             : 21-09-2013 13:06:24

DatabaseName              : Demo Database NAV


ServerInstanceID   : 1

SessionID                 : 2

UserSID                   : DE8B398E-C154-45BC-931A-3A74A8AF5A85

ServerInstanceName : DynamicsNAV90

ServerComputerName : MyServer

UserID                    : CRONUSNavUser2

ClientType                : WindowsClient

ClientComputerName : MyOtherComputer

LoginDatetime             : 21-09-2013 10:28:40

DatabaseName              : Demo Database NAV

The example returns a list of all client connections for the Business Central Server instance BC. The return data shows two Windows client users.

Parameters

-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ServerInstance

Specifies the name of a Business Central Server instance, for example, BC or myinstance. You can specify either the full name of an instance, such as MicrosoftDynamicsNavServer$myinstance or the short name such as myinstance.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-Tenant

Specifies the ID of the tenant that you want to get the active sessions for, such as Tenant1. This parameter is required unless the specified service instance is not configured to run multiple tenants.

Type:TenantId
Aliases:Id
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Inputs

System.String

You can pipe a string that contains a Business Central Server instance name to the cmdlet.

Outputs

System.Data.DataTable

Returns the active session information as a table.