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 管理框架 (WMF):3.0、4.0、5.0 和 5.1
- Windows PowerShell:3.0 和更新版本 (可在 Windows 7 上升級)。
- SMBIOS:2.3,以及 Dell 產品的更新版本
- Microsoft Visual C++ Redistributable:2010 或更新版本
Dell Command | PowerShell Provider:PowerShell 模組,可使用 Windows PowerShell 介面為 Dell 用戶端電腦提供 BIOS 組態功能。(例如:例如 OptiPlex、Latitude、Venue 11 Pro、XPS 筆記型電腦和 Precision。)此模組具備原生組態功能,可讓系統管理員最輕鬆管理 BIOS 組態。
Windows PowerShell:本工具的功能比 Windows 的命令提示字元更強大,並以 .NET Framework 為基礎。此工具旨在幫助使用者自動執行許多管理任務:
- 識別安裝在網路上一台或多部電腦上的 USB 裝置。
- 以清晰的 HTML 格式識別和終止有關電腦或其網路的進程或過濾資訊。
- 它使您能夠創建文稿並將命令連結在一起。
- 更強大的啟動 Windows PowerShell 方式
安裝指示位於 Dell Command |PowerShell Provider,位於此處:
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 Provider ZIP 會複製到正確的位置。Windows PowerShell 的模組資料夾預設為 C:\Program Files\WindowsPowerShell\Modules 或 $[env:ProgramFiles]\WindowsPowerShell\Modules 視作業系統架構而定。
請參閱:安裝 Dell Command |如需詳細資訊,請提供使用者指南中的 PowerShell Provider :
問題:執行 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 |PowerShell Provider ZIP 首先在 ZIP 屬性中,方法是勾選取消封鎖方塊 (以紅色圓圈標示):

圖 1:(僅英文)ZIP 內容視窗
然後重新複製 Dell Command |PowerShell 提供者資料夾跳至正確的目的地。
- 32 位元作業系統 -> DellBIOSProviderX86
- 64 位元作業系統 -> DellBIOSProvider
請參閱:安裝 Dell Command |如需詳細資訊,請提供使用者指南中的 PowerShell Provider :