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

0 Members and 1 Guest are viewing this topic.

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

Tsjippy

  • Apprentice
  • *
  • Date Registered: Jun 2017
  • Posts: 3
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, 01:57:42 AM »

Tsjippy

  • Apprentice
  • *
  • Date Registered: Jun 2017
  • Posts: 3
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 19, 2017, 10:52:58 PM »

JFX

  • Moderator, Code Baker
  • Sr. Chef
  • *****
  • Date Registered: Dec 2010
  • Posts: 861
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, 02:32:38 AM »

Tsjippy

  • Apprentice
  • *
  • Date Registered: Jun 2017
  • Posts: 3
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, 01:29:26 PM »

jmsallo

  • Apprentice
  • *
  • Date Registered: Jul 2017
  • Posts: 1
Will this fix be incorporated into the next release?

 

Powered by EzPortal