# 1.Install\_saltminion

```bash
####1. Set server firewall outbound rule, and rule on PA enable minions to master.
netsh advfirewall firewall add rule name="Connect-Saltmaster" dir=out action=allow protocol=TCP remoteport=4505,4506 remoteip="10.xx.xx.xx"

####2.check and set computer name
echo %computername%
::if name wrong, change it 
set name=ServerName01

reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ActiveComputerName" /v ComputerName /t reg_sz /d %name% /f
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName" /v ComputerName /t reg_sz /d %name% /f
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters" /v "NV Hostname" /t reg_sz /d %name% /f 
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters" /v Hostname /t reg_sz /d %name% /f 
shutdown -r -t 5

####3. Install minion
echo %computername%
set master=10.**.**.**
pushd D:\software\
Salt-Minion-2016.11.8-AMD64-Setup.exe /S /master=%master% /minion-name=%computername% /start-service=1


```

