Dell Command |PowerShell Provider 无法正常工作或无法导入 PowerShell
Summary: 以下文章提供有关 Dell Command |PowerShell Provider (DellBIOSProvider) 无法正常工作或无法正确导入到 Windows PowerShell。
Instructions
受影响的产品:
Dell Command |Powershell 提供程序
受影响的操作系统
Windows 7 或更高版本
Windows PE 4.0 及更高版本
- 操作系统类型:Windows 7、Windows 8、Windows 8.1 和 Windows 10
- Windows Management Framework (WMF):3.0、4.0、5.0 和 5.1
- Windows PowerShell:3.0 及更高版本(可针对 Windows 7 进行升级)。
- SMBIOS:2.3 及更高版本(在戴尔产品上)
- Microsoft Visual C++ Redistributable:2010 或更高版本
Dell Command | PowerShell Provider:PowerShell 模块,使用 Windows PowerShell 界面为戴尔客户端计算机提供 BIOS 配置功能。(例如:例如 OptiPlex、Latitude、Venue 11 Pro、XPS 笔记本电脑和 Precision。)此模块具有本机配置功能,使管理员更容易管理 BIOS 配置。
Windows PowerShell:该工具旨在比 Windows 命令提示符更强大,并且基于 .NET Framework。此工具旨在帮助用户自动执行许多管理任务:
- 标识安装在网络上的一台或多台计算机上的 USB 设备。
- 以清晰的 HTML 格式识别和终止进程或过滤有关计算机或其网络的信息。
- 它使您能够创建脚本并将命令链接在一起。
- 启动 Windows PowerShell 的更强大的方法
安装说明位于 Dell Command |位于以下位置的 PowerShell 提供程序:
https://www.dell.com/support/home/en-us/product-support/product/command-powershell-provider/docs
问题:尝试使用以下命令导入模块时: Import-Module DellBIOSProvider -Verbose,则会显示以下错误:
Import-Module : File C:\Program Files\WindowsPowerShell\Modules\DellBIOSProvider\DellBIOSProvider.psm1 cannot be
loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ Import-Module DellBIOSProvider -verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [Import-Module], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess,Microsoft.PowerShell.Commands.ImportModuleCommand
解决方案:该 Set-ExecutionPolicy 命令未运行。运行以下命令:
Set-ExecutionPolicy RemoteSigned -force
Import-Module DellBIOSProvider 您可能不会看到任何相关的错误消息,并认为导入已成功。我们建议您使用 Import-Module DellBIOSProvider -verbose。这将显示过程中的每个步骤和错误消息。
问题:尝试使用以下命令导入模块时: Import-Module DellBIOSProvider -Verbose,则会显示以下错误:
Import Module : The specified module 'DellBIOSProvider' was not loaded because no valid module file was found in the module directory.
At line:1 char:1
- Import Module DellBIOSProvider – verbose
解决方案:确保 Dell Command |PowerShell 提供程序 ZIP 复制到正确的位置。默认情况下,Windows PowerShell 的模块文件夹为 C:\Program Files\WindowsPowerShell\Modules 或者文件的 $[env:ProgramFiles]\WindowsPowerShell\Modules 具体取决于您的操作系统体系结构。
请参阅:安装 Dell Command |用户指南中的 PowerShell 提供程序 ,了解更多详细信息:
问题:运行 Dell Command |PowerShell Provider cmdlet:
Do you want to run software from this untrusted publisher?
File C:\Program Files\WindowsPowerShell\Modules\DellBIOSProvider\DellBIOSProvider.psm1 is published by CN=Dell Inc,
SERIALNUMBER=2141541, OU=Client Product Group, OID.2.5.4.15=Private Organization, O=Dell Inc,
OID.1.3.6.1.4.1.311.60.2.1.2=Delaware, OID.1.3.6.1.4.1.311.60.2.1.3=US, L=Round Rock, S=Texas, C=US and is not trusted
on your system. Only run scripts from trusted publishers.
[V] Never run [D] Do not run [R] Run once [A] Always run [?] Help (default is "D"):
解决方案:在未取消阻止 ZIP 的情况下复制了模块。取消阻止 Dell Command |通过选中“取消阻止”框(红色圆圈),首先在 ZIP 属性中启用 PowerShell Provider ZIP:

图 1:(仅限英文)ZIP 属性窗口
然后重新复制 Dell Command |PowerShell Provider 文件夹复制到正确的目标位置。
- 32 位操作系统 -> DellBIOSProviderX86
- 64 位操作系统 -> DellBIOSProvider
请参阅:安装 Dell Command |用户指南中的 PowerShell 提供程序 ,了解更多详细信息: