PortValhalla/scripts/Windows/Software/Ubiquiti UniFi Controller/Install.ps1

25 lines
868 B
PowerShell
Raw Normal View History

2023-07-18 17:09:12 +00:00
#!/bin/pwsh
2023-07-18 18:28:46 +00:00
param($context);
. "$PSScriptRoot/../../Scripts/Context.ps1";
[Context] $context = $context;
2023-07-18 18:26:27 +00:00
Write-Host "Installing UniFi Controller";
Write-Information "Downgrading AutoHotkey";
2023-07-18 17:09:12 +00:00
$ahkID = "AutoHotkey.AutoHotkey";
2023-07-18 17:13:11 +00:00
winget uninstall --accept-source-agreements -e --id "$ahkID";
2023-07-18 17:39:31 +00:00
winget install --accept-source-agreements --accept-package-agreements -e --id "$ahkID" --version "1.1.37.00";
2023-07-18 18:26:27 +00:00
Write-Information "Installing JRE... eww...";
2023-07-18 17:09:12 +00:00
choco install -y temurin11jre;
2023-07-18 18:26:27 +00:00
Write-Information "Installing UniFi Controller";
choco install -y ubiquiti-unifi-controller --ignore-dependencies;
2023-07-18 18:26:27 +00:00
Write-Information "Upgrading AutoHotkey";
2023-07-18 17:35:55 +00:00
winget uninstall --accept-source-agreements -e --id "$ahkID";
2023-07-18 17:09:12 +00:00
winget install --accept-source-agreements --accept-package-agreements -e --id "$ahkID";
2023-07-18 18:28:46 +00:00
Write-Information "Removing desktop icon";
$context.RemoveDesktopIcon("UniFi*");