Dismount-NAVTenant

Dismount-NAVTenant

Dismounts a tenant on the specified Microsoft Dynamics NAV Server instance. All active user sessions that access the tenant will end.

Syntax

Parameter Set: __AllParameterSets
Dismount-NAVTenant [-Tenant] <TenantId> [-Force] [-InputTenantRuntimeSettings <NavTenantRuntimeSettings> ] [-InputTenantSettings <NavTenantSettings> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: UseDatabase
Dismount-NAVTenant -ApplicationDatabaseName <String> -ApplicationDatabaseServer <String> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: UseDatabaseSqlAuth
Dismount-NAVTenant -ApplicationDatabaseCredentials <PSCredential> -ApplicationDatabaseName <String> -ApplicationDatabaseServer <String> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: UseNST
Dismount-NAVTenant [-ServerInstance] <String> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

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

Parameters

-ApplicationDatabaseCredentials<PSCredential>

Specifies the user name and password of the login account that the Microsoft Dynamics NAV 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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ApplicationDatabaseName<String>

Specifies the name of the application database that is used by the tenant database.

This parameter is only relevant if the Microsoft Dynamics NAV Server instance is configured for multitenancy. This parameter, together with the ApplicationDatabaseServer parameter, enables you to dismount a tenant from a Microsoft Dynamics NAV Server instance without having a running connection to the Microsoft Dynamics NAV Server instance.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ApplicationDatabaseServer<String>

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 Microsoft Dynamics NAV Server instance without having a running connection to the Microsoft Dynamics NAV Server instance.

Aliases

none

Required?

true

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

-InputTenantRuntimeSettings<NavTenantRuntimeSettings>

Specifies the Microsoft.Dynamics.Nav.Types.NavTenantSettings object that identifies the tenant that you want to dismount. You can pass this object from the Tenant parameter on the Get-NAVTenant cmdlet to the Dismount-NAVTenant cmdlet.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-InputTenantSettings<NavTenantSettings>

Specifies the Microsoft.Dynamics.Nav.Types.NavTenantSettings object that identifies the tenant that you want to dismount. You can pass this object from the Tenant parameter on the Get-NAVTenant cmdlet to the Dismount-NAVTenant cmdlet.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-ServerInstance<String>

Specifies the Microsoft Dynamics NAV Server instance that the tenant database is mounted against, such as DynamicsNAV90. You can specify either the fully qualified name, such as 'MyServer$DynamicsNAV90', or the short name, such as 'DynamicsNAV90'.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Tenant<TenantId>

Specifies the ID of the tenant that you want to dismount from the Microsoft Dynamics NAV Server instance, such as Tenant1.

Aliases

Id

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

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 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

The output type is the type of the objects that the cmdlet emits.

  • 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.

Examples

--------------------------EXAMPLE 1--------------------------

Description

-----------

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

PS C:\> Dismount-NAVTenant DynamicsNAV90 -Tenant 'Test'

--------------------------EXAMPLE 2--------------------------

Description

-----------

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

PS C:\> Dismount-NAVTenant DynamicsNAV90 Test

--------------------------EXAMPLE 3--------------------------

Description

-----------

This example gets the tenant information from the DynamicsNAV90Microsoft Dynamics NAV 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.

PS C:\> Get-NAVTenant DynamicsNAV90 | Dismount-NAVTenant

--------------------------EXAMPLE 4--------------------------

Description

-----------

This example mounts a tenant, 'Test' by specifying an application database instead of the Microsoft Dynamics NAV 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.

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