A touch-free PowerShell script for silently installing and authenticating Tailscale on Windows using the MSI package. Supports standard Tailscale coordination servers and self-hosted Headscale servers.
- Detects CPU architecture automatically (amd64, arm64, x86)
- Fetches the latest stable version from pkgs.tailscale.com
- Skips installation if already on the latest version
- Installs silently via MSI with sane defaults for managed endpoints
- Optionally authenticates with a pre-auth key
- Supports custom login servers (Headscale)
- Prompts interactively if variables are not pre-set
- Cleans up the MSI after install
- Windows 10 / Windows Server 2016 or later
- PowerShell 5.1 or later
- Must be run as Administrator
$tailscale_authkey = "tskey-auth-xxxx"; iwr https://raw.githubusercontent.com/MacsInSpace/tailscale-silent-installer/refs/heads/main/tailscale.ps1 -UseBasicParsing | iex$tailscale_authkey = "tskey-auth-xxxx"; $tailscale_loginserver = "https://your.headscale.server"; iwr https://raw.githubusercontent.com/MacsInSpace/tailscale-silent-installer/refs/heads/main/tailscale.ps1 -UseBasicParsing | iexiwr https://raw.githubusercontent.com/MacsInSpace/tailscale-silent-installer/refs/heads/main/tailscale.ps1 -UseBasicParsing | iexThe script will prompt for an auth key and login server. Press Enter at both prompts to install without connecting.
If you receive TLS errors on older systems, prepend:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12| Variable | Description | Required |
|---|---|---|
$tailscale_authkey |
Pre-auth key from Tailscale or Headscale admin | No |
$tailscale_loginserver |
URL of a custom Headscale server | No |
If either variable is not set before running, the script will prompt interactively. Pressing Enter at the prompt skips that option.
The following properties are configured for managed/unattended deployment:
| Property | Value | Description |
|---|---|---|
TS_NOLAUNCH |
1 |
Suppresses GUI launch during install |
TS_INSTALLUPDATES |
always |
Enables automatic updates |
TS_UNATTENDEDMODE |
always |
Runs Tailscale unattended (no login prompt) |
TS_ONBOARDING_FLOW |
hide |
Hides the first-run setup wizard |
TS_ADMINCONSOLE |
hide |
Removes the admin console link from the tray |
TS_ADVERTISEEXITNODE |
never |
Prevents the machine being used as an exit node |
TS_ALLOWINCOMINGCONNECTIONS |
always |
Locks incoming connections on |
To customise these, edit the $msiProperties array in the script. Full property reference: Tailscale MSI documentation
- Checks for an existing Tailscale installation — exits early if already on the latest version
- Detects CPU architecture via WMI
- Fetches the latest stable version number from pkgs.tailscale.com
- Downloads the appropriate MSI to
$env:TEMP - Installs silently via
msiexecwith the configured properties - Waits for the Tailscale service to start
- Runs
tailscale up --authkey --unattended(with--login-serverif provided) - Cleans up the MSI from TEMP
- The auth key is passed to
tailscale uppost-install, not the MSI installer.TS_AUTHKEYis not a valid MSI property. - Exit code
3010from msiexec means a reboot is required — the script warns but does not force a reboot. - The install log is written to
$env:TEMP\tailscale-install.logfor troubleshooting. - ARM64 machines use the
arm64MSI. Thetailscale-setup-full-*.exebundle is intentionally avoided due to known issues with the self-extracting engine on some systems.
MIT