.
This commit is contained in:
5
NetworkScripts/DisableNet.ps1
Normal file
5
NetworkScripts/DisableNet.ps1
Normal file
@ -0,0 +1,5 @@
|
||||
#Get-NetFirewallRule -DisplayGroup 'Network Discovery'
|
||||
Set-NetFirewallRule -DisplayGroup 'Network Discovery' -Profile 'Private' -Enabled false
|
||||
Set-NetFirewallRule -DisplayGroup 'File And Printer Sharing' -Profile 'Private' -Enabled false
|
||||
|
||||
#select Name,DisplayName,Enabled,Profile|ft -a
|
||||
9
NetworkScripts/EnableNet.ps1
Normal file
9
NetworkScripts/EnableNet.ps1
Normal file
@ -0,0 +1,9 @@
|
||||
#Get-NetFirewallRule -DisplayGroup 'Network Discovery'
|
||||
Set-NetFirewallRule -DisplayGroup 'Network Discovery' -Profile 'Private' -Enabled true
|
||||
Set-NetFirewallRule -DisplayGroup 'File And Printer Sharing' -Profile 'Private' -Enabled true
|
||||
|
||||
Get-NetConnectionProfile -InterfaceAlias "Ethernet" | Set-NetConnectionProfile -NetworkCategory Private
|
||||
Get-NetConnectionProfile -InterfaceAlias "WiFi" | Set-NetConnectionProfile -NetworkCategory Private
|
||||
#Get-NetConnectionProfile -InterfaceAlias "Ethernet1" | Set-NetConnectionProfile -NetworkCategory Private
|
||||
|
||||
#select Name,DisplayName,Enabled,Profile|ft -a
|
||||
Reference in New Issue
Block a user