如何通过脚本批量禁用Windows 10/11所有用户的Microsoft Edge圆角功能?
如何通过脚本批量禁用Windows 10/11所有用户的Microsoft Edge圆角功能?
我之前帮团队批量处理过这个Edge圆角的禁用需求,给你整理两个经过验证的可行方案,覆盖单用户和全用户场景:
方案一:PowerShell脚本批量修改注册表(推荐)
这个方法可以直接修改现有用户的注册表,同时配置默认用户模板让新创建的用户也自动生效。
1. 脚本内容(需管理员权限运行)
# 定义要设置的注册表键值 $edgeRegPath = "Software\Microsoft\Edge\Main" $regValues = @( @{Name="RoundedContainersEnabled"; Value=0; Type="DWord"}, @{Name="BrowserExperimentationRollbackToEdgeClassicLookEnabled"; Value=1; Type="DWord"} ) # 处理当前登录用户 foreach ($regValue in $regValues) { Set-ItemProperty -Path "HKCU:\$edgeRegPath" -Name $regValue.Name -Value $regValue.Value -Type $regValue.Type -Force } # 处理所有本地用户的注册表配置文件 $userProfiles = Get-ChildItem -Path "HKU:\" | Where-Object {$_.Name -match "^HKEY_USERS\\S-1-5-21.*$" -and $_.Name -notmatch "_Classes$"} foreach ($user in $userProfiles) { $userRegPath = "HKU:\$($user.PSChildName)\$edgeRegPath" if (-not (Test-Path $userRegPath)) { New-Item -Path $userRegPath -Force | Out-Null } foreach ($regValue in $regValues) { Set-ItemProperty -Path $userRegPath -Name $regValue.Name -Value $regValue.Value -Type $regValue.Type -Force } } # 配置默认用户模板(新用户自动生效) $defaultUserRegPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\Default\$edgeRegPath" if (-not (Test-Path $defaultUserRegPath)) { New-Item -Path $defaultUserRegPath -Force | Out-Null } foreach ($regValue in $regValues) { Set-ItemProperty -Path $defaultUserRegPath -Name $regValue.Name -Value $regValue.Value -Type $regValue.Type -Force } # 强制关闭所有Edge进程,确保设置生效 Get-Process msedge -ErrorAction SilentlyContinue | Stop-Process -Force Write-Host "Edge圆角功能已批量禁用,所有用户重启Edge后生效"
2. 关键说明
RoundedContainersEnabled=0:直接关闭edge://flags里的#edge-rounded-containers实验特性BrowserExperimentationRollbackToEdgeClassicLookEnabled=1:对应设置里的“尝试Microsoft Edge的新外观和体验”开关,强制回退到经典外观- 脚本必须以管理员权限运行,否则无法修改其他用户的注册表和默认用户模板
方案二:组策略配置(适合企业/域环境)
如果你的环境是域管理或者有组策略编辑器,这是更稳定的长期方案:
- 确保已安装Microsoft Edge的ADMX模板(内置在最新Edge安装包中)
- 打开组策略编辑器,导航到
用户配置 > 管理模板 > Microsoft Edge > 外观 - 找到“允许使用圆角容器”设置,设为已禁用
- 找到“回退到经典Microsoft Edge外观”设置,设为已启用
- 执行
gpupdate /force更新组策略,所有域用户的Edge会自动应用配置
注意事项
- 确保Edge版本为99及以上(这些注册表项在旧版本中可能不存在)
- 如果脚本运行后未生效,检查是否有Edge进程残留,手动关闭后重启即可
- 企业版Edge优先使用组策略方案,避免后续版本更新导致注册表项变更
备注:内容来源于stack exchange,提问作者randomric




