Install-RequiredModule

1.0.1

Parses a RequiredModules.psd1 listing modules and attempts to import those modules.
If it can't find the module in the PSModulePath, attempts to install it from PowerShellGet.

The RequiredModules list looks like this (uses nuget version range syntax):
@{
   "PowerShellGet" = "2.0.4"
   "Configuration" = "[1.3.1,2.0)"
   "Pester"        = "[4.4.2,4.7.0]"
}

https:/
Parses a RequiredModules.psd1 listing modules and attempts to import those modules.
If it can't find the module in the PSModulePath, attempts to install it from PowerShellGet.

The RequiredModules list looks like this (uses nuget version range syntax):
@{
   "PowerShellGet" = "2.0.4"
   "Configuration" = "[1.3.1,2.0)"
   "Pester"        = "[4.4.2,4.7.0]"
}

https://docs.microsoft.com/en-us/nuget/reference/package-versioning#version-ranges-and-wildcards

Show more
There is a newer prerelease version of this script available.
See the version list below for details.

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name Install-RequiredModule -RequiredVersion 1.0.1

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

Copyright 2019, Joel Bennett

Package Details

Author(s)

  • Joel 'Jaykul' Bennett

Tags

Install Modules Development ModuleBuilder

Functions

GetModuleVersion FindModuleVersion Import-Requirements InstallModuleVersion

Dependencies

Release Notes

1.0.1 Fix "Version '3.4.0' of module 'Pester' is already installed"
1.0.0 This is the first public release - it probably doesn't work right

FileList

Version History

Version Downloads Last updated
5.1.0-upgrad... 226 9/22/2022
5.1.0-upgrad... 10 9/22/2022
5.1.0-upgrad... 16 9/14/2022
5.1.0-upgrad... 12 9/14/2022
5.0.5 41,354 9/3/2022
5.0.2 6,474 12/2/2021
5.0.1 17 12/2/2021
5.0.0 41 12/1/2021
4.0.6 50,603 6/4/2019
4.0.5 59 5/15/2019
4.0.4 84 4/27/2019
4.0.3 23 4/27/2019
4.0.2 34 4/27/2019
4.0.1 23 4/27/2019
4.0.0 30 4/24/2019
3.0.0 37 3/22/2019
2.0.1 24 3/21/2019
2.0.0 30 3/21/2019
1.0.1 (current version) 26 3/21/2019
1.0.0 26 3/20/2019
Show less