2023-07-12 20:37:31 +00:00
|
|
|
#!/bin/pwsh
|
2023-07-29 01:37:43 +00:00
|
|
|
. "$PSScriptRoot/Context.ps1";
|
2023-07-19 07:54:45 +00:00
|
|
|
|
2023-07-29 01:37:43 +00:00
|
|
|
[Context]::new().PreventSleepMode();
|
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
|
|
|
}
|
|
|
|
|
2024-03-24 14:18:01 +00:00
|
|
|
foreach ($module in @("PSWindowsUpdate"))
|
2023-06-18 17:58:01 +00:00
|
|
|
{
|
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
|
|
|
}
|
|
|
|
}
|
2023-07-30 12:33:02 +00:00
|
|
|
|
2023-07-31 23:04:49 +00:00
|
|
|
if (-not (Get-Command 7z -ErrorAction SilentlyContinue)) {
|
2023-07-30 12:33:02 +00:00
|
|
|
choco install -y 7zip.portable;
|
|
|
|
}
|