본문 바로가기
HW Knowledge/Hewlett-Packard Enterprise

Install HP Oneview 5.00 Powershell Library

by 스쳐가는인연 2020. 2. 10.

-------------------------------------------------------------------
Windows PowerShell
v5.1: https://docs.microsoft.com/ko-kr/powershell/scripting/install/installing-windows-powershell?view=powershell-7

v6.2.4 : https://github.com/PowerShell/PowerShell/releases/download/v6.2.4/PowerShell-6.2.4-win-x64.msi

if PSOH install failed:
Windows C Runtime: https://www.microsoft.com/en-us/download/details.aspx?id=50410
https://aka.ms/pscore6-prereq

.net framework 4.6.2: https://dotnet.microsoft.com/download/dotnet-framework/net462
.net framework 4.7.2: https://dotnet.microsoft.com/download/dotnet-framework/net472
.net framework 4.8: https://dotnet.microsoft.com/download/dotnet-framework/net48

if .net install failed with 0x800713ec:
[1130:104C][2020-02-08T12:11:19]e000: Error 0x800713ec: Process returned error: 0x13ec
[1130:104C][2020-02-08T12:11:19]e000: Error 0x800713ec: Failed to execute EXE package.
[1290:13BC][2020-02-08T12:11:19]e000: Error 0x800713ec: Failed to configure per-machine EXE package.

install Windows hotfix
KB2919355 : https://www.microsoft.com/ko-KR/download/details.aspx?id=42334
Install order: clearcompressionflag.exe, KB2919355, KB2932046, KB2959977, KB2937592, KB2938439, KB2934018.
-------------------------------------------------------------------

1. Check Powershell version
PS> Get-Host | Select-Object Version
PS> $PSversiontable
PSVersion 6.2.4

2. Install / uninstall
PS> Install-Module HPOneView.500
PS> Install-Module -Name HPOneView.500 -RequiredVersion 5.0.2226.2609 <<< Install Specific Version
PS> Uninstall-Module HPOneView.500

cf. parameter:
-Force << execute by force
-verbose << observe detail progress

계속하려면 NuGet 공급자가 필요합니다.
'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'
지금 PowerShellGet에서 NuGet 공급자를 설치하고 가져오시겠습니까?
[Y] 예(Y) [N] 아니요(N) [S] 일시 중단(S) [?] 도움말 (기본값은 "Y"): Y

신뢰할 수 없는 리포지토리
신뢰할 수 없는 리포지토리에서 모듈을 설치하는 중입니다. 이 리포지토리를 신뢰하는 경우 Set-PSRepository cmdlet을
실행하여 InstallationPolicy 값을 변경하십시오. 'PSGallery'에서 모듈을 설치하시겠습니까?
[Y] 예(Y) [A] 모두 예(A) [N] 아니요(N) [L] 모두 아니요(L) [S] 일시 중단(S) [?] 도움말 (기본값은 "N"): Y

자세한 정보 표시: 'HPOneView.500' 모듈의 'HPOneView.500.psd1' 파일에서 유효한 Authenticode 서명을 찾았습니다.
자세한 정보 표시: 'HPOneView.500' 모듈이 'C:\Program Files\WindowsPowerShell\Modules\HPOneView.500\5.0.2226.2609'
경로에 설치되었습니다.

3. loading module
PS> Import-Module HPOneView.500
PS> Import-Module "C:\Program Files\WindowsPowerShell\Modules\HPOneView.500\5.0.2295.3359\HPOneView.500.psd1"

if occur
-----------------------------------------------------
+ Import-Module HPOneView.500
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : 보안 오류: (:) [Import-Module], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess,Microsoft.PowerShell.Commands.ImportModuleCommand

PS> Set-ExecutionPolicy RemoteSigned -Scope process
-----------------------------------------------------

if occur below error:
-----------------------------------------------------
Import-Module : The version of the Common Language Runtime (CLR) on this computer is '4.0.30319.34209'. The module
'C:\Program Files\WindowsPowerShell\Modules\HPOneView.500\5.0.2295.3359\HPOneView.500.psd1' requires a minimum CLR
version of '4.0.30319.42000' to run. Verify that you are running the minimum required version of CLR, and then try

+ Import-Module HPOneView.500
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (Import-Module HPOneView.500:String) [Import-Module], InvalidOperat
ionException
+ FullyQualifiedErrorId : UnableToLoadModuleMissingDependancy,Microsoft.PowerShell.Commands.ImportModuleCommand

>> CLR version 4.0.30319.42000 supports .NET Framework versions starting with .NET Framework 4.6.

check .net framework version.
CMD> dir %WINDIR%\Microsoft.Net\Framework\v* /O:-N /B

Checking the .Net Framework version using PowerShell
(Get-ItemProperty ‘HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full’ -Name Release).Release
-----------------------------------------------------

반응형