initenv: ensure that winget module is available

This commit is contained in:
2024-07-07 16:36:21 -04:00
parent ad8e674f38
commit f3601f3703

View File

@@ -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 # Get installed applications so that we can identify what needs to be installed
$InstalledApplications = Get-WmiObject -Class Win32_Product $InstalledApplications = Get-WmiObject -Class Win32_Product