64 b - primalscript 2020 - version 7.7.139
Operating system:
64 bit OS: win 10 enterprise
I am looking for a way to get Ad groups, its members (name), Authorig (users that have the ability to send to group) and export results. Here is what I am going with. It gets the group, user name but having issues with getting the authorig. I am thinking it won't really work due the way I going about getting the groups and members. I tried to re-think the way to go about getting the info. Anyone got thoughts on how to go about this?
- $Groups = Get-ADGroup -Filter * -SearchBase 'OU=,DC=,DC=' -Properties Name, members, authorig
- $Results = foreach( $Group in $Groups ){
- Get-ADGroupMember -Identity $Group | ForEach-Object {
- [pscustomobject]@{
- GroupName = $Group.Name
- Name = $_.Name
- authorig = $_.authorig
- }}}
- $Results | Export-Csv E:\Exports\test8.$((Get-Date).ToString('MM.dd.yy')).csv -NoTypeInformation