答案1
ADSI 是你的朋友
$server = "somesServer"
$domain = "someDomain
$group2add = "group2add"
$localGroup = [adsi]"WinNT://$server/administrators,group"
$domainGroup = [adsi]"WinNT://$domain/$group2add,group"
$localGroup.Add($domainGroup.path)
ADSI 是你的朋友
$server = "somesServer"
$domain = "someDomain
$group2add = "group2add"
$localGroup = [adsi]"WinNT://$server/administrators,group"
$domainGroup = [adsi]"WinNT://$domain/$group2add,group"
$localGroup.Add($domainGroup.path)