Install UnRAR on Windows Server Using Chocolatey

This guide provides a straightforward walkthrough for installing UnRAR on a Windows Server environment using Chocolatey, a popular command-line package manager for Windows. By following these steps, you will quickly install the package, refresh your system path, and verify that the command-line utility is ready for extracting RAR archives.

Prerequisites

Ensure you have administrative access to your Windows Server and that Chocolatey is already installed. If Chocolatey is not installed, you can install it by running the official setup script from an elevated PowerShell prompt.

Step 1: Open PowerShell as Administrator

Log in to your Windows Server, click the Start menu, search for PowerShell, right-click the application, and select Run as Administrator.

Step 2: Install UnRAR

In the elevated PowerShell console, execute the following command to download and install the UnRAR package automatically without prompt interruptions:

choco install unrar -y

Chocolatey will fetch the unrar package from its repository, unpack the executable binaries, and register the tool in your system's PATH.

Step 3: Refresh the Environment Variables

To ensure your current terminal session recognizes the newly installed binary without restarting the console, refresh your environment variables:

refreshenv

Step 4: Verify the Installation

Confirm that UnRAR is installed and accessible from the command line by checking its version and help menu:

unrar

If the installation was successful, you will see the UnRAR command-line syntax and a list of available switches.

Basic Usage

To extract a RAR archive to the current working directory, use the extract command:

unrar x archive.rar