Upgrade UniFi Controller as a service


Ubiquiti provides instructions here for running the UniFi Controller as a service. What they don’t tell you is that when you try to upgrade the controller, you can’t, because the service is still running. Here are the instructions for that:

1. Back up your config from Settings > Maintenance > Download Backup.  If that doesn’t work from remote access, try it from a browser on the LAN.  If _that_ doesn’t work, go to Settings > Auto Backup and download the most recent backup.

2. On the server running the controller, open an administrative Command Prompt.  Stop the UniFi Java service:

cd "%UserProfile%\Ubiquiti UniFi\"
java -jar lib\ace.jar stopsvc

3. Overinstall the new controller (run UniFi-installer.exe).  On the last page of the install wizard, check “Start UniFi Controller after installation”.

4. In the small window that opens, wait until it says “UniFi Controller (x.xx.xx) started”:


Close the window (do not launch browser).

5. Back at the administrative Command Prompt, install and start the service:

java -jar lib\ace.jar installsvc
java -jar lib\ace.jar startsvc

6. Test access from a brows

How to download embedded videos with F12 Tools in your browser

From: https://www.hanselman.com/blog/HowToDownloadEmbeddedVideosWithF12ToolsInYourBrowser.aspx

I got an email this week asking how to download some of my Azure Friday video podcast videos from http://friday.azure.com as well as some of the Getting Started Videos from Azure.com.

NOTE: Respect copyright and consider what you’re doing and WHY before you use this technique to download videos that may have been embedded for a reason.

I told them to download the videos with F12 tools, and they weren’t clear how. I’ll use an Azure Friday video for the example. Do be aware that there are a ton of ways to embed video on the web and this doesn’t get around ones that REALLY don’t want to be downloaded. This won’t help you with Netflix, Hulu, etc.

First, I’ll visit the site with the video I want in my browser. I’ll use Chrome but this also works in Edge or Firefox with slightly different menus.

Then press F12 to bring up the Developer Tools pane and click Network. In Edge, click Content Type, then Media.

Download embedded videos with F12

Click the “clear” button to set up your workspace. That’s the International No button there in the Network pane. Now, press Play and get ready.

Look in the Media list for something like “.mp4” or something that looks like the video you want. It’ll likely have an HTTP Response in the 20x range.

Download 200

In Chrome, right click on the URL and select Copy as CURL. If you’re on Windows pick cmd.exe and bash if you’re on Linux/Mac.

Downloading with CURL

You’ll get a crazy long command put into your clipboard. It’s not all needed but it’s a very convenient feature the browser provides, so it’s worth using.

Get Curl: If you don’t have the “curl” command you’ll want to download “curl.exe” from here https://curl.haxx.se/dlwiz/ and, if you like, put it in your PATH. If you have Windows, get the free bundled curl version with installer here.

Open a terminal/command prompt – run cmd.exe on Windows – and paste in the command.


BEFORE you press enter, make sure you add “-o youroutputfilename.mp4.” Also, if you can an error about security and certificates, you may need to add “–insecure.”

Downloading a streaming video file with CURL

In the screenshot above I’m saving the file as “test.mp4” on my desktop.

There are several ways to download embedded videos, including a number of online utilities that come and go, but this technique has been very reliable for me.

Retain multi-line cells when pasting Word table into Excel



In Word, select the table.

Press Ctrl+H to activate the replace dialog.

Enter ^p in the Find what box.

Enter some text that doesn’t occur otherwise in the Replace with box, for example @@@@.

Click Replace All and don’t allow it to continue beyond the table.

Close the Replace dialog.

Copy / paste the table into Excel.

Press Ctrl+H to activate the replace dialog.

Enter @@@@ (or whatever you used in Word) in the Find what box.

Press Alt+0010 in the Replace with box.

Click Options >> and make sure that the “Match entire cell contents” check box is clear.

Click Replace All.

You may have to format the cells to wrap text.

Analyze a Windows Error Code


1. Use the Windows Calculator app in Programmer mode to convert 2147942667 to hex to get 0x8007010B:

Windows Error Analysis

2. According to Hans, the “7” in 0x8007010B makes it a Windows error, which makes 0x010B the error code. (Basically, just look at the last four bytes.) Converted back to decimal, 0x010B is 267. MSDN tells us that this means, “The directory name is invalid.”

How to renew SSL cert for Remote App



  1. Launch IIS Manager and click the SERVER name (not the websites or virtual directories)
  2. In the IIS section, click SERVER CERTIFICATES (if you don’t see this, you are likely not at the server level, go click on the server name at the top of the IIS Manager CONNECTIONS tree)
  3. Click CREATE CERTIFICATE REQUEST and complete the form. Note that the only things that really counts is the certificate name (like tsg.commodore.ca) and company information.
  4. Click NEXT and on the CRYPTOGRAPHIC screen, leave the default MICROSOFT RSA… provider option but you mush change the BIT LENGTH to 2048.
  5. Specify a path for the CSR.  I like C:\ but it realy make no difference.

Skip this part for 2012r2, just to MAP A CERT

  1. Open the Certificates snap-in console. If you have not already added the Certificates snap-in console, you can do so by doing the following:
  2. Click Start, click Run, type mmc, and then click OK.
  3. On the File menu, click Add/Remove Snap-in.
  4. In the Add or Remove Snap-ins dialog box, in the Available snap-ins list, click Certificates, and then click Add.
  5. In the Certificates snap-in dialog box, click Computer account, and then click Next.
  6. In the Select Computer dialog box, click Local computer: (the computer this console is running on), and then click Finish.
  7. In the Add or Remove snap-ins dialog box, click OK.
  8. In the Certificates snap-in console, in the console tree, expand Certificates (Local Computer), and then click Personal.
  9. Right-click the Personal folder, point to All Tasks, and then click Import.
  10. On the Welcome to the Certificate Import Wizard page, click Next.
  11. On the File to Import page, in the File name box, specify the name of the certificate that you want to import, and then click Next.
  12. On the Password page, do the following:
  13. If you specified a password for the private key associated with the certificate earlier, type the password.
  14. If you want to mark the private key for the certificate as exportable, ensure that Mark this key as exportable is selected.
  15. If you want to include all extended properties for the certificate, ensure that Include all extended properties is selected.
  16. Click Next.
  17. On the Certificate Store page, accept the default option, and then click Next.
  18. On the Completing the Certificate Import Wizard page, confirm that the correct certificate has been selected.
  19. Click Finish.
  20. After the certificate import has successfully completed, a message appears confirming that the import was successful. Click OK.
  21. With Certificates selected in the console tree, in the details pane, verify that the correct certificate appears in the list of certificates on the TS Gateway server. The certificate must be under the Personal store of the local computer.


  1. You must use TS Gateway Manager to map the TS Gateway server certificate. If you map a TS Gateway server certificate by using any other method, TS Gateway will not function correctly.
  2. Open TS Gateway Manager. To open TS Gateway Manager, click Start, point to Administrative Tools, point to Terminal Services, and then click TS Gateway Manager.
  3. In the TS Gateway Manager console tree, right-click the local TS Gateway server, and then click Properties.
  4. On the SSL Certificate tab, click Select an existing certificate for SSL encryption (recommended), and then click Browse Certificates.
  5. In the Install Certificate dialog box, click the certificate that you want to use, and then click Install.
  6. Click OK to close the Properties dialog box for the TS Gateway server.
  7. If this is the first time that you have mapped the TS Gateway certificate, after the certificate mapping is completed, you can verify that the mapping was successful by viewing the TS Gateway Server Status area in TS Gateway Manager. Under Configuration Status and Configuration Tasks, the warning stating that a server certificate is not yet installed or selected and the View or modify certificate properties hyperlink are no longer displayed
Back to Top