Dsget group does not display member name but ID


hello, use dsget group command display group members of ad group successfully. how make display user name, instead of id.

my syntax "dsget group "cn=.....dc=com" -members -expand

thanks.

 

tiffany

 

if have sid values in text file, can read them get-content cmdlet in powershell. example, script reads sid's file , outputs corresponding names. can redirect output text file, or use out-file cmdlet (with -append parameter) to output $sam file:

 

$sids = get-content -path "c:\rlm\powershell\members.txt"

foreach ($sid in $sids)
{
    $sam = (new-object system.security.principal.securityidentifier($sid)).translate([system.security.principal.ntaccount])
    $sam
}

-----

 

to write names directly file (instead of output console , redirectly file), use:

$sam | out-file .\names.txt -append


richard mueller - mvp directory services


Windows Server  >  Directory Services



Comments

Popular posts from this blog

server manager error: ADAM.events.xml could not be enumerated.

Cannot access Anywhere Access using domain name?

WMI Failure: Unable to update Local Resource Group