That wouldn't make alot of sense from a local perspective. AFAIK you can
NOT nest local groups on a Machine. This would imply you mean Domain Groups
that are added to Local Groups... you can do this, but it would required
quering the AD for the information and it no longer a local query.
An exception to this would be well-known groups, but those are calculated
and do not really have member ship to begin with.
PSH Scripts Project: www.codeplex.com/psobject
d> Hi shay , tnx for the info
d> basically it works , but i have one more Q .
d> if inside the group i have another group , is there anyway i can
d> somehow retrive also the users that belong to the group that is
d> nested within this group ?
d> "Shay Levi" wrote:
>> Hi don5,
>> Try this (can't remember where I got it, I think from Brandon Shell)
>> $name = "guest"
>> $server = "sha"
>> $group = [ADSI]("WinNT://$server/$name,group")
>> $members = $group.psbase.invoke("Members") | foreach
>> 'GetProperty', $null, $_, $null)}
>> Shay Levi
>> $cript Fanatic
>> Hebrew weblog: http://blogs.microsoft.co.il/blogs/scriptfanatic
>>> HI all
>>> any idea how to extract the users from a local group on a distant
>>> computer ?
>>> for example , i have a computer named "sha" and i want to know from
>>> my computer what are the users of his local "guest" group . and of
>>> course to import it to an excel file .