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

27 lines
899 B
PowerShell
Raw Normal View History

2024-08-08 02:36:35 +00:00
param(
$Action,
[hashtable] $Arguments
)
2024-09-23 01:33:17 +00:00
. "$PSScriptRoot/../../Scripts/SoftwareManagement.ps1";
2024-08-08 02:36:35 +00:00
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {
Write-Information "Downgrading AutoHotkey…";
$id = "AutoHotkey.AutoHotkey";
$uninstall = { winget uninstall --accept-source-agreements -e --id "$id"; };
& $uninstall;
Install-WingetPackage $id -ArgumentList "--version","1.1.37.00";
Install-ChocoPackage temurin11jre;
Write-Host "Installing UniFi Controller…";
Install-ChocoPackage ubiquiti-unifi-controller -ArgumentList "--ignore-dependencies";
Write-Information "Upgrading AutoHotkey…";
& $uninstall;
Install-WingetPackage $id;
Remove-DesktopIcon "UniFi*";
};