29/10/2025

Get Windows Capabilities - Powershell

Recently I came across very useful PowerShell cmdlet to manage windows OS.

It is called Get-WindowsCapability




It is part of DISM module (the tool we discussed in last blog post).

In order to see all available capabilities (features), you can run following:

Get-WindowsCapability -Online

This shows, component along side with status (whether it is installed on current system or not)

E.g.

Name  : Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0

State : NotPresent


Name  : Microsoft.Windows.WordPad~~~~0.0.1.0

State : Installed


Capabilities can be categorized to several categories:
  • .NET Framework 3.5
  • RSAT tools (e.g. Active Directory, DHCP)
  • Language packs
  • OpenSSH Client/Server
  • WordPad, PowerShell ISE, etc.

In the list category is shown as the first part of the name.

If you want to search for specific capability, you can do it using following PowerShell command:

Get-WindowsCapability -Online | Where-Object Name -like "*OpenSSH*"

If you want to installed a capability, you need to use a different cmdlet called "Add-WindowsCapability"

Add-WindowsCapability -Online -Name "OpenSSH.Server~~~~0.0.1.0"

If you want to un-install a capability:

Remove-WindowsCapability -Online -Name "Microsoft.Windows.WordPad~~~~0.0.1.0"

This is very handy way to install components, when you are in a hurry.

Reclaiming Disk Space Safely - Method 1

I was cleaning up my old laptop (which my daughter is using now) and it was severely lacked disk space to operate. I tried conventional ways and able to get some space, but was not enough.

Analyzing the system, I could see there are there are several iteration of windows updates and multiple version of windows components are there. Most of these components are stored in WinSxS folder. Looking at the size of this folder, I could see it is huge.

WinSxS -> short name for Windows Side-by-Side.

How do I clean-up this folder? It was too risky to manually delete stuff in here as it is windows system component folder. There fore I turned to ChatGPT (in old days it would have been Google), to find the answer.

One of the suggestion by ChatGPT was to use dism command line tool.



What is dism command line tool?

DISM -> Deployment Image Servicing and Management. DISM can do lot more than cleaning up WinSxS folder. If you need to know more about it read this article from Microsoft.

You can use following command to analyze the component store:

Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore

You will see output similar to below:

Component Store (WinSxS) information:

Windows Explorer Reported Size of Component Store : 9.17 GB

Actual Size of Component Store : 8.70 GB

    Shared with Windows : 4.04 GB

    Backups and Disabled Features : 4.66 GB

    Cache and Temporary Data :  0 bytes

Date of Last Cleanup : 2025-10-29 02:50:09

Number of Reclaimable Packages : 8

Component Store Cleanup Recommended : Yes

The operation completed successfully.


When you are ready to clean-up, run following command:

Dism.exe /Online /Cleanup-Image /StartComponentCleanup

If your system is stable and you are sure, you don't need to rollback any components add "resetbase" option to above command to clean-up further.

Dism.exe /Online /Cleanup-Image /StartComponentCleanup /resetbase

But after resetting, you will not be able to un-installed already installed updates.



Get Windows Capabilities - Powershell

Recently I came across very useful PowerShell cmdlet to manage windows OS. It is called  Get-WindowsCapability It is part of DISM module (th...