Last active
May 19, 2021 19:02
-
-
Save jwmoss/d15cf07ad0a088b9b552d69b82932403 to your computer and use it in GitHub Desktop.
Provision new workspace with necessary modules
This file contains hidden or 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 = @( | |
"ImportExcel", | |
"PoshRSJob", | |
"PowershellGet", | |
"Invoke-CommandAs", | |
"PSFramework", | |
"Posh365" | |
) | |
## Force TLS 1.2 | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
## Install Nuget | |
Get-PackageProvider -Name Nuget -ForceBootstrap | Out-Null | |
## Trust PSGallery | |
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | |
## Set execution policy | |
Set-ExecutionPolicy Unrestricted -Force | |
## Install the modules | |
Install-Module $modules -Scope CurrentUser -Force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment