How do I administer local groups on a remote server with PowerShell and WMI? For example, I would like to add and remove domain AD groups from the "Remote Desktop Users" group.
This article provides a script for listing users while this article provides a bit more detail on the Get-WMIObject (GWMI) and Set-WMIObject (SWMI) cmdlets, however I'm unsure how to proceed with updating the group membership.
Best Answer
ADSI is your friend