次の方法で共有


Sample Windows PowerShell Scripts for Microsoft Dynamics NAV

The Microsoft Dynamics NAV product media includes a folder that has examples of how you can use the Microsoft Dynamics NAV Windows PowerShell cmdlets to upgrade, deploy, and maintain your Microsoft Dynamics NAV solution.

Microsoft Dynamics NAV Sample Scripts

The sample Windows PowerShell scripts are available in the WindowsPowerShellScripts folder on the Microsoft Dynamics NAV product media.

You can copy the folder to your computer and use the scripts as a starting point for managing your own solution. Depending on your solution, you can then add the sample Windows PowerShell module into the Microsoft Dynamics NAV 2016 Administration Shell or Microsoft Dynamics NAV 2016 Development Shell and then run the scripts.

The current version of Microsoft Dynamics NAV includes the following sample modules.

Parent folder Module name Description

ApplicationMergeUtilities

Contains sample scripts that illustrate different ways of using Windows PowerShell cmdlets to merge and modify application objects. The sample scripts use the Microsoft.Dynamics.Nav.Model.Tools.psd1 module, which you must import first.

Cloud

HowTo

Contains sample scripts and files for deploying a fully functional end-to-end Microsoft Dynamics NAV solution on Microsoft Azure virtual machines. For more information, see For more information, see Deploying Microsoft Dynamics NAV Using the Example Scripts

NAVAdministration

Illustrates how Windows PowerShell can be used to automate the provisioning and management of Microsoft Dynamics NAV installations on a virtual machine (VM).

NAVRemoteAdministration

Illustrates how Windows PowerShell can be used to automate the provisioning and management of Microsoft Dynamics NAV installations on Azure VMs.

NAVRemoteAdministrationSamples

Provides examples of a fully automated deployment of Microsoft Dynamics NAV on Azure.

Multitenancy

NAVMultitenancySamples

Illustrates how you can automate the steps that are required to migrate to a multitenant deployment architecture.

For more information, see Migrating to Multitenancy.

Upgrade

NAVUpgradeModule

Illustrates how you can automate the upgrade of a Microsoft Dynamics NAV 2013 database to Microsoft Dynamics NAV 2016.

For more information, see Upgrading to Microsoft Dynamics NAV 2016.

Running the Sample Scripts

The sample scripts are designed to be run from the context of the Windows PowerShell module that is part of each collection of sample scripts. For example, to run the scripts for upgrading to Microsoft Dynamics NAV, import the NAVUpgradeSamples.psm1 module into the Microsoft Dynamics NAV 2016 Administration Shell. Similarly, to run the sample scripts for merging application objects, open the HowTo-Start-Import-NAV-Module.ps1 script in the Windows PowerShell IDE, navigate the command prompt to the folder where you placed the samples, and then run the script.

For more information, see Getting Started with Windows PowerShell in the TechNet Library.

See Also

Concepts

Administration
Deployment
Comparing and Merging Application Object Source Files
Deploying and Managing Microsoft Dynamics NAV on Microsoft Azure

Other Resources

Upgrading to Microsoft Dynamics NAV 2016