Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach ($group in $groups)
- {
- $managedByArray = @()
- $ownerString = $null
- try
- {
- $managedByArray = (Get-UnifiedGroupLinks $group.alias -linktype Owner).primarysmtpaddress
- foreach ($owner in $managedByArray)
- {
- $ownerString = $ownerString + $owner + ";"
- }
- }
- Catch
- {
- $managedByArray = $null
- }
- $group.Alias+","+$group.PrimarySMTPAddress+","+$group.DisplayName+","+$group.ExternalDirectoryObjectId+","+$group.WhenCreatedUTC+","+$group.ManagedBy+","+$recipientList >> GroupOutput.csv
- $x = $x + $count
- ProgressBar $x $group.Alias
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement