en-US/about_SpecModuleImporter.help.txt

TOPIC
    about_SpecModuleImporter
 
SHORT DESCRIPTION
    A module that assists with the importing of PowerShell modules from the PSGallery
 
LONG DESCRIPTION
    This module can assist with the installation and importing of modules from the PSGallery.
    - You are able to specify a particular verions number to install, or you can install the latest version.
    - You are able to import as specific module version even though multiple versions are installed.
 
EXAMPLES
# Install a specific version of a module. (If you want the latest version set RequiredVersion = "")
 
 
$Modules = @(
 
    @{
        moduleName = 'SpecBaseModule'
        requiredVersion = "1.0.2"
 
    },
    @{
        moduleName = 'Az.Accounts'
        requiredVersion = '2.10.2'
    }
)
 
#install modules if required
$modules | % { Install-SpecPowerShellModule -Module $_.moduleName -RequiredVersion $_.requiredVersion -Scope CurrentUser -Verbose}
 
#Import the specified version of the module
$modules | % { Import-SpecPowerShellModule -Module $_['moduleName'] -RequiredVersion $_['requiredVersion'] -Verbose }
 
 
 
KEYWORDS
 
 
SEE ALSO