Skip to content


Typical Installation

Run this command from a non-admin PowerShell to install distant with the default version and host. distant will be installed to %LocalAppData%\distant\bin\distant.exe, which normally is a path like C:\Users\<YOUR USERNAME>\AppData\Local\distant\bin\distant.exe.

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser # Optional: Needed to run a remote script the first time
irm | iex

Advanced Installation

If you want to have an advanced installation, you can download the installer and manually execute it with parameters.

irm -outfile 'install.ps1'

To see all configurable parameters of the installer.

.\install.ps1 -?

For example, you could install distant to a custom directory, specify a different version of distant to install, and bypass system proxy during installation.

.\install.ps1 -InstallDir 'D:\Applications\Distant\bin' -DistantVersion '0.20.0-alpha.10' -NoProxy

Or you can provide arguments inline such as this example.

iex "& {$(irm} -InstallDir 'D:\Applications\Distant\bin' -DistantVersion '0.20.0-alpha.10' -NoProxy"

Or you can use the legacy method to configure custom directory by setting Environment Variables. (Not Recommended)

irm | iex

For Admin

Installation under the administrator console has been disabled by default for security considerations. If you know what you are doing and want to install distant as administrator, then download the installer and manually execute it with the -RunAsAdmin parameter in an elevated console. Here is the example:

irm -outfile 'install.ps1'
.\install.ps1 -RunAsAdmin [-OtherParameters ...]
# I don't care about other parameters and want a one-line command
iex "& {$(irm} -RunAsAdmin"

Silent Installation

You can redirect all outputs to Out-Null or a log file to silence the installer. And you can use $LASTEXITCODE to check the installation result, it will be 0 when the installation success.

# Omit outputs
.\install.ps1 [-Parameters ...] | Out-Null
# Or collect logs
.\install.ps1 [-Parameters ...] > install.log
# Get result