Add-WindowsCapability might fail in some scenarios in SCCM environments. Try the following to workaround the issue
Set-ItemProperty HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name UseWuServer -Value 0 -Force
Get-Service wuauserv | Restart-Service -Force
#Try Add-WindowsCapability with the feature you would like to install, CertificateServices is listed as example
Add-WindowsCapability -Online -Name Rsat.CertificateServices.Tools~~~~0.0.1.0
RSAT feature list
- Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0
- Rsat.BitLocker.Recovery.Tools~~~~0.0.1.0
- Rsat.CertificateServices.Tools~~~~0.0.1.0
- Rsat.DHCP.Tools~~~~0.0.1.0
- Rsat.Dns.Tools~~~~0.0.1.0
- Rsat.FailoverCluster.Management.Tools~~~~0.0.1.0
- Rsat.FileServices.Tools~~~~0.0.1.0
- Rsat.GroupPolicy.Management.Tools~~~~0.0.1.0
- Rsat.IPAM.Client.Tools~~~~0.0.1.0
- Rsat.LLDP.Tools~~~~0.0.1.0
- Rsat.NetworkController.Tools~~~~0.0.1.0
- Rsat.NetworkLoadBalancing.Tools~~~~0.0.1.0
- Rsat.RemoteAccess.Management.Tools~~~~0.0.1.0
- Rsat.RemoteDesktop.Services.Tools~~~~0.0.1.0
- Rsat.ServerManager.Tools~~~~0.0.1.0
- Rsat.Shielded.VM.Tools~~~~0.0.1.0
- Rsat.StorageMigrationService.Management.Tools~~~~0.0.1.0
- Rsat.StorageReplica.Tools~~~~0.0.1.0
- Rsat.SystemInsights.Management.Tools~~~~0.0.1.0
- Rsat.VolumeActivation.Tools~~~~0.0.1.0
- Rsat.WSUS.Tools~~~~0.0.1.0