I have created the below
Get-ADGroup -Filter * -SearchBase "DC=Domain,dc=.com" -properties name, members |
Select-Object *,@{Name='Member';Expression={$_.Members -replace '^CN=([^,]+).+$','$1'}} |
FT Name, Member -Autosize |
out-file c:\text.txt
Ignore Domain and .com I have them populated with my relevant information, but for sake of here removed them.
When I run this it returns what I'm after but when looking at the members within the group they all end with ... and don't show all the members
Select-Object props | Export-CSV -NoType c:\text.txt
– Matt Dec 11 '15 at 13:26FT Name, Member -Autosize
withOut-String
? – sodawillow Dec 11 '15 at 13:36