Topic: Powershell is not working as supposed  (Read 3196 times)

Powershell is not working as supposed
« on: June 16, 2017, 11:36:19 AM »

Tsjippy

  • Jr. Chef
  • **
  • Date Registered: Jun 2017
  • Posts: 12
Hi all,

I created my first WinPE10SE image, such fun!

But although I included Powershell, it is not working as it should.

I can open powershell but when I run the command get-volume, or similar, I get the error get-volume : Invalid class
At line:1 char:1
+ get-volume
+ ~~~~~~~~~~
    + CategoryInfo          : MetadataError: (MSFT_Volume:ROOT/Microsoft/...age/MSFT_Volume) [Get-Volume], CimExceptio
   n
    + FullyQualifiedErrorId : HRESULT 0x80041010,Get-Volume

What can I do to fix this?

I need powershell to work completely as my installation script is written in it...

Re: Powershell is not working as supposed
« Reply #1 on: June 19, 2017, 11:57:42 AM »

Tsjippy

  • Jr. Chef
  • **
  • Date Registered: Jun 2017
  • Posts: 12
No one?
I think it is missing some feature packs such as WMI, but I cannot simple add them with DISM..

Re: Powershell is not working as supposed
« Reply #2 on: June 20, 2017, 08:52:58 AM »

was_JFX

  • Code Baker
  • Grand Chef
  • *****
  • Date Registered: Dec 2010
  • Posts: 1074
Well if you have made a working ADK PE of the same version, than you could try something like this.

Copy all *.dll files from the ADK boot.wim to {BuildDir}\Target\Win10PESE\Windows\System32\
Don't overwrite, we just want missing ones.

If it is really a WMI problem than also copy the \Windows\system32\wbem folder.
I would overwrite this one, cause it uses a Repository cache.

Than recreate WIM&ISO in Finals\PostConfig plugin.

Re: Powershell is not working as supposed
« Reply #3 on: June 30, 2017, 12:32:38 PM »

Tsjippy

  • Jr. Chef
  • **
  • Date Registered: Jun 2017
  • Posts: 12
Thank you very much!

I solved it by copying all the contents from a working boot image system32 folder to the {BuildDir}\Target\Win10PESE\Windows\System32
I also copied the contents of the windows folder to the {BuildDir}\Target\Win10PESE\Windows folder.
Both without overwriting. I had to copy  \Windows\system32\wbem with overwriting


Re: Powershell is not working as supposed
« Reply #4 on: July 03, 2017, 11:29:26 PM »

jmsallo

  • Jr. Chef
  • **
  • Date Registered: Jul 2017
  • Posts: 23
Will this fix be incorporated into the next release?

Re: Powershell is not working as supposed
« Reply #5 on: November 30, 2017, 05:49:40 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Will this fix be incorporated into the next release?

New PowerShell plugin on server (current v18)

With Enabled MMC plugin
Get-Disk
Get-Volume

works fine now.  :great:

:turtle:

Re: Powershell is not working as supposed
« Reply #6 on: December 05, 2017, 01:55:58 PM »

APT

  • Grand Chef
  • *****
  • winpe enthusiast
  • Location: UK
  • Date Registered: Nov 2012
  • Posts: 1150
Hi All

JFI

plugin seems to fail in PEBakery with the DirCopy of wbem not overwriting the target  \wbem



Win10PESE x64 Source 10.0.16299.15 en-GB  Host Win7ProSP1x64
PEBakery 0.9.1a bld 20171202

Re: Powershell is not working as supposed
« Reply #7 on: December 06, 2017, 06:49:43 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi APT,

Thanks for feedback, I confirm, Reply 96 "PEBakery Test Build" topic
http://TheOven.org/index.php?topic=2271.msg24880#msg24880

:turtle:

 

Powered by EzPortal