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.
Brandon Shell
---------------
Blog:
http://www.bsonposh.com/
PSH Scripts Project:
www.codeplex.com/psobject
d> Hi shay , tnx for the info
d>
d> basically it works , but i have one more Q .
d>
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>
d> "Shay Levi" wrote:
d>
>> 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")
>> $group.PSBase.InvokeGet("members")
>> $members = $group.psbase.invoke("Members") | foreach
>> {$_.GetType().InvokeMember("Name",
>> 'GetProperty', $null, $_, $null)}
>> $members
>> -----
>> Shay Levi
>> $cript Fanatic
>> http://scriptolog.blogspot.com
>> 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 .
>>>
>>> tnx
>>>