Hi All
i want to export sendas permissions for a shared mailbox. i am getting the error when using the below syntax in exchange online powershell
Get-RecipientPermission -Identity sharedmailbox@contoso.com | Get-ADPermission | Where-Object {$_.extendedrights -like "*Send*"} | Select-Object Identity,User,@{Name="extendedrights";Expression={$_.extendedrights}} | Export-Csv C:\temp\output.csv -NoTypeInformation
Get-ADPermission : The term 'Get-ADPermission' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:71
+ Get-RecipientPermission -Identity sharedmailbox@contoso.com | Get-ADPerm ...
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-ADPermission:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException