Page 1 of 1

Combining the two Exchange server PowerShell to grab Meeting room permission ?

Posted: Tue Jul 24, 2018 11:55 pm
by ITEngineer
Hi People,

How can I combine the below PowerShell script to get the list of permissions that are already configured to the Remote Office365 Meeting room?

Script:

Code: Select all

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic –AllowRedirection
Import-PSSession $Session

Get-RemoteMailbox -ResultSize Unlimited -Filter 'DisplayName -like "*Site 1*"' | % {Get-MailboxCalendarFolder $($_.PrimarySmtpAddress + ":\Calendar")} | Select-Object Identity,User,AccessRights | Sort-Object Identity
returns error, despite when I execute the first section of the script it returns the list of the meeting room?

Script: Get-RemoteMailbox -ResultSize Unlimited -Filter 'DisplayName -like "*Site 1*"'

Thanks in advance

https://docs.microsoft.com/en-us/powers ... xchange-ps
https://docs.microsoft.com/en-us/powers ... xchange-ps

Re: Combining the two Exchange server PowerShell to grab Meeting room permission ?

Posted: Wed Jul 25, 2018 12:26 am
by jvierra

Code: Select all

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic –AllowRedirection
Import-PSSession $Session

$mbx = Get-Mailbox -ResultSize Unlimited -Filter 'DisplayName -like "*Site 1*"'
$mbx |
    ForEach-Object{
        Get-MailboxFolderPermission  "$($_.Alias):\Calendar"
    } | 
    Select-Object Identity,User,AccessRights | 
    Sort-Object Identity