SHARE
TWEET

broadcast_all_servers.ps1

a guest Jan 26th, 2019 297 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. param(
  2.     [string]$Text
  3. )
  4.  
  5. $IP = "XXX.XXX.XXX.XXX"
  6. $RCONPassword = "12345"
  7.  
  8. ($csv = Import-Csv "A:\Launcher\Servers\Servers.csv" -Delimiter ";") | foreach {
  9.  
  10.     & 'A:\McRCON\mcrcon.exe' '-H' $IP '-P' $_.RCONPort '-p' $RCONPassword "broadcast $($Text)" Q | Out-Null
  11.  
  12.     Sleep -s 2
  13.  
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top