WindowsCompatibility icon indicating copy to clipboard operation
WindowsCompatibility copied to clipboard

DISM commands not compatible

Open panos-coupa opened this issue 5 years ago • 4 comments

Some commands in the DISM module are not running

for example:

PS C:\Windows\System32> Get-WindowsCapability -Online
Get-WindowsCapability: Class not registered

PS C:\Windows\System32> Get-WindowsOptionalFeature -Online
Get-WindowsOptionalFeature: Class not registered

Same goes for Remove-WindowsOptionalFeature and Remove-WindowsCapablility

My system is: Windows 10 Enterprise v2004 My Powershell is: PowerShell 7.1.0-rc.2

Thanks for your time

panos-coupa avatar Nov 03 '20 18:11 panos-coupa

PowerShell 7.1.2 confirm this behavior. At PS 5.1 not problem with this comandlet I try to run this command at PS 7 Get-WindowsCapability -Online -LogPath "%WINDIR%\Logs\Dism\capability.log" -LogLevel WarningsInfo| ? Name -like 'OpenSSH*' and try to run this command at PS 5 Get-WindowsCapability -Online -LogPath "%WINDIR%\Logs\Dism\capability5.log" -LogLevel WarningsInfo| ? Name -like 'OpenSSH*' capability5.log capability.log Logs attached.

Alsiri0n avatar Mar 11 '21 13:03 Alsiri0n

Since I stumbled about somthing like this some time ago it would be interesting if the problem persits if you load the dism module with -SkipEditionCheck

jschpp avatar Mar 13 '21 21:03 jschpp

-SkipEditionCheck is not available as a parameter for the Get-WindowsCapability command. -verbose and -debug do nothing as well

DShader avatar Jun 08 '21 01:06 DShader

My mistake. I wasn't quite clear enough.

You need to import the Module like this:

Import-Module -SkipEditionCheck DISM

jschpp avatar Jun 08 '21 10:06 jschpp