Using PowerShell with Microsoft Dynamics NAV – Part 1 (Getting Started, Changing NAV License)

PowershellISE-smallThis is the first post in a five part series on using PowerShell with Microsoft Dynamics NAV.

In the video, I discuss the different ways of accessing PowerShell, how to load the NAV Command Applet, and how to change a NAV license using PowerShell. For comparison, I also show how to change/upload a NAV license the traditional way from the NAV Development Client.

If you are unable to view the video below (or to watch it in HD), click here to view it directly on YouTube.

Download link: PowerShell Script to load NAV Command Applet shown in video (zipped file)

Note that the script in the download link is for NAV 2016. In the Import-Module line, replace 90 with 80 if you have NAV 2015 installed. Replace with 71 for NAV 2013 R2.

Come back next week for Part 2 of the Using PowerShell with NAV series!

Why Should I Use PowerShell? And How?!

Microsoft Dynamics NAV has supported PowerShell scripting for a few versions now (since 2013, if I recall correctly), but from talking to my peers on the consulting side as well as end-users, I find that it is largely under-utilized by the NAV community.

NAV PowerShell

The fact that it lacks a fancy GUI makes it intimidating for some, and others simply aren’t aware of what can be accomplished using PowerShell scripts for NAV or how much time it can save – especially when performing repetitive administrative tasks.

It is important to note that you do not need to be a NAV developer to learn and use PowerShell. In fact, most activities that you will perform using PowerShell are completely unrelated to development activities. To elaborate: In the Development Environment, you typically create Tables, Pages, Reports, add fields to Tables, etc. In the PowerShell environment, you create users, service tiers, perform backups, change licenses, etc.

To help familiarize the NAV community with this extremely useful, but often overlooked tool, we are launching a new section on LetsTalkNAV.com dedicated just to PowerShell, with a goal of posting one to two articles each month specifically on this topic.

Our first PowerShell educational article will be published next week, and I will start with basics, so whether you are a beginner to PowerShell or just new to using it with NAV, everyone will be able to follow along as this we go from simple to more advanced tasks.

Stay tuned!