title: How can I get all of the members within one AD Group with many child groups by powershell?
body: <p>I want to get all of the AD group members' uerprincipalname, but there has some many child group in it.
  I want to know how to do change the code below to achieve the goal.
  <code>$UserList=Get-ADGroupmember -identity adgroup | % { get-aduser $_.samaccountname | select userprincipalname }</code></p>