Hi
Ive got a code to open a Windows Firewall port for my Office Web App Server:
#==============================================================# Creates a rule to open an incomming port in the firewall.
#==============================================================
$port = New-Object -ComObject HNetCfg.FWOpenPort
$port.Port = 9999 #type in the port to open
$port.Name = 'MyTestPort' # name of Port
$port.Enabled = $true
$fwMgr = New-Object -ComObject HNetCfg.FwMgr
$profiledomain=$fwMgr.LocalPolicy.GetProfileByType(0)
$profiledomain.GloballyOpenPorts.Add($port)
#==============================================================
I have been trying to change it to add multiple ports, but i cant get it to work.
Any ideas?
br
Bjørn