Mount-NAVTenant

Mount-NAVTenant

Mounts a tenant database against the specified Microsoft Dynamics NAV Server instance.

Syntax

Parameter Set: __AllParameterSets
Mount-NAVTenant [-ServerInstance] <String> [-AlternateId] <System.Collections.ObjectModel.ReadOnlyCollection[string]> [-DatabaseInstance] <System.String> [-DatabaseName] <System.String> [-DatabaseServer] <System.String> [-DefaultCompany] <System.String> [-Id] <String> [-AllowAppDatabaseWrite] [-DoNotSaveConfiguration] [-Force] [-NasServicesEnabled] [-OverwriteTenantIdInDatabase] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

Use the Mount-NavTenant cmdlet to mount a tenant database against the specified Microsoft Dynamics NAV Server instance. The database must already exist, and it must be a valid Microsoft Dynamics NAV 2015 database. Also, the Microsoft Dynamics NAV Server instance must be configured for multitenancy.

When a database is mounted against a Microsoft Dynamics NAV Server instance, the server can process requests for data for it.

When you mount a tenant database, the database is not synchronized against the application database. To synchronize the tenant database against the application database, you must use the Sync-NAVTenant cmdlet.

Parameters

-ServerInstance<String>

Specifies the Microsoft Dynamics NAV Server instance that you want to mount the tenant against, such as DynamicsNAV80. You can specify either the fully qualified name, such as 'MyServer$DynamicsNAV80', or the short name, such as 'DynamicsNAV80'.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-Id<String>

Specifies the ID of the tenant that you want to mount against the Microsoft Dynamics NAV Server instance, such as default or Tenant1.

If the tenant database has not been mounted on a Microsoft Dynamics NAV Server instance before, then the value that you specify becomes the ID that is assigned to the tenant database. The ID cannot be used by another tenant database and must comply with the following rules:

- Contains only letters (Aa-Zz), numbers (0-9), or dashes (-). Note: The ID is not case sensitive.

- Does start or end with a dash (-).

- Less than 63 characters.

If the database is the first tenant database ever to be mounted on the Microsoft Dynamics NAV Server instance, then you must set the value to default or set the OverwriteTenantIdInDatabase parameter to True, and then specify an ID according to the previous rules.

If the tenant database has been mounted on a Microsoft Dynamics NAV Server instance before, then you must specify the tenant ID that is assigned to that database or specify another ID according to the rules and set the OverwriteTenantIdInDatabase parameter to True.


Aliases

Id

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DatabaseInstance<System.String>

Specifies the name of the SQL Server instance that hosts the database. You can also specify the instance in the DatabaseServer parameter, such as MyServer\MyInstance.


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DatabaseName<System.String>

Specifies the name of the Microsoft Dynamics NAV database that you want to mount against the Microsoft Dynamics NAV Server instance, such as 'Demo Database NAV (8-0)'.


Aliases

Id

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DatabaseServer<System.String>

Specifies the name of the database server that hosts the Microsoft Dynamics NAV database that you want to mount against the Microsoft Dynamics NAV Server instance.


Aliases

Id

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DefaultCompany<System.String>

Specifies the name of the company that NAS Services, OData web services, and SOAP web services use if no other company is specified.


Aliases

Id

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-AlternateId<System.Collections.ObjectModel.ReadOnlyCollection[string]>

Specifies the alternative IDs for the tenant, such as host names for the Microsoft Dynamics NAV Web client, SOAP web services, OData web services, or the Microsoft Dynamics NAV Windows client.

If you use alternative IDs for tenant resolution in the Microsoft Dynamics NAV Web client, you must also enable some of the UrlRewrite rules in the Web.Config file for the Microsoft Dynamics NAV Web Server components.


Aliases

Id

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-AllowAppDatabaseWrite

Specifies if the tenant can write to the application database. The default value is false.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DoNotSaveConfiguration

Specifies if the configuration must not be saved when the cmdlet has completed the task. If the parameter is not set, the configuration settings are automatically saved.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

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

-NasServicesEnabled

Specifies if NAS Services must be started for the tenant. The default value is false.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OverwriteTenantIdInDatabase

Specifies if the Mount-NAVTenant cmdlet must overwrite the tenant ID in the database if the database has been mounted as a tenant earlier. If this is false, and the tenant database has previously been mounted with a different tenant ID, an exception is thrown.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

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 pipe the ServerInstance as a string to this cmdlet.


Outputs

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

  • None

    This cmdlet does not generate any output.


Examples

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

Description

-----------

This example mounts a tenant, 'Test', that is based on the tenant database 'Test_Database' on the specified Microsoft Dynamics NAV Server instance.


PS C:\> Mount-NAVTenant DynamicsNAV80 -Id 'Test' -DatabaseName 'Test_Database'

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

Description

-----------


This example mounts a tenant, 'Test', that is based on the tenant database 'Test_Database' on the specified Microsoft Dynamics NAV Server instance. The example uses positional arguments for the parameter values.


PS C:\> Mount-NAVTenant DynamicsNAV80 Test Test_Database

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

Description

-----------


This example gets information about the tenants that are mounted against the Server1 Microsoft Dynamics NAV Server instance and mounts them against the Server2 instance. You must then dismount the tenants from the Server1 instance.


PS C:\> Get-NAVTenant Server1 | Mount-NAVTenant Server2

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

Description

-----------


This example gets information about the tenants that are mounted against the Server1 Microsoft Dynamics NAV Server instance, dismounts them, and then mounts them against the Server2 instance.


PS C:\> Get-NAVTenant Server1 | Dismount-NavTenant Server1 -Force | Mount-NAVTenant Server2

--------------------------EXAMPLE 5--------------------------

Description

-----------


This example mounts a tenant, 'Test', that is based on the tenant database 'Test_Database' on the specified Microsoft Dynamics NAV Server instance and adds a domain name and a SharePoint host URL to the alternative IDs.


PS C:\> Mount-NAVTenant DynamicsNAV80 -Id 'Test' -DatabaseName 'Test_Database'-AlternateId @( "test.mydomain.com", "http://mydomain.sharepoint.com/sites/teamsite" )

Show: