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 2017 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:
- Getting Started with Windows PowerShell
- Scripting with Windows PowerShell (with videos)
- The Windows PowerShell blog
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.
Copy Code | |
---|---|
Get-Help <cmdlet name> |
You can also obtain help for the Get-Help
cmdlet itself to learn about different ways to use it.
Copy Code | |
---|---|
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.
Copy Code | |
---|---|
Set-ExecutionPolicy "RemoteSigned" -Scope Process |
For more information about PowerShell execution policy, see About Execution Policies.