Skip to content

Instantly share code, notes, and snippets.

@thekuffs
Last active November 29, 2017 17:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save thekuffs/4435888 to your computer and use it in GitHub Desktop.
Save thekuffs/4435888 to your computer and use it in GitHub Desktop.
Install and configure the salt-minion service with nssm. Accidentally posted anonymously in https://gist.github.com/4435871
Write-Host "Configuring salt-minion service"
# install the service with nssm. This is where the binary and arguments are specified.
c:\salt\nssm.exe install salt-minion c:\salt\salt-minion.exe -c c:\salt\etc\salt -l quiet
# Make a friendly name, description, and make it start automatically.
Set-Service -name "salt-minion" `
-displayName "Salt Minion" `
-StartupType Automatic `
-Description "Provides secure orchestration and centralized management"
# Modify the service to depend on Network Store Interface to ensure the networking stack is up when it starts.
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\services\salt-minion `
-Name "DependOnService" `
-PropertyType MultiString `
-force `
-Value "nsi" | Out-Null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment