Skip to content

Instantly share code, notes, and snippets.

@varnav
Created August 29, 2016 09:38
Show Gist options
  • Save varnav/e98dc610b760de0d47a4890e07c2a1b3 to your computer and use it in GitHub Desktop.
Save varnav/e98dc610b760de0d47a4890e07c2a1b3 to your computer and use it in GitHub Desktop.
CMD snipped for Jenkins to update windows service binaries remotely
cmdkey.exe /add:10.15.1.15 /user:MACHINE\jenkins /pass:changeme
robocopy Project\bin\Release \\MACHINE\tempshare /s /xo /fft /R:10 /xf *.config
psservice \\10.15.1.15 -accepteula stop Service
psexec \\10.15.1.15 -accepteula robocopy c:\tempshare c:\Service /s /xo /fft /R:10 /xf *.config
psservice \\10.15.1.15 -accepteula start Service
cmdkey.exe /delete:10.15.1.15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment