Microsoft Nano Server

This page describes the steps for installing and upgrading NXLog Agent on Microsoft Nano Server.

Installing NXLog Agent

Follow these steps to install NXLog Agent on Microsoft Nano Server.

Microsoft Nano Server does not support the installation of MSI files. In its place, Microsoft introduced the APPX format. The sandboxing and isolation imposed by the APPX format was found to be an unnecessary complication when deploying NXLog Agent; therefore, users are provided with a ZIP file that allows for manual installation instead.

First, download the NXLog Agent ZIP archive from the NXLog website.

  1. Log in to your account, then click My account at the top of the page.

  2. Under the Downloads > NXLog Agent files tab, download nxlog-6.2.9212_nano.zip.

  3. Transfer the ZIP file to the Microsoft Nano Server machine. One way to do so is to use WinRM and the Copy-Item cmdlet. Uncompress the ZIP file at C:\Program Files\nxlog using the Expand-Archive cmdlet as shown below.

    PS C:\tmp> Expand-Archive -Path nxlog-6.2.9212_nano.zip -DestinationPath 'C:\Program Files\nxlog'
  4. To register NXLog Agent as a service, navigate to the installation directory and execute the following command.

    PS C:\Program Files\nxlog> .\nxlog.exe -i
  5. Configure NXLog Agent by editing the C:\Program Files\nxlog\nxlog.conf file. See Log collection in the NXLog Platform User Guide for more information and configuration examples.

    Because Microsoft Nano Server does not have a native text editor, you must edit the configuration file on a different system and then transfer it to the Nano Server machine. Alternatively, you can install a third-party text editor.
  6. Verify the configuration file syntax.

    PS C:\Program Files\nxlog> .\nxlog.exe -v -c nxlog.conf
    2018-09-12 19:15:55 INFO configuration OK

NXLog Agent is now installed, registered, and configured. Start the NXLog Agent service by executing Start-Service nxlog.

Installing NXLog Agent in a custom directory

This section deals with installation options outside the typical scenario.

The following installation options require altering the Windows Registry. Incorrect modifications could potentially render the system unusable. Always double-check the commands and ensure it will be possible to revert to a known working state before altering the registry.

You can install NXLog Agent in a custom location on Nano Server.

  1. Follow the same installation procedure outlined above, but choose a different DestinationPath when expanding the ZIP file. Remember to register the NXLog Agent service as shown above.

  2. At this point, you need to edit the registry entry for the NXLog Agent service. View the current setting:

    PS C:\> Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Services\nxlog"
    
    
    Type            : 16
    Start           : 2
    ErrorControl    : 0
    ImagePath       : "c:\Program Files\nxlog\nxlog.exe" -c "c:\Program Files\nxlog\nxlog.conf"
    DisplayName     : nxlog
    DependOnService : {eventlog}
    ObjectName      : LocalSystem
    PSPath          : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\nxlog
    PSParentPath    : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services
    PSChildName     : nxlog
    PSDrive         : HKLM
    PSProvider      : Microsoft.PowerShell.Core\Registry
  3. The value of the ImagePath parameter needs to be modified to update the location of both the NXLog Agent executable and the configuration file. For example, if NXLog Agent is installed in C:\nxlog, execute the following command to update the registry key.

    PS C:\> Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Services\nxlog" -Name "ImagePath" -Value '"C:\nxlog\nxlog.exe" -c "C:\nxlog\nxlog.conf"'
  4. The configuration file (nxlog.conf) also needs to be edited to reflect this change to a non-default installation directory. Make sure define ROOT points to the correct location.

Upgrading NXLog Agent

Follow these steps to upgrade NXLog Agent to the latest release. We recommend making a backup of the configuration files before starting this process.

  1. Stop the NXLog Agent service by issuing the command Stop-Service nxlog.

  2. Back up any configuration files that have been altered, such as nxlog.conf, managed.conf, and any certificates.

  3. Either delete the nxlog directory and follow the installation procedure again or use the -Force parameter when extracting the NXLog Agent ZIP file. There is no need to register the service again.

    PS C:\tmp> Expand-Archive -Force -Path nxlog-6.2.9212_nano.zip -DestinationPath 'C:\Program Files\nxlog'
  4. Restore any configuration files and certificates.

  5. Start the NXLog Agent service by executing Start-Service nxlog.

Uninstalling NXLog Agent

To uninstall NXLog Agent, follow this procedure.

  1. Stop the NXLog Agent service by issuing the command Stop-Service nxlog.

  2. Unregister the service by navigating to the NXLog Agent directory and executing .\nxlog.exe -u.

  3. Delete the NXLog Agent directory.