Working with PowerShell
Windows PowerShell is a Windows command-line shell that is designed especially for system administrators.
To start a Microsoft Dynamics NAV PowerShell session, on the Start menu, choose All Programs, and then choose Microsoft Dynamics NAV 2016 Administration Shell. This opens a PowerShell prompt where the Microsoft Dynamics NAV cmdlets are available.
If this is your first time working with Windows PowerShell, there are various online resources for learning, which include the following:
Scripting with Windows PowerShell (with videos)
All Windows PowerShell cmdlets support the parameters in the following table.
Parameter | Definition |
---|---|
|
Use this parameter with a cmdlet to make sure that you do not unintentionally overwrite files that you have already uploaded. |
|
Use this parameter to display messages that indicate how the action is processing. |
In addition, you can use the Get-Help cmdlet in combination with any Microsoft Dynamics NAV cmdlets to view a cmdlets definition, information about parameters, and examples.
Get-Help <cmdlet name>
You can also obtain help for the Get-Help
cmdlet itself to learn about different ways to use it.
Get-Help Get-Help
Windows PowerShell Scripts
Because the Microsoft Dynamics NAV PowerShell cmdlets for Microsoft Azure require many parameters, it is easier and more efficient to use scripts instead of entering cmdlets directly at the prompt. By using scripts, you can easily debug your cmdlets, and save them for reuse.
Windows PowerShell scripts have a .ps1 file name extension. Before you can run a script, you must change the script execution policy to allow for scripts to run that originate on the local computer. To do this, run the following command at the PowerShell prompt.
Set-ExecutionPolicy "RemoteSigned" -Scope Process
For more information about PowerShell execution policy, see About Execution Policies.
See Also
Concepts
Preparing for Deploying Microsoft Dynamics NAV on Microsoft Azure
Deploying and Managing Microsoft Dynamics NAV on Microsoft Azure
Deploying Microsoft Dynamics NAV Using the Example Scripts