I need to Add Active Directory Groups to Local Administrator Group on Server but I need a IF statement
Like If the Computer is in that Group then add this AD Group name to Local Administrator Group of the local computer
I need help I am still trying to create one if someone help me I’ll really appreciate that.
$g=Get-ADGroupMember -Identity “CN=myADgroup,OU=myOU,DC=corp,DC=com” -server corp.com foreach($mbr in $g) {if($name.MemberOf -like “mycomp” -eq $true)} |