Convert Command Batch Files to Puppet
We are trying to move all of our lockdown scripts from batch files to Puppet code, but I am not seeing much data on this. For instance how would I convert the bottom to Puppet Code? I knowI could reference the file with an exec command, but than it will run every 30 minutes.
Echo Disabling NetBT @echo off for /f "skip=1 tokens=1,2" %%m in ('wmic nicconfig where ^(tcpipnetbiosoptions^='1' or tcpipnetbiosoptions^='0'^) get index^, tcpipnetbiosoptions') do ( if /I %%m==No goto :Disable_NetBIOS if %%n==0 (wmic nicconfig where index=%%m call SetTcpipNetBIOS 2 1>nul ) else ( if %%n==1 (wmic nicconfig where index=%%m call SetTcpipNetBIOS 2 1>nul ) ) ) Echo Disabling WINS and LMHOST wmic nicconfig call enablewins false, false