Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable printer sharing #12408

Merged
merged 9 commits into from
Jan 13, 2022
7 changes: 5 additions & 2 deletions infra/vsts_agent_windows.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ locals {
name = "ci-w1",
size = 0,
assignment = "default",
disk_size = 200,
disk_size = 400,
},
{
name = "ci-w2"
size = 6,
assignment = "default",
disk_size = 400
disk_size = 400,
},
]
}
Expand Down Expand Up @@ -96,6 +96,9 @@ Set-MpPreference -DisableRealtimeMonitoring $true
Stop-Service -Name Spooler -Force
Set-Service -Name Spooler -StartupType Disabled

# Disable File & Printer sharing
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled False -Profile Any

# Enable long paths
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name LongPathsEnabled -Type DWord -Value 1

Expand Down