1 |
$UserCredential = Get-Credential |
1 |
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection |
1 |
Import-PSSession $Session -DisableNameChecking |
1 |
Import-Csv C:\365\sharedcalender.csv | foreach { add-MailboxFolderPermission -Identity "h.hemmink@geriant.nl:\calendar" -User $_.alias -AccessRights PublishingEditor } |
1 |
https://theitbros.com/add-calendar-permissions-in-office-365-via-powershell/ |
1 2 3 4 5 6 |
alias e.vanlaarhoven@geriant.nl m.huberts@geriant.nl c.nagelhout@geriant.nl s.hoefakker@geriant.nl a.buikema@geriant.nl |
1 2 |
Alle gebruikers open zetten met Reviewer rechten voor 1 gebruiker. Get-Mailbox | foreach{ Add-MailboxFolderPermission $($_.UserPrincipalName+":\Calendar") -User daan.vanbelkom@taxperience.nl -AccessRights Reviewer } |
You can get the name of the calendar in the current user’s language configuration with the command:
1 |
(Get-MailboxFolderStatistics USER@iris-one.nl -FolderScope Calendar).Identity |
All Mailbox Agenda Rights
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
$Result=@() $allMailboxes = Get-Mailbox -ResultSize Unlimited | Select-Object -Property Alias,Displayname,PrimarySMTPAddress $totalMailboxes = $allMailboxes.Count $i = 1 $allMailboxes | ForEach-Object { $mailbox = $_ Write-Progress -activity "Processing $($_.alias)" -status "$i out of $totalMailboxes completed" $folderPerms = Get-MailboxFolderPermission -Identity "$($_.PrimarySMTPAddress):\Agenda" $folderPerms | ForEach-Object { $Result += New-Object PSObject -property @{ Identity = $_.Identity MailboxName = $mailbox.alias User = $_.User Permissions = $_.AccessRights }} $i++ } $Result | Select Identity, MailboxName, User, Permissions | Export-CSV "C:\MailKadans\CalendarPermissions_Agenda.CSV" -NoTypeInformation -Encoding UTF8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
Add-MailboxFolderPermission -Identity "b.kersten@amstelveen.nl:\Agenda" -User Bur.Ritto@amstelveen.nl -AccessRights Reviewer Set-MailboxFolderPermission -Identity "j.eijgensteijn@amstelveen.nl:\Calendar" -User Default -AccessRights AvailabilityOnly Add-MailboxFolderPermission -Identity "j.eijgensteijn@amstelveen.nl:\Calendar" -User Bur.Ritto@amstelveen.nl -AccessRights AvailabilityOnly Remove-MailboxFolderPermission -Identity "j.eijgensteijn@amstelveen.nl:\Calendar" -User admin-dwe@amstelveen.nl Set-MailboxFolderPermission -Identity "b.kersten@amstelveen.nl:\Agenda" -User Bur.Ritto@amstelveen.nl -AccessRights AvailabilityOnly Set-MailboxFolderPermission -Identity "b.kersten@amstelveen.nl:\Agenda" -User Bur.Ritto@amstelveen.nl -AccessRights AvailabilityOnly Get-MailboxFolderPermission -Identity "b.kersten@amstelveen.nl:\Agenda" Get-MailboxFolderPermission -Identity "j.eijgensteijn@amstelveen.nl:\Calendar" (Get-MailboxFolderStatistics j.eijgensteijn@amstelveen.nl -FolderScope Calendar).Identity Bur.Ritto@amstelveen.nl |