Hi,
Yes you can set FireWall in startup in the .csdef
<Startup>
<Task commandLine="yourcmdscript.cmd" executionContext="elevated" taskType="simple" />
</Startup>
please note that
executionContext must be elevated which mean it will have administrator rights
link
using following has required by you. which is used to disable or set rules
netsh advfirewall firewall add rule name="ICMPv6" dir=in action=allow enable=yes protocol=icmpv6
netsh advfirewall firewall add rule name="Windows Remote Management (HTTP-In)" dir=in action=allow service=any enable=yes profile=any localport=5985 protocol=tcp
netsh advfirewall firewall add rule name="Allowing Interal Service Traffic" dir=in action=allow localport=444 protocol=tcp
This will setup the firewall for corresponding rules
if you want to disable the entire firewall
netsh advfirewall set allprofiles state off
This will put into high risk of security
Regards
Madan
dmadan.wordpress.com