Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.

Commit 7f30463

Browse files
committed
Add "Disable Internet Connection Sharing", closes #234
1 parent a9fa1d2 commit 7f30463

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Default.preset

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ DisableAdminShares # EnableAdminShares
4141
# DisableNCSIProbe # EnableNCSIProbe
4242
SetCurrentNetworkPrivate # SetCurrentNetworkPublic
4343
# SetUnknownNetworksPrivate # SetUnknownNetworksPublic
44+
# DisableConnectionSharing # EnableConnectionSharing
4445
# DisableNetDevicesAutoInst # EnableNetDevicesAutoInst
4546
# DisableFirewall # EnableFirewall
4647
# HideDefenderTrayIcon # ShowDefenderTrayIcon

Win10.psm1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,18 @@ Function SetUnknownNetworksPublic {
615615
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\010103000F0000F0010000000F0000F0C967A3643C3AD745950DA7859209176EF5B87C875FA20DF21951640E807D7C24" -Name "Category" -ErrorAction SilentlyContinue
616616
}
617617

618+
# Disable Internet Connection Sharing (e.g. mobile hotspot)
619+
Function DisableConnectionSharing {
620+
Write-Output "Disabling Internet Connection Sharing..."
621+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Network Connections" -Name "NC_ShowSharedAccessUI" -Type DWord -Value 0
622+
}
623+
624+
# Enable Internet Connection Sharing (e.g. mobile hotspot)
625+
Function EnableConnectionSharing {
626+
Write-Output "Enabling Internet Connection Sharing..."
627+
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Network Connections" -Name "NC_ShowSharedAccessUI" -ErrorAction SilentlyContinue
628+
}
629+
618630
# Disable automatic installation of network devices
619631
Function DisableNetDevicesAutoInst {
620632
Write-Output "Disabling automatic installation of network devices..."

0 commit comments

Comments
 (0)