tests/install.ps1
[string[]]$PowerShellModules = @("Pester", 'posh-git') [string[]]$PackageProviders = @('NuGet', 'PowerShellGet') # Line break for readability in AppVeyor console Write-Host -Object '' # Install package providers for PowerShell Modules ForEach ($Provider in $PackageProviders) { If (!(Get-PackageProvider $Provider -ErrorAction SilentlyContinue)) { Install-PackageProvider $Provider -Force -ForceBootstrap -Scope CurrentUser } } # Install the PowerShell Modules ForEach ($Module in $PowerShellModules) { If (!(Get-Module -ListAvailable $Module -ErrorAction SilentlyContinue)) { Install-Module $Module -Scope CurrentUser -Force -Repository PSGallery } Import-Module $Module } |