Last active
March 22, 2018 21:15
-
-
Save fortyfivan/ac8ef6ea09a7ce691fee9dd307ab77ac to your computer and use it in GitHub Desktop.
EC2 user data script for enrolling a Windows server to ScaleFT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<powershell> | |
# Write the Enrollment Token | |
$enrollment_token = "ENROLLMENT_TOKEN" | |
$enrollment_token_path = "C:\windows\system32\config\systemprofile\AppData\Local\ScaleFT\enrollment.token" | |
New-Item -ItemType directory -Path (Split-Path $enrollment_token_path -Parent) | |
$enrollment_token | Out-File $enrollment_token_path -Encoding "ASCII" | |
# Install ScaleFT Server Tools | |
$installer_url = "https://dist.scaleft.com/server-tools/windows/latest/ScaleFT-Server-Tools-latest.msi" | |
$installer_path = [System.IO.Path]::ChangeExtension([System.IO.Path]::GetTempFileName(), ".msi") | |
(New-Object System.Net.WebClient).DownloadFile($installer_url, $installer_path) | |
msiexec.exe /qb /I $installer_path | |
</powershell> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment