24 lines
868 B
PowerShell
24 lines
868 B
PowerShell
#!/bin/pwsh
|
|
param($context);
|
|
|
|
. "$PSScriptRoot/../../Scripts/Context.ps1";
|
|
[Context] $context = $context;
|
|
|
|
Write-Host "Installing UniFi Controller";
|
|
Write-Information "Downgrading AutoHotkey";
|
|
$ahkID = "AutoHotkey.AutoHotkey";
|
|
winget uninstall --accept-source-agreements -e --id "$ahkID";
|
|
winget install --accept-source-agreements --accept-package-agreements -e --id "$ahkID" --version "1.1.37.00";
|
|
|
|
Write-Information "Installing JRE... eww...";
|
|
choco install -y temurin11jre;
|
|
|
|
Write-Information "Installing UniFi Controller";
|
|
choco install -y ubiquiti-unifi-controller --ignore-dependencies;
|
|
|
|
Write-Information "Upgrading AutoHotkey";
|
|
winget uninstall --accept-source-agreements -e --id "$ahkID";
|
|
winget install --accept-source-agreements --accept-package-agreements -e --id "$ahkID";
|
|
|
|
Write-Information "Removing desktop icon";
|
|
$context.RemoveDesktopIcon("UniFi*");
|