大网数据广告活动
安装更新与部署

Error "The Best Practices Analyzer scan has failed" when running Best Practice Analyzer

· 52CE 我爱测

Provides a resolution for the error "The Best Practices Analyzer scan has failed" when running Best Practice Analyzer

This article provides a resolution for the error "The Best Practices Analyzer scan has failed" when running Best Practice Analyzer.

Original KB number:   2028818

Symptoms

When you run a Best Practices Analyzer (BPA) in Windows Server 2008 R2 Server Manager, it returns the following error:

The Best Practices Analyzer scan has failed.
There has been a Best Practice Analyzer engine error for Model Id: 'Microsoft/Windows/FileServices' during execution of the Model. (Inner Exception: One or more model documents are invalid: {0}Discovery exception occurred processing file '{0}'.
Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. Due to the override, your shell will retain its current effective execution policy of "RemoteSigned". Type "Get-ExecutionPolicy -List" to view your execution policy settings. For more information, please see "Get-Help Set-ExecutionPolicy.")

Cause

The BPA error will occur if you enable the Turn on Script Execution policy to control PowerShell script execution and set it to Allow only signed scripts or Allow local scripts and remote signed scripts. The error will also occur if the Turn on Script Execution is set to Disabled.

The error will not occur if the policy is set to Allow all scripts.

Resolution

Remove, disable, or set to "Not Configured" the following Group Policy setting that is being applied to the server with the BPA error.

Computer Configuration\Administrative Templates\Windows Components\Windows PowerShell
Turn on Script Execution

The BPA will start working once the policy change applies. No reboot is required for the change to take effect.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
- Supported versions of Windows Server · Source date 02/12/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。