Created
February 21, 2023 15:59
-
-
Save kilasuit/aea36fbdae754b0fa0764061e7e43ab5 to your computer and use it in GitHub Desktop.
Install modules using module pinning without PSDepend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$modules = @( | |
@{Name = 'az'; RequiredVersion = '8.0.0' } | |
@{Name = 'BetterCredentials'; RequiredVersion = '4.5' } | |
@{Name = 'Configuration'; RequiredVersion = '1.5.0' } | |
@{Name = 'EditorServicesCommandSuite'; RequiredVersion = '0.4.0' } | |
@{Name = 'ExchangeOnlineManagement'; RequiredVersion = '2.0.3'} | |
@{Name = 'ISESteroids'; RequiredVersion = '2.7.1.9'} | |
@{Name = 'ISE_Cew'; RequiredVersion = '0.1.10'} | |
@{Name = 'Lability'; RequiredVersion = '0.20.0' } | |
@{Name = 'Microsoft.PowerShell.SecretManagement'; RequiredVersion = '1.1.1' } | |
@{Name = 'PnP.PowerShell'; RequiredVersion = '1.8.0' } | |
@{Name = 'PSKoans'; RequiredVersion = '0.67.1' } | |
@{Name = 'PSScriptAnalyzer'; RequiredVersion = '1.20.0' } | |
@{Name = 'PowerShellGet'; RequiredVersion = '2.2.5' } # replace below with this one if you feel like it | |
# @{Name = 'PowerShellGet'; RequiredVersion = '3.0.17-beta18'; AllowPreRelease = $true } | |
@{Name = 'PowerShellHumanizer'; RequiredVersion = '3.2' } | |
@{Name = 'Pester'; RequiredVersion = '4.10.1' } | |
@{Name = 'PsHosts'; RequiredVersion = '1.2.2'} | |
@{Name = 'PSScriptAnalyzer'; RequiredVersion = '1.9.0'} | |
@{Name = 'posh-docker'; RequiredVersion = '0.7.1' } | |
@{Name = 'posh-git'; RequiredVersion = '0.7.3'} | |
@{Name = 'SharePointPnPPowerShellOnline'; RequiredVersion = '3.16.1912.0'} | |
@{Name = 'ShowPSAst'; RequiredVersion = '1.0'} | |
@{Name = 'ThreadJob'; RequiredVersion = '2.0.3' } | |
@{Name = 'ugit'; RequiredVersion = '0.3.2' } | |
) | |
$modules| ForEach-Object {$module = $_ ; Start-job -Name $module.Name -ScriptBlock { $moduletoInstall = $using:module ; Install-Module @moduletoInstall -Force -Repository PSGallery -SkipPublisherCheck -AllowClobber -Verbose} } | |
Get-Job | Wait-Job |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment