Remove-NAVServerSession

Closes the specified client connection to a Business Central Server instance.

Syntax

Remove-NAVServerSession
      [-Tenant <TenantId>]
      -SessionId <Int32>
      [-ServerInstance] <String>
      [-Force]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Use the Remove-NAVServerSession cmdlet to close a client connection, as identified by the SessionId parameter. You can use the Get-NAVServerSession cmdlet to obtain information about current Business Central sessions.

Examples

EXAMPLE 1

Remove-NAVServerSession -ServerInstance BC -Tenant default -SessionId 11

This example closes the session with Session ID 11 in the on the DynamicsNAV90 instance.

Parameters

-Confirm

Prompts you for confirmation before executing the command.

Type:SwitchParameter
Aliases:cf
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

-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

-SessionId

A number that identifies a Business Central Server session. You can obtain a list of current sessions using the Get-NAVServerSession cmdlet.

Type:Int32
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Tenant

Specifies the ID of the tenant you want to remove the connection from, 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

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

System.String

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

Outputs

None