Topic: get-disk cmdlet non-functional  (Read 247 times)

0 Members and 1 Guest are viewing this topic.

get-disk cmdlet non-functional
« on: October 12, 2017, 10:17:46 AM »

Venerence

  • Jr. Chef
  • **
  • Date Registered: Jan 2014
  • Posts: 49
I've been writing some personal powershell GUI programs for imaging purposes (basically my own customized WINNTSetup), and I can't seem to run get-disk. I get an error you see attached. Normally I'd try to work around it, but get-disk is pretty fundamental to my script. Any idea why powershell isn't supporting it?


Re: get-disk cmdlet non-functional
« Reply #1 on: October 12, 2017, 01:54:21 PM »

bob.omb

  • Chef
  • ***
  • Location: USA
  • Date Registered: Jul 2017
  • Posts: 103
I get an "Invalid Class" error for get-disk in powershell.  Are you running the powershell plugin off of the server or have you made your own/changed the provided plugint?
« Last Edit: October 18, 2017, 02:27:32 PM by bob.omb »

Re: get-disk cmdlet non-functional
« Reply #2 on: October 12, 2017, 06:34:59 PM »

Venerence

  • Jr. Chef
  • **
  • Date Registered: Jan 2014
  • Posts: 49
Standard powershell script, along with the .net 3.5 enabled and 2.0/3.5/4.0/4.5 added via pe script. Also tried 4.0/4.5 only (still with netfx enabled) just to see if it made a difference, it didn't.

Re: get-disk cmdlet non-functional
« Reply #3 on: October 12, 2017, 10:01:15 PM »

JFX

  • Moderator, Code Baker
  • Sr. Chef
  • *****
  • Date Registered: Dec 2010
  • Posts: 889
I remember that problem.

copy the following files into system32

mispace.dll
storagewmi.dll
wmitomi.dll

copy overwrite the system32\wbem folder with the one from install.wim.

rebuild WIM and try again.

Re: get-disk cmdlet non-functional
« Reply #4 on: October 13, 2017, 08:32:28 PM »

Venerence

  • Jr. Chef
  • **
  • Date Registered: Jan 2014
  • Posts: 49
I remember that problem.

copy the following files into system32

mispace.dll
storagewmi.dll
wmitomi.dll

copy overwrite the system32\wbem folder with the one from install.wim.

rebuild WIM and try again.
:thumbsup:

Re: get-disk cmdlet non-functional
« Reply #5 on: October 15, 2017, 11:56:07 AM »

bob.omb

  • Chef
  • ***
  • Location: USA
  • Date Registered: Jul 2017
  • Posts: 103
Is this caused by a plugin that runs after powershell that changes those files? (Need to move powershell fix to end of build process?) - Or is this just an overall fix on the plugin itself that needs to be done?
« Last Edit: October 18, 2017, 02:27:08 PM by bob.omb »

Re: get-disk cmdlet non-functional
« Reply #6 on: October 17, 2017, 10:24:28 AM »

bob.omb

  • Chef
  • ***
  • Location: USA
  • Date Registered: Jul 2017
  • Posts: 103
Plugin has been updated on the server by Lancelot.  Update tested and working perfectly. Thanks JFX and Lancelot!  :thumbsup:

 

Powered by EzPortal