Get-NAVServerSession
Get-NAVServerSession
Returns information about active sessions for a Microsoft Dynamics NAV Server instance.
Syntax
Parameter Set: __AllParameterSets
Get-NAVServerSession [-ServerInstance] <String> [-Force] [-Tenant <TenantId> ] [ <CommonParameters>]
Detailed Description
Use the Get-NAVServerSession cmdlet to return information about active sessions for a Microsoft Dynamics NAV 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
Parameters
-Force
Forces the command to run without asking for user confirmation.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ServerInstance<String>
Specifies the name of a Microsoft Dynamics NAV Server instance. The default instance name is DynamicsNAV71. You can specify either the full name of an instance such as MicrosoftDynamicsNavServer$myinstance or the short name such as myinstance.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue, ByPropertyName) |
Accept Wildcard Characters? |
false |
-Tenant<TenantId>
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Force
Forces the command to run without asking for user confirmation.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
System.String
You can pipe a string that contains a Microsoft Dynamics NAV Server instance name to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
System.Data.DataTable
Returns the active session information as a table.
Examples
-------------------------- EXAMPLE 1 --------------------------
Description
-----------
The example returns a list of all client connections for the Microsoft Dynamics NAV Server instance DynamicsNAV71. The return data shows two Windows client users.
C:\PS>Get-NAVServerSession –ServerInstance DynamicsNAV71 –Tenant default
ServerInstanceID : 1
SessionID : 1
UserSID : DE8B398E-C154-45BC-931A-3A74A8AF5A85
ServerInstanceName : DynamicsNAV71
ServerComputerName : MyServer
UserID : CRONUSNavUser1
ClientType : WindowsClient
ClientComputerName : MyComputer
LoginDatetime : 21-09-2013 13:06:24
DatabaseName : Demo Database NAV (7-1)
ServerInstanceID : 1
SessionID : 2
UserSID : DE8B398E-C154-45BC-931A-3A74A8AF5A85
ServerInstanceName : DynamicsNAV71
ServerComputerName : MyServer
UserID : CRONUSNavUser2
ClientType : WindowsClient
ClientComputerName : MyOtherComputer
LoginDatetime : 21-09-2013 10:28:40
DatabaseName : Demo Database NAV (7-1)