diff --git a/initenv.ps1 b/initenv.ps1 index 2d1e727..3b88f18 100644 --- a/initenv.ps1 +++ b/initenv.ps1 @@ -1,3 +1,9 @@ +# Ensure that WinGet PS Module is available +if (!(Get-Module -ListAvailable -Name Microsoft.WinGet.Client)) { + Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted + Install-Module -Name Microsoft.WinGet.Client -Repository "PSGallery" +} + # Get installed applications so that we can identify what needs to be installed $InstalledApplications = Get-WmiObject -Class Win32_Product