Skip to content

Commit

Permalink
fix(disable file sharing): redundant profile set
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Oct 9, 2024
1 parent 0bee7ca commit 261fdaf
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ sc.exe config NetBT start=disabled | Out-Null

# Set network profile to 'Public Network'
Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Public
$profiles = Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles" -Recurse | Where-Object { $_.GetValue("Category") -ne $null }
foreach ($profile in $profiles) {
Set-ItemProperty -Path $profile.PSPath -Name "Category" -Value 0 | Out-Null
}

# Disable network discovery firewall rules
Get-NetFirewallRule | Where-Object {
Expand Down

0 comments on commit 261fdaf

Please sign in to comment.