Add-WindowsCapability does accept pipeline input by property name from Get-WindowsCapability directly.
Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online
Get-WindowsCapability -Name Rsat.ActiveDirectory.DS-LDS.Tools* -Online | Add-WindowsCapability -Online
: This cmdlet takes the list of RSAT features found by the first command and installs them on the current system. Why Use This Command?
: Tells Windows to download and install every tool it just found. How to Run It
: Instead of manually selecting dozens of individual tools in the GUI, this command installs everything in one step.