2023-07-12 20:37:31 +00:00
|
|
|
#!/bin/pwsh
|
2023-07-19 07:54:45 +00:00
|
|
|
$Global:InformationPreference = "Continue";
|
|
|
|
$Global:ErrorActionPreference = "Inquire";
|
|
|
|
|
2023-07-19 07:53:11 +00:00
|
|
|
$null = powershell -c Get-PackageProvider -ListAvailable NuGet;
|
|
|
|
|
|
|
|
if (-not $?) {
|
2023-07-19 07:48:08 +00:00
|
|
|
Write-Host "Installing NuGet PackageProvider";
|
2023-07-20 08:18:43 +00:00
|
|
|
powershell -c '$null = Install-PackageProvider -Name NuGet -Force';
|
2023-07-19 07:41:22 +00:00
|
|
|
}
|
|
|
|
|
2023-06-18 17:58:01 +00:00
|
|
|
foreach ($module in @("PSWindowsUpdate", "KnownFolders"))
|
|
|
|
{
|
2023-06-22 15:22:45 +00:00
|
|
|
if (-not (Get-Module -ListAvailable $module))
|
2023-06-18 17:58:01 +00:00
|
|
|
{
|
2023-07-19 07:48:08 +00:00
|
|
|
Write-Host "Installing PowerShell Module $module";
|
2023-06-18 17:58:01 +00:00
|
|
|
Install-Module -AcceptLicense -Force "$module";
|
|
|
|
}
|
|
|
|
}
|
2023-06-22 15:27:43 +00:00
|
|
|
|
2023-07-18 18:04:34 +00:00
|
|
|
foreach ($nativeModule in @("PinnedItem")) {
|
|
|
|
if (-not (powershell -c Get-Module -ListAvailable $nativeModule)) {
|
2023-07-19 07:48:08 +00:00
|
|
|
Write-Host "Installing Windows PowerShell Module $nativeModule";
|
2023-07-18 19:41:47 +00:00
|
|
|
powershell -c Install-Module -Force "$nativeModule";
|
2023-07-18 18:04:34 +00:00
|
|
|
}
|
|
|
|
}
|