New
#30
Odd. That command should be setting the "File and Printer Sharing" rule in Windows Defender Firewall "Allowed apps" like below based on the specified network profile in the command.
Odd. That command should be setting the "File and Printer Sharing" rule in Windows Defender Firewall "Allowed apps" like below based on the specified network profile in the command.
Ok, I found the correct command:
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled True -Profile Any
Hmm, it should use "-Profile Any" by default when it isn't specified in the command.
I've updated the tutorial to include that in the command to make it more specific.
Hi, Brink
Your Command of the tutorial couldn't work for me, too.
Therefore, I found this command could work for me. I wanted to share with you.
Disable-NetAdapterBinding -Name "乙太網路 2" -ComponentID ms_server
"乙太網路 2" is the word such as "Ethernet 2" in Chinese Traditional.
The aforementioned command used elevated PowerShell to finish the setting.
Best Regards.
Hi, Brink
I want to ask the option five about using command prompt to finish it automatically.
Is it possible that default to open elevated PowerShell and then run the command codes automatically?
Because I used elevated command prompt to run the command codes and then got a fail only.
My command codes were as following.
cd C:\Windows\System32\WindowsPowerShell\v1.0
powershell
Disable-NetAdapterBinding -Name "乙太網路 2" -ComponentID ms_msclient
Disable-NetAdapterBinding -Name "乙太網路 2" -ComponentID ms_server
exit
The failed picture was as following.
Test this below in your .bat file to see how it runs for you. UAC will prompt for elevation.
Code:@echo off powershell -windowstyle hidden -command "Start-Process cmd -ArgumentList '/s,/c,PowerShell Disable-NetAdapterBinding -Name "乙太網路 2" -ComponentID ms_msclient & PowerShell Disable-NetAdapterBinding -Name "乙太網路 2" -ComponentID ms_server' -Verb runAs"
May be some language translation issue with the command.
Ok. Let's try this:
1) Create a .bat file with the commands below.
Code:PowerShell Disable-NetAdapterBinding -Name "乙太網路 2" -ComponentID ms_msclient PowerShell Disable-NetAdapterBinding -Name "乙太網路 2" -ComponentID ms_server
2) Move the .bat file to where you want to keep it saved at.
3) Create a shortcut of the .bat file.
4) Use option 9 below to make the shortcut always run as administrator.
Run as Administrator in Windows 10
5) Move or pin the shortcut to where you want to use it at.