Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

Convert Command Batch Files to Puppet

$
0
0
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

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>