Import Module
How to import CAT PowerShell module?
What on earth is a PowerShell module?
PowerShell works with modules. Cmdlets, functions, aliases and other PowerShell stuff is organized in modules. When you want to use something from a module, PowerShell needs to load it into your PowerShell session. Good news is that PowerShell is doing this automatically once you invoke some PowerShell command from a module you don’t have loaded.
When you run this command in a new PowerShell session:
Get-Module
you should get list of PowerShell modules in your session:
Now, try to run some CAT command, e.g. Get-CatInstance
(it returns info about your CAT installation).
Get-CatInstance
The result is not important now, but run Get-Module
again. You see CAT module was automatically loaded into your session:
But why is it important?
It is important only in one case - if you have installed more versions of CAT on your mahcine. Here is info how to check what you have installed.
If you have more versions of CAT installed, you need to be aware what version you are loading. You can handle that by specifying explicitly what version of CAT you want to work with:
Import-Module CAT -RequiredVersion 0.11.0.3
There are also other options, like using -MinimumVersion
or -MaximumVersion
parameters, e.g.,
Import-Module CAT -MinimumVersion 0.10.0