Can I specify an application that isn't currently installed for a firewall rule?
up vote
-1
down vote
favorite
Essentially, We deploy machines to clients. I want to know if I can pass through a firewall rule for a program that isn't currently installed. At the moment, my preparation script does not work unless someone has manually installed SQL express 2016/17.
I'm wondering if I can make work in PowerShell:
New-NetFireWallRule -DisplayName "SQLProgramEnable" -Description "Whitelists the Sqlservr.exe within the firewall" -Direction Inbound -Program "C:Program FilesMicrosoft SQL ServerMSSQL14.SQLEXPRESSMSSQLBinnsqlservr.exe"
WITHOUT having the program installed. Could somebody clarify this?
For reference, here is a sample of the script.
#Whitelist the Program depending on edition of Express
if (Test-Path -Path "C:Program FilesMicrosoft SQL ServerMSSQL14.SQLEXPRESS")
{New-NetFireWallRule -DisplayName "SQLProgramEnable" -Description "Whitelists the Sqlservr.exe within the firewall" -Direction Inbound -Program "C:Program FilesMicrosoft SQL ServerMSSQL14.SQLEXPRESSMSSQLBinnsqlservr.exe"}
else
{New-NetFireWallRule -DisplayName "SQLProgramEnable" -Description "Whitelists the Sqlservr.exe within the firewall" -Direction Inbound -Program "C:Program FilesMicrosoft SQL ServerMSSQL13.SQLEXPRESSMSSQLBinnsqlservr.exe"}
windows-10 powershell firewall sql-server
New contributor
add a comment |
up vote
-1
down vote
favorite
Essentially, We deploy machines to clients. I want to know if I can pass through a firewall rule for a program that isn't currently installed. At the moment, my preparation script does not work unless someone has manually installed SQL express 2016/17.
I'm wondering if I can make work in PowerShell:
New-NetFireWallRule -DisplayName "SQLProgramEnable" -Description "Whitelists the Sqlservr.exe within the firewall" -Direction Inbound -Program "C:Program FilesMicrosoft SQL ServerMSSQL14.SQLEXPRESSMSSQLBinnsqlservr.exe"
WITHOUT having the program installed. Could somebody clarify this?
For reference, here is a sample of the script.
#Whitelist the Program depending on edition of Express
if (Test-Path -Path "C:Program FilesMicrosoft SQL ServerMSSQL14.SQLEXPRESS")
{New-NetFireWallRule -DisplayName "SQLProgramEnable" -Description "Whitelists the Sqlservr.exe within the firewall" -Direction Inbound -Program "C:Program FilesMicrosoft SQL ServerMSSQL14.SQLEXPRESSMSSQLBinnsqlservr.exe"}
else
{New-NetFireWallRule -DisplayName "SQLProgramEnable" -Description "Whitelists the Sqlservr.exe within the firewall" -Direction Inbound -Program "C:Program FilesMicrosoft SQL ServerMSSQL13.SQLEXPRESSMSSQLBinnsqlservr.exe"}
windows-10 powershell firewall sql-server
New contributor
1
Why can't you try it and see?
– harrymc
Nov 13 at 13:42
A firewall blocks all ports unless opened. If you know what port your program will use, you can just open a generic port, and it will work. This is usually the way to go.
– LPChip
Nov 13 at 14:07
As my know, firewall can block download software, but for install software with a usb disk, it might can't take effect.
– Joy
Nov 14 at 10:37
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
Essentially, We deploy machines to clients. I want to know if I can pass through a firewall rule for a program that isn't currently installed. At the moment, my preparation script does not work unless someone has manually installed SQL express 2016/17.
I'm wondering if I can make work in PowerShell:
New-NetFireWallRule -DisplayName "SQLProgramEnable" -Description "Whitelists the Sqlservr.exe within the firewall" -Direction Inbound -Program "C:Program FilesMicrosoft SQL ServerMSSQL14.SQLEXPRESSMSSQLBinnsqlservr.exe"
WITHOUT having the program installed. Could somebody clarify this?
For reference, here is a sample of the script.
#Whitelist the Program depending on edition of Express
if (Test-Path -Path "C:Program FilesMicrosoft SQL ServerMSSQL14.SQLEXPRESS")
{New-NetFireWallRule -DisplayName "SQLProgramEnable" -Description "Whitelists the Sqlservr.exe within the firewall" -Direction Inbound -Program "C:Program FilesMicrosoft SQL ServerMSSQL14.SQLEXPRESSMSSQLBinnsqlservr.exe"}
else
{New-NetFireWallRule -DisplayName "SQLProgramEnable" -Description "Whitelists the Sqlservr.exe within the firewall" -Direction Inbound -Program "C:Program FilesMicrosoft SQL ServerMSSQL13.SQLEXPRESSMSSQLBinnsqlservr.exe"}
windows-10 powershell firewall sql-server
New contributor
Essentially, We deploy machines to clients. I want to know if I can pass through a firewall rule for a program that isn't currently installed. At the moment, my preparation script does not work unless someone has manually installed SQL express 2016/17.
I'm wondering if I can make work in PowerShell:
New-NetFireWallRule -DisplayName "SQLProgramEnable" -Description "Whitelists the Sqlservr.exe within the firewall" -Direction Inbound -Program "C:Program FilesMicrosoft SQL ServerMSSQL14.SQLEXPRESSMSSQLBinnsqlservr.exe"
WITHOUT having the program installed. Could somebody clarify this?
For reference, here is a sample of the script.
#Whitelist the Program depending on edition of Express
if (Test-Path -Path "C:Program FilesMicrosoft SQL ServerMSSQL14.SQLEXPRESS")
{New-NetFireWallRule -DisplayName "SQLProgramEnable" -Description "Whitelists the Sqlservr.exe within the firewall" -Direction Inbound -Program "C:Program FilesMicrosoft SQL ServerMSSQL14.SQLEXPRESSMSSQLBinnsqlservr.exe"}
else
{New-NetFireWallRule -DisplayName "SQLProgramEnable" -Description "Whitelists the Sqlservr.exe within the firewall" -Direction Inbound -Program "C:Program FilesMicrosoft SQL ServerMSSQL13.SQLEXPRESSMSSQLBinnsqlservr.exe"}
windows-10 powershell firewall sql-server
windows-10 powershell firewall sql-server
New contributor
New contributor
edited Nov 13 at 13:36
harrymc
247k10256542
247k10256542
New contributor
asked Nov 13 at 13:18
Jake
1
1
New contributor
New contributor
1
Why can't you try it and see?
– harrymc
Nov 13 at 13:42
A firewall blocks all ports unless opened. If you know what port your program will use, you can just open a generic port, and it will work. This is usually the way to go.
– LPChip
Nov 13 at 14:07
As my know, firewall can block download software, but for install software with a usb disk, it might can't take effect.
– Joy
Nov 14 at 10:37
add a comment |
1
Why can't you try it and see?
– harrymc
Nov 13 at 13:42
A firewall blocks all ports unless opened. If you know what port your program will use, you can just open a generic port, and it will work. This is usually the way to go.
– LPChip
Nov 13 at 14:07
As my know, firewall can block download software, but for install software with a usb disk, it might can't take effect.
– Joy
Nov 14 at 10:37
1
1
Why can't you try it and see?
– harrymc
Nov 13 at 13:42
Why can't you try it and see?
– harrymc
Nov 13 at 13:42
A firewall blocks all ports unless opened. If you know what port your program will use, you can just open a generic port, and it will work. This is usually the way to go.
– LPChip
Nov 13 at 14:07
A firewall blocks all ports unless opened. If you know what port your program will use, you can just open a generic port, and it will work. This is usually the way to go.
– LPChip
Nov 13 at 14:07
As my know, firewall can block download software, but for install software with a usb disk, it might can't take effect.
– Joy
Nov 14 at 10:37
As my know, firewall can block download software, but for install software with a usb disk, it might can't take effect.
– Joy
Nov 14 at 10:37
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Jake is a new contributor. Be nice, and check out our Code of Conduct.
Jake is a new contributor. Be nice, and check out our Code of Conduct.
Jake is a new contributor. Be nice, and check out our Code of Conduct.
Jake is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1375026%2fcan-i-specify-an-application-that-isnt-currently-installed-for-a-firewall-rule%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Why can't you try it and see?
– harrymc
Nov 13 at 13:42
A firewall blocks all ports unless opened. If you know what port your program will use, you can just open a generic port, and it will work. This is usually the way to go.
– LPChip
Nov 13 at 14:07
As my know, firewall can block download software, but for install software with a usb disk, it might can't take effect.
– Joy
Nov 14 at 10:37