I can enable some parts of the network sharing with PowerShell, but unfortunately I don’t know how to enable the All network
win10 and win11
enter image description here
enter image description here
I tried the following:
<code>"Set-NetFirewallRule -DisplayGroup 'Network Discovery' -Enabled True -Profile Any",
"Set-NetFirewallRule -DisplayGroup 'File and Printer Sharing' -Enabled True -Profile Any",
"Set-ItemProperty -Path 'HKLM:SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem' -Name 'EnableLUA' -Value 0",
"Set-ItemProperty -Path 'HKLM:SystemCurrentControlSetControlTerminal Server' -Name 'fDenyTSConnections' -Value 0",
"Set-NetFirewallRule -DisplayGroup 'Remote Desktop' -Enabled True",
"Set-NetFirewallRule -DisplayGroup 'Remote Assistance' -Enabled True",
"Set-NetFirewallRule -DisplayGroup 'Windows Remote Management' -Enabled True"
</code>
<code>"Set-NetFirewallRule -DisplayGroup 'Network Discovery' -Enabled True -Profile Any",
"Set-NetFirewallRule -DisplayGroup 'File and Printer Sharing' -Enabled True -Profile Any",
"Set-ItemProperty -Path 'HKLM:SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem' -Name 'EnableLUA' -Value 0",
"Set-ItemProperty -Path 'HKLM:SystemCurrentControlSetControlTerminal Server' -Name 'fDenyTSConnections' -Value 0",
"Set-NetFirewallRule -DisplayGroup 'Remote Desktop' -Enabled True",
"Set-NetFirewallRule -DisplayGroup 'Remote Assistance' -Enabled True",
"Set-NetFirewallRule -DisplayGroup 'Windows Remote Management' -Enabled True"
</code>
"Set-NetFirewallRule -DisplayGroup 'Network Discovery' -Enabled True -Profile Any",
"Set-NetFirewallRule -DisplayGroup 'File and Printer Sharing' -Enabled True -Profile Any",
"Set-ItemProperty -Path 'HKLM:SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem' -Name 'EnableLUA' -Value 0",
"Set-ItemProperty -Path 'HKLM:SystemCurrentControlSetControlTerminal Server' -Name 'fDenyTSConnections' -Value 0",
"Set-NetFirewallRule -DisplayGroup 'Remote Desktop' -Enabled True",
"Set-NetFirewallRule -DisplayGroup 'Remote Assistance' -Enabled True",
"Set-NetFirewallRule -DisplayGroup 'Windows Remote Management' -Enabled True"
New contributor
Pouriya Asakereh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1