Write-Host "Make a backup of your controller before upgrading. Write-Host "Uncheck the box to start the Unifi Controller at the end of its installation!" # Directions to configure the Windows Unifi Controller to run as a Windows service the first time can be found here: # This script assumes that you have already configured the UniFi controller to run as a service and are upgrading it with a new version that you have already downloaded to your hard drive or another location Windows Explorer can reach. \Update-UnifiControllerService.ps1 then press Enter. Then open an elevated PowerShell console (as administrator) and run the script by typing. The next time your controller console prompts to download a software update, do so. Save the file as Update-UnifiControllerService.PS1 in your documents folder, or wherever makes sense to you. I wrote the script below to automate most of the process.
#INSTALL UNIFI CONTROLLER AS A SERVICE INSTALL#
You have to uninstall the service, install the update, and then re-install the service by issuing a series of commands each time. The downside of running the controller software as a service is that updates become considerably more painful to accomplish. If you haven’t already configured it to run as a service, see these instructions on the UniFi support site UniFi – Run the Controller as a Windows Service – Ubiquiti Support and Help Center. Running the controller as a service allows it to start automatically when your computer reboots, among other things. The Windows software based controller for your UniFi wireless network is more useful when run as a Windows service.