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 BCMicrosoft 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.
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\BC', 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
Parameter properties
Type:
PSCredential
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
UseDatabaseSqlAuth
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
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.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
UseDatabase
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
UseDatabaseSqlAuth
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
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.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
UseDatabase
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
UseDatabaseSqlAuth
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Confirm
Prompts you for confirmation before executing the command.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
cf
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ExclusiveAccessTicket
Specifies the exclusive access ticket allowing to perform this operation on the tenant in the exclusive access mode.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
UseNST
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Force
Forces the command to run without asking for user confirmation.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ProgressAction
A common PowerShell parameter that determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider. Learn more.
Parameter properties
Type:
ActionPreference
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
proga
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
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.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
UseNST
Position:
0
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Tenant
Specifies the ID of the tenant that you want to dismount from the Business Central Server instance, such as Tenant1.
Parameter properties
Type:
TenantId
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
Id
Parameter sets
(All)
Position:
1
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
wi
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
Inputs
System.String
You can pass the value of the ServerInstance parameter as a string to this cmdlet.
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.