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

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 5 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
ITEngineer
Posts: 216
Last visit: Thu Mar 23, 2023 5:45 pm
Has voted: 4 times

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

Post 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
/* IT Engineer */
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

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

Post 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
This topic is 5 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked