Deployment Solution

 View Only
  • 1.  Powershell in WinPE 4.0

    Posted Dec 09, 2013 06:11 AM

    Deployment server 6.9 SP6 comes with WinPE 4.0.

    It is said that in WinPE 4.0 you can now use powershell.

    According to http://technet.microsoft.com/en-us/library/hh824926.aspx for Powershell you need to select the following PE component packages:

    • WinPE-WMI
    • WinPE-NetFX
    • WinPE-Scripting
    • WinPE-Powershell

    When I create a WinPE using Bootwiz/Pxe Configuration I can select all of these except the WinPE-Powershell. Needless to say that if I type 'powershell' in a WinPE session is comes back that this command is not recognized.



  • 2.  RE: Powershell in WinPE 4.0
    Best Answer

    Posted Dec 09, 2013 11:24 AM

    Not exactly sure of the process you are using to create the winpe environment, but what I had to do, as I just tried upgrading to WinPE4 for 7.1, was:

    locate the winpe.wim file bootwiz uses to create the boot.wim file

    - mount it using the DISM command

    Dism /Mount-Wim /WimFile:C:\winpe_x86\ISO\sources\boot.wim /index:1 /MountDir:C:\winpe_x86\mount

    - use another DISM command to add the packages I wanted...and their corresponding language packages

    Dism /image:C:\winpe_x86\mount /Add-Package /PackagePath:"C:\Program Files\<version>\Tools\PETools\<architecture>\WinPE_FPs\winpe-wmi.cab"

    and

    Dism /image:C:\winpe_x86\mount /Add-Package /PackagePath:"C:\Program Files\<version>\Tools\PETools\<architecture>\WinPE_FPs\en-us\winpe-wmi_en-us.cab"

    and then unmount and comitt

    Dism /unmount-Wim /MountDir:C:\winpe_x86\mount /Commit

    These commands are right out of the Help for WSIM.

    Hope this helps.



  • 3.  RE: Powershell in WinPE 4.0

    Posted Dec 10, 2013 04:54 AM

    WinPE4.0  is not officially supported in 7.1; in DS6.9 SP6 it is. So the bootwiz/pxe configuration should have displayed the optional package for Powershell (and others).

    Your solution to do it the 'manual way' worked, of course.

    1. I made a copy of the default winpe.wim in a temp-directory d:\WinPE40
    2. I copied the packages that I want to include as default in a Package subdir. (WinPE-NetFX4.cab, WinPE-Powershell3.cab, WinPE-Scripting.cab, WinPE-SecureBootCmdlets.cab and WinPE-WMI.cab)
    3. Ran the following script:
      rd /s /q c:\mount
      md c:\mount
      DISM /mount-wim /wimfile:D:\WinPE40\Win\x86\winpe.wim /index:1 /mountdir:c:\mount
      DISM /image:c:\mount /add-package /packagepath:D:\WinPE40\Win\x86\Package
      DISM /unmount-wim /mountdir:c:\mount /commit
    4. Replace the default winpe.wim (<installdir>\Deployment Server\WAIK\Tools\PETools\x86)
    5. Repeat these steps if needed for the x64 version.
    6. bootwiz/pxe configuration will now show the packages as 'installed'. Powershell works.