Closed Chudinnio closed 3 years ago
@Chudinnio
You need to add .mail to the end of your query to return the email itself. Right now, you're returning an object with the mail as a property. Try the line below instead and let me know.
MailboxList = @(Get-ADGroupMember -Identity ExampleName -recursive | get-aduser -Properties mail | select mail).mail
@grahamr975 Thank you very much for help. It works!!!
@grahamr975 Thank you very much for help. It works!!!
Where exactly do you put this line? In which file and which line get replaced? Thanks
Hello everyone,
I would like to deploy script on AD Group. So i changed Mailbox Parameter code:
[Parameter(Mandatory=$False)] [String[]] $MailboxList = @(Get-ADGroupMember -Identity ExampleName -recursive | get-aduser -Properties mail | select mail),
in powersahell when i check only: Get-ADGroupMember -Identity ExampleName -recursive | get-aduser -Properties mail | select mail, i got list of users but when i use it in parameter i got mail adres in format: @{mail=name.surname@domain.com} after that i got error that email adres is in bad format. What should i do? Any sugesstions?