Skip to content

Commit 261fdaf

Browse files
committed
fix(disable file sharing): redundant profile set
1 parent 0bee7ca commit 261fdaf

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/DisableFileSharing.ps1

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ sc.exe config NetBT start=disabled | Out-Null
2020

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

2824
# Disable network discovery firewall rules
2925
Get-NetFirewallRule | Where-Object {

0 commit comments

Comments
 (0)