Advertisement
Guest User

Installation_SteamCMD_and_AtlasServer.ps1

a guest
Jan 26th, 2019
2,618
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Made by ZoRo
  2. $AtlasDir = "A:"
  3. $appID = "1006030"
  4.  
  5. # Creating Steam Folder and downloading SteamCMD
  6. Write-Host "Downloading SteamCMD"
  7. $url = "https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip"
  8. New-Item "$AtlasDir\SteamCMD" -type Directory -ErrorAction SilentlyContinue
  9. $output = "$AtlasDir\SteamCMD\steamcmd.zip"
  10. $start_time = Get-Date
  11. Invoke-WebRequest -Uri $url -OutFile $output
  12. Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)"
  13.  
  14. # Expanding SteamCMD.zip (Open the zip file and extract)
  15. $SteamZip = "$AtlasDir\SteamCMD\steamcmd.zip" # The file name to extract
  16. $SteamDestination = "$AtlasDir\SteamCMD" # The path to extract the file to
  17. Remove-Item $AtlasDir\SteamCMD\steamcmd.exe -ErrorAction SilentlyContinue # Just in case this was alredy run once
  18. Add-Type -assembly "system.io.compression.filesystem" # Required class to unzip the file
  19. [io.compression.zipfile]::ExtractToDirectory($SteamZip, $SteamDestination) #unzip the file
  20.  
  21. # Installing Atlas Server
  22. Write-Host "Installing Atlas. This will take a WHILE..." -ForegroundColor Yellow
  23. powershell.exe "$AtlasDir\SteamCMD\steamcmd.exe" +login anonymous +force_install_dir "$AtlasDir\AtlasServer" +app_update $appID validate +exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement