Get-NAVServerSession
Get-NAVServerSession
Returns information about active sessions for a Microsoft Dynamics NAV Server instance.
Syntax
Parameter Set: __AllParameterSets
Get-NAVServerSession [-ServerInstance] <String> [-AsXml] [ <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
-AsXml
Formats cmdlet output as an XML document.
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 DynamicsNAV70. 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 |
<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.
System.Xml.XmlDocument
If you use the parameter, then the cmdlet returns the active session information as an XML document.
Examples
-------------------------- EXAMPLE 1 --------------------------
Description
-----------
The example returns a list of all client connections for Microsoft Dynamics NAV Server instance DynamicsNAV70. The return data shows two Windows client users.
C:\PS>Get-NAVServerSession DynamicsNAV70 -AsXml | Select-Xml -XPath "//Record" | Select-Object -ExpandProperty node
Server_x0020_Instance_x0020_ID : 1
Session_x0020_ID : 1
User_x0020_SID : DE8B398E-C154-45BC-931A-3A74A8AF5A85
Server_x0020_Instance_x0020_Name : DynamicsNav70
Server_x0020_Computer_x0020_Name : NavServer.Cronus.Com
User_x0020_ID : CRONUS_x005C_NavUser1
Client_x0020_Type : RoleTailored_x0020_Client
Client_x0020_Computer_x0020_Name :
Login_x0020_Datetime : 21-03-2012 13:06:24
Database_x0020_Name : Demo_Database
Server_x0020_Instance_x0020_ID : 1
Session_x0020_ID : 2
User_x0020_SID : 7591D3C3-065E-4ED1-A20F-27E11A3A8530
Server_x0020_Instance_x0020_Name : DynamicsNav70
Server_x0020_Computer_x0020_Name : NavServer.Cronus.Com
User_x0020_ID : CRONUS_x005C_NavUser2
Client_x0020_Type : RoleTailored_x0020_Client
Client_x0020_Computer_x0020_Name :
Login_x0020_Datetime : 21-03-2012 13:07:02
Database_x0020_Name : Demo_Database