Windows Capability Manager is a bit different than the Windows Package Manager. The Package Manager manages installed app/software/packages. Like so:
get-windowspackage -online |?{$_.packagename -like "*foo*"}
dism /online /get-packages
See the article on Windows Package Manager.
Windows already has builtin capabilities but only some are turned on by default.
The other capabilites need to be enabled only on an as-needed basis.
To get the capabilities:
get-windowscapability -online
get-windowscapability -online |?{$_.name -like "*rsat*"}
To add the capabilities:
add-windowscapability -online -name Microsoft.Windows.Noptepad~~~~0.0.1.0
get-windowscapability -online -name RSAT* |add-windowscapability -online
To remove the capability:
remove-windowscapability -online -name Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0
Note that if you get a message about "Permanent Package Cannot be Unistalled"; that usually indicates that you are trying to uninstall a capability that another capability is depending on. In other words, remove the other capability first, then you can remove the dependency.
To get optional features:
dism /online /get-features /format:table
get-windowsoptionalfeature