Hi Guys
I can use following powershell script to get local admin members , but there was one problem , if any non-resolved SID existed in any local admin group, the script will report a error ,and stop to run, was a way to fix that problem
===========================================
Add-Tyep -AssemblyName System.DirectoryServices.AccountManagement
$ctype = [System.Directory.AccountManagement.ContextType]::Macihne
$contexr = New-Object -TypeName System.DirectoryServices.AccountManagement.PrincipalContext -ArgumentList $ctype,$server
$idtype = [System.DirectoryServices.AccontManagement.IdentityType]::samAccountName
$group = [System.DirectoryServices.AccountManagement.GroupPrincipal]::FindByIdentity($context,$idtype,'Administrators')