DISM cmdlets not working in Powershell 7
See original GitHub issueSteps to reproduce
Type
Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
Expected behavior
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:\Users\Administrator> Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
Name : OpenSSH.Client~~~~0.0.1.0
State : Installed
Name : OpenSSH.Server~~~~0.0.1.0
State : NotPresent
Actual behavior
PowerShell 7.2.0-preview.5
Copyright (c) Microsoft Corporation.
https://aka.ms/powershell
Type 'help' to get help.
PS C:\openssh> Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
Get-WindowsCapability: Class not registered
Environment data
Powershell 5.1 (working)
PS C:\Users\Administrator> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.21376.1
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.21376.1
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Powershell 7 (installed from Store)
PS C:\openssh> $PSVersionTable
Name Value
---- -----
PSVersion 7.2.0-preview.5
PSEdition Core
GitCommitId 7.2.0-preview.5
OS Microsoft Windows 10.0.21376
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Additional Notes
Referenced in Powershell/WindowsCompatibility#87 I wasn’t sure if it was the right place to report this issue, so I’m reporting here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:32 (7 by maintainers)
Top Results From Across the Web
DISM not working
DISM not working. When I run any of the DISM commands in either CMD or Powershell, it opens an empty powershell window.
Read more >Use DISM in Windows PowerShell
The Deployment Image Servicing and Management (DISM) cmdlets can be used to perform the same functions as the DISM.exe command-line tool. In ...
Read more >PowerShell 7 module compatibility
This article lists the compatibility status of modules published for other Microsoft products with PowerShell 7.
Read more >Most of powershell commands not working
So I ran the DISM+SFC+Chkdsk+Reboot gamut, no luck. Reinstall/Repair .NET, no change. PSModule paths, etc. etc. no fix. Digging further, read up ...
Read more >'Get-WindowsDriver' is not recognized as the name of a ...
I'm on Windows 10 x64 so my PowerShell automation code based on DISM / Get-WindowsDriver cmdlet will only run successful (without exceptions) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This issue has been marked as external and has not had any activity for 1 day. It has been be closed for housekeeping purposes.
Why is this closed? It’s still a bug.