Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 409
  • Last Modified:

Integration

I am trying to run a powershell script in WinPE. I have followed the steps given in the below link, created winPE.wim file and ISO.

http://www.deploymentresearch.com/Blog/tabid/62/EntryId/41/Windows-8-Preview-Howto-Creating-a-WinPE-boot-image-with-NET-Framework-and-PowerShell.aspx

After booting the PC using the created ISO file, I am not able to execute the powershell scripts in WinPE and powershell.exe itself is not available in WinPE. X:\windows\System32>Powershell

Anyone tried this? Can somebody suggest on this?
0
KC2TC
Asked:
KC2TC
1 Solution
 
Krzysztof PytkoActive Directory EngineerCommented:
Have you done successfully all mentioned steps with commit to apply changes into WIM file?

Regards,
Krzysztof
0
 
David Johnson, CD, MVPOwnerCommented:
dism requires run as administrator

@echo off
xcopy "c:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\en-us\winpe.wim"
Imagex /mountrw C:\WinPE_x64\winpe.wim 1 C:\Mount
cd /d "C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs"
dism /image:C:\Mount /add-package /packagepath:"WinPE-Scripting.cab"
dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-Scripting_en-us.cab"
dism /image:C:\Mount /add-package /packagepath:"WinPE-WMI.cab"
dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-WMI_en-us.cab"
dism /image:C:\Mount /add-package /packagepath:"WinPE-MDAC.cab"
dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-MDAC_en-us.cab"
dism /image:C:\Mount /add-package /packagepath:"WinPE-HTA.cab"
dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-HTA_en-us.cab"
dism /image:C:\Mount /add-package /packagepath:"WinPE-NetFx4.cab"
dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-NetFx4_en-us.cab"
dism /image:C:\Mount /add-package /packagepath:"WinPE-PowerShell3.cab"
dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-PowerShell3_en-us.cab"
dism /image:C:\Mount /add-package /packagepath:"WinPE-DismCmdlets.cab"
dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-DismCmdlets_en-us.cab"
Imagex /unmount /commit C:\Mount
md c:\WinPE_x64\iso
xcopy "C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\Media\*" C:\WinPE_x64\ISO /a
md C:\WinPE_x64\ISO\Sources folder 
xcopy C:\WinPE_x64\winpe.wim C:\WinPE_x64\ISO\Sources\boot.wim /y
xcopy "C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Deployment and Imaging Tools\amd64\Oscdimg\etfsboot.com" C:\WinPE_x64 /y
oscdimg -b"c:\WinPE_X64\etfsboot.com" -n C:\WinPE_X64\ISO C:\WinPE_X64\WinPE_X64.iso
Echo Done, you now have a 330 MB or so ISO.

Open in new window


Virtual Machine it works
0
 
KC2TCAuthor Commented:
Thank you! I will try now!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now