Dismount-NAVTenant

Dismounts a tenant on the specified Business Central Server instance. All active user sessions that access the tenant will end.

Syntax

Dismount-NAVTenant
        [-Tenant] <TenantId>
        [-ServerInstance] <String>
        [-ExclusiveAccessTicket <String>]
        [-Force]
        [-WhatIf]
        [-Confirm]
        [<CommonParameters>]
Dismount-NAVTenant
        [-Tenant] <TenantId>
        -ApplicationDatabaseServer <String>
        -ApplicationDatabaseName <String>
        [-Force]
        [-WhatIf]
        [-Confirm]
        [<CommonParameters>]
Dismount-NAVTenant
        [-Tenant] <TenantId>
        -ApplicationDatabaseServer <String>
        -ApplicationDatabaseCredentials <PSCredential>
        -ApplicationDatabaseName <String>
        [-Force]
        [-WhatIf]
        [-Confirm]
        [<CommonParameters>]

Description

Use the Dismount-NAVTenant cmdlet to dismount a tenant on the specified Business Central Server instance. All active user sessions that access the tenant will end.

Examples

EXAMPLE 1

Dismount-NAVTenant BC -Tenant 'Test'

This example dismounts the tenant Test from the specified server instance.

EXAMPLE 2

Dismount-NAVTenant BC Test

This example dismounts the tenant Test from the specified server instance without being explicit about parameter names.

EXAMPLE 3

Get-NAVTenant BC | Dismount-NAVTenant

This example gets the tenant information from the DynamicsNAV90Microsoft Business Central Server instance and passes the information to the Dismount-NAVTenant cmdlet. The tenant default is then dismounted. The output is a list of the tenant information about all dismounted tenants.

EXAMPLE 4

Dismount-NAVTenant -Tenant 'Test' -ApplicationDatabaseServer 'MySQLServer\NAV' -ApplicationDatabaseName 'MyNavAppDatabase' -ApplicationDatabaseCredentials (Get-Credential)

This example mounts a tenant, 'Test' by specifying an application database instead of the Business Central Server instance. The application database server and instance is 'MySQLServer\NAV', and the application database is 'MyNavAppDatabase'. SQL Server authentication is configured for accessing the application database.

Parameters

-ApplicationDatabaseCredentials

Specifies the user name and password of the login account that the Business Central Server instance uses to access the application database in SQL Server when using SQL Server Authentication. This parameter is only relevant when you set with the ApplicationDatabaseServer and ApplicationDatabaseName parameters

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

-ApplicationDatabaseName

Specifies the name of the application database that is used by the tenant database. This parameter is only relevant if the Business Central Server instance is configured for multitenancy. This parameter, together with the ApplicationDatabaseServer parameter, enables you to dismount a tenant from a Business Central Server instance without having a running connection to the Business Central Server instance.

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

-ApplicationDatabaseServer

Specifies the SQL Server name and instance, such as MyServer\MyInstance, that hosts the application database that you want to use with the tenant database. This parameter, together with the ApplicationDatabaseName parameter, enables you to dismount a tenant from a Business Central Server instance without having a running connection to the Business Central Server instance.

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

-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

-ExclusiveAccessTicket

Specifies the exclusive access ticket allowing to perform this operation on the tenant in the exclusive access mode.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
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

-Tenant

Specifies the ID of the tenant that you want to dismount from the Business Central Server instance, such as Tenant1.

Type:TenantId
Aliases:Id
Position:1
Default value:None
Required:True
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 pass the value of the ServerInstance parameter as a string to this cmdlet.

Microsoft.Dynamics.Nav.Types.NavTenantRuntimeSettings

You can pass a Microsoft.Dynamics.Nav.Types.NavTenantRuntimeSettings object from the Tenant parameter on the Get-NAVTenant cmdlet to the Dismount-NAVTenant cmdlet.

Microsoft.Dynamics.Nav.Types.NavTenantSettings

You can pass a Microsoft.Dynamics.Nav.Types.NavTenantSettings object from the Tenant parameter on the Get-NAVTenant cmdlet to the Dismount-NAVTenant cmdlet.

Outputs

Microsoft.Dynamics.Nav.Types.NavTenantSetting

If the InputObject parameter has been bound to a value, it will be passed through to the pipeline. Otherwise no output value is returned.