«

»

Print this Post

How to install Waldo’s PowerShell Modules

A while ago, I announced the “release” of my PowerShell scripts and functions here. It’s a big thing for me, as lots and lots of efforts and time have been put into it (and still), but more important .. I’m convinced it can save you lots of time.

Now, I only announced it, and for people that are not that familiar with PowerShell, it’s not that obvious on how to get going. Let me try to introduce you to the modules, and how to make it available on your system.

To start with, you can download the package from my GitHub here: https://github.com/waldo1001/Cloud.Ready.Software.PowerShell

You can either download the zip, or fork into it using GitHub (if you have an account, of course). Downloading the zip is obviously the easiest, as it doesn’t require any GitHub knowledge or installation. But if you fork it, you can contribute to this, and we can be one big happy PowerShell family 😉

Modules

I make a distinction between functions and scripts. When you look at the master folder, you’ll see a bunch of numbered folders – these are my scripts! And there is one folderPSModules” – there are my functions, which are categorized into 4 modules:

  • Cloud.Ready.Software.NAV: this module contains functions that has anything to do with NAV. It needs no explanation that this module will contain most functions 😉
  • Cloud.Ready.Software.PowerShell: contains typical PowerShell functions. At this moment, only one function is in there: that is to manage confirms (yes/no questions).
  • Cloud.Ready.Software.SQL: contains functions that has anything to do with SQL, like backups, restores, invoke any query .. things like that
  • Cloud.Ready.Software.Windows: has the typical windows-related functions, like zip and unzip, working with streams, files, ISO, .. .

So, a lot of code for you to consume. Lots of the NAV functions are dependent of the other modules, so I advise always to install all 4 modules!

How do I install

Well, you can copy and extract the files to virtually any place on your system. I even put them on my dropbox, so that I can make them easily available on all my systems – it’s just a matter of enabling that system with my dropbox and I’m done – all scripts are up-to-date :-).

When copied and extracted, you need to browse to the PSModules folder, where you will find the installation scripts.

  1. InstallModule.ps1

    This is obviously THE installation file to make the modules available to the system. It’s going to update your PSModules-path, and make sure PowerShell will always find these modules. On top of that, it’s going to load the modules, so you don’t need to do it any more ;-). Easy peasy! After this, you’re good to go, nothing else needed to work with the module. The following 2 scripts are just for your convenience.

  2. CreateProfileInISE.ps1

    This one is only useful in PowerShell ISE! The script is going to add some menu buttons to your ISE (scripting environment). When you run this, it’s going to add some code to your profile-script, and you’ll end up with this:

    It’s just there, because I like to use it this way: easy to load the NAV commandlets, and to other things I like to have behind a button click. If you don’t want it, just don’t run the script!

  3. LoadModules.ps1

    This is the last script in this folder, and quite useless only in one particular situation: when you notice PowerShell isn’t running the last version of your changed function (assuming you changed one of my functions..), then just run this script, and it will force to reload the modules. When you did step 2, this function is behind the last menu item.

You’re good to go!

That’s it! You’re good to go, and use the scripts AND functions whenever you like to! It’s indeed just a matter of running one script (the first one) and you’re good to go.

If you want to have an overview of all the functions that are in the modules, then just run this commandlet:

Get-Command -Module ‘Cloud.Ready.Software.*’

Tracking updates on GitHub

Very likely, more functions are coming, and functions or scripts get updated. If you’re interested in these updates, just monitor my commits on GitHub :-). With each commit, you can see what has been changed, even look at the file and figure out whether it’s interesting for you or not ;-).

Enjoy!

4.80 avg. rating (95% score) - 5 votes

Permanent link to this article: http://www.waldo.be/2015/12/09/how-to-install-waldos-powershell-modules/

4 pings

  1. How to install Waldo’s PowerShell Modules - Waldo's Blog - Microsoft Dynamics NAV

    […] Continue reading » […]

  2. How to install Waldo’s PowerShell Modules | Pardaan.com

    […] Bron : Waldo’s Blog Lees meer… […]

  3. Export NAV Application Objects - Waldo's Blog - Microsoft Dynamics NAV - NAV User Group - Dynamics User Group

    […] function is available in my PowerShell Module on GitHub, so I strongly recommend you to install the module for you to be able to use it. But let me shortly tell you how it works. The functions are quite […]

  4. Create NAV Environment with PowerShell - theDenSter

    […] The first thing you need is to install Waldo’s PowerShell modules, I will be using those for just about everything. I could figure out how to script all of this stuff myself, but why would I if Waldo already did that for us, and he is sharing his scripts. For instructions read Waldo’s blog here. […]

Leave a Reply

%d bloggers like this: