How would I write this in PS in looking for "Company\Domain Admins" from local Admin group?
Get-LocalGroupMember -Group "Administrators" (Gives me a list of groups that are in the Local Administrators group)
If exist ""Company\Domain Admins"
Then
Remove-LocalGroupMember -Group "Administrators" -Member "Company\Domain Admins"
Get-LocalGroupMember -Group "Administrators" (Gives me a list of groups that are in the Local Administrators group)
If exist ""Company\Domain Admins"
Then
Remove-LocalGroupMember -Group "Administrators" -Member "Company\Domain Admins"