/build/static/layout/Breadcrumb_cap_w.png

installing Windows Management Framework 5 (PowerShell 5) as post installation task

Trying to install PowerShell 5 to Windows 7 scripted install.  It has 2 dependencies, .net4.5 and WMF4 (powershell4)

I have the .net4.5.2 install working fine

I set the WMF4 install task to Windows6.1-KB2819745-x64-MultiPkg.msu /quiet /log:%temp%\posh4install.log (I also tried PoSH4-Windows6.1-KB2819745-x64-MultiPkg.msu /quiet /forcereboot)

When running the scripted install, it shows that it is running the WMF4 task, reboots, then shows that it is running the WMF4 package.  It then fails with return code 2359302 which is pretty well documented online as occurring because the package is already installed.  I can confirm that it has version 4 of Powershell by launching Powershell and running $PSVersionTable.

If I tell it to continue, it follows the same steps for WMF5.0.  I can then confirm that PowerShell 5 is installed because $PSVersionTable shows version 5.  I then continue and the rest of the scripted install runs with no problems. 

Not sure how to eliminate the error so it continues without the errors.


0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: rileyz 7 years ago
Red Belt
0

Top Answer

Your deployment tool/script needs to trap return code 2359302 and accept it as a success, I have a feeling your letting KACE deal with it and 2359302 is defo not a standard im OK return code...

Wrap the WMF whatever you call it in a batch/powershell/vbs/whatever capture the return code, and if equals 2359302 then eject from batch/powershell/vbs/whatever with a 0 - all ok! 



Your.msu /quiet /norestart
if %errorlevel% equ 0 goto EXITOK
if %errorlevel% equ 1641 goto EXITOK
if %errorlevel% equ 1707 goto EXITOK
if %errorlevel% equ 3010 goto EXITOK
exit /b %errorlevel%

:EXITOK
exit /b 0

Comments:
  • Not being a programmer, can you elaborate on how to make a batch file capture the return code?
    start /wait installposh.bat ??? - crwdawg 7 years ago
    • Called support on an unrelated issue and asked about this. His recommendation was this:
      https://support.software.dell.com/k2000-systems-deployment-appliance/kb/128917 - crwdawg 7 years ago
    • Dell's solution is a cop out, what happens if it fails? you'll never capture it.
      I've updated my answer, hope it help. - rileyz 7 years ago
      • I thought it was seriously lacking too, but pending any more info, it resolved the problem. Thanks for going back and updating the answer. It is much better and ,like you said, will let me know if it actually failed. - crwdawg 7 years ago
      • No worries, glad it helps.

        Might pay to read up on the msi exit codes, some of them you might want to pass back to SCCM, like 3010, then sccm will know it requires a reboot etc. - rileyz 7 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ