Hi support,
This is the complete script from adaxes, have tried to break it down to a single group name to extract members details - so there are commented sections included as well. The activity history show blank ...
Thanks
Alex
$filePath = 'd:\adaxes\pdl-mbrs.csv'
Import-Module Adaxes
$identity = Get-AdmGroup "983pdl" # sAMAccountName
$members = Get-AdmGroupMember -Identity $identity -AdaxesService localhost
foreach ($member in $members)
{
$dist = $member.Name
}
$dist | Export-CSV $filepath -NoTypeInformation
# $members | Export-CSV d:\adaxes\imbrs.csv -NoTypeInformation
<#
( $members = Get-AdmGroupMember -Identity $identity ) # -AdaxesService localhost )
$dist = foreach ($member in $members)
{
# Write-Host $member.Name
}
$dist | Sort Group,User | Export-CSV $filepath -NoTypeInformation
#>
<#
Import-Module Adaxes
$identity = "SalesGroup" # sAMAccountName
# $identity = "CN=SalesGroup,CN=Users,DC=domain,DC=com" # DN
# $identity = "{EB5FEB21-E648-42AD-B86C-89D3C6807953}" # GUID
# $identity = "S-1-5-21-573937-2149998-410785" # SID
$members = Get-AdmGroupMember -Identity $identity -Server "domain.com" `
-AdaxesService localhost
foreach ($member in $members)
{
Write-Host $member.Name
}
#>
#Import-Module Adaxes
#$filePath = 'd:\adaxes\test.csv'
#$groups = (Get-AdmGroup -Filter {name -like "*Project Distribution List"} | Select-Object -Property DistinguishedName)
#$Grp = Get-ADGroupMember -Identity $groups | Where {$_.ObjectClass -eq 'user'} |Get-ADUser -Properties Title,Department|Select Name,Title,Department,SamAccountName,DistinguishedName
#$Grp | Export-CSV -Path d:\adaxes\test1.csv -NoTypeInformation
# ForEach ($grp in $groups)
# {
# $dist = (Get-AdmGroupMember $grp | Select-Object -Property Name)
#dist$ = Get-ADGroupMember -Identity "CN=970 - Hazelhurst Court - Project Distribution List,OU=Distribution Lists PF,OU=IT,OU=Holdings,DC=Rydon,DC=Group" -Recursive
# Get-DistributionGroupMember $group | Select @{Label="Group";Expression={$Group.Name}},@{Label="User";Expression={$_.Name}},PrimarySMTPAddress
# }
# DistinguishedName
#$groups | Export-CSV d:\adaxes\groups.csv -NoTypeInformation
#$grp | Export-CSV d:\adaxes\grp.csv -NoTypeInformation