Get-NAVServerSession
Returns information about active sessions for a Business Central Server instance.
Syntax
Get-NAVServerSession
[-Tenant <TenantId>]
[-RetryMode <RetryMode>]
[-NetworkTimeout <TimeSpan>]
[-MaxRetries <Int32>]
[-DelayBetweenRetries <TimeSpan>]
[-ServerInstance] <String>
[-Force]
[-ProgressAction <ActionPreference>]
[<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 : BC
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 : BC
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
-DelayBetweenRetries
Specifies the delay between retries.
Type: | TimeSpan |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
Forces the command to run without asking for user confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MaxRetries
Specifies the maximum number of retries for the operation in case of failure.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NetworkTimeout
Specifies the network timeout of the operation.
Type: | TimeSpan |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProgressAction
A common PowerShell parameter that determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider. Learn more.
Type: | ActionPreference |
Aliases: | proga |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RetryMode
Specifies the retry mode when the service instance is not available.
Possible values: Fixed, Exponential
Type: | RetryMode |
Accepted values: | Fixed, Exponential |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | True |
Accept pipeline input: | True |
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 |
Required: | False |
Accept pipeline input: | True |
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.