[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 818
  • Last Modified:

New mailbox Availability only permissions by default

[PS] C:\>Get-MailboxFolderPermission -Identity user@company.com:\calendar

RunspaceId   : 80ee3106-dd23-4db9-8eac-9afbecf4d50e
FolderName   : Calendar
User         : Default
AccessRights : {AvailabilityOnly}
Identity     : Default
IsValid      : True

Company requires users to see each other mailboxes as reviewers.   Like this:

RunspaceId   : 80ee3106-dd23-4db9-8eac-9afbecf4d50e
FolderName   : Calendar
User         : Default
AccessRights : {Reviewer}
Identity     : Default
IsValid      : True

How can I make it by default when creating new users mailbox?
0
Tiras25
Asked:
Tiras25
  • 4
  • 3
3 Solutions
 
suriyaehnopCommented:
Since both are using different cmdlet, you can't accomplish when using Exchange Management Console.
To automate this, you must create a new mailbox using Exchange Powershell script which combination of New-Mailbox and Add-MailboxFolderPermission
0
 
Tiras25Author Commented:
Using same EMS shell.  

Can you give me an example or a template?  Thanks!
0
 
suriyaehnopCommented:
#Import List of Users
$Users = Import-Csv C:\PS\CreateMailbox.csv

#Create a Mail-Enabled User
New-Mailbox -Name $User.name -FirstName $User.firstname -LastName $User.lastname -Alias $User.alias `
-UserPrincipalName ($user.alias +'@domain.com') -Database $GetDatabase -OrganizationalUnit "domain.com\ITOU" `
-Password ( ConvertTo-SecureString P@ssw0rd8 -AsPlainText -Force) -ResetPasswordOnNextLogon:$false `

#Check AD Latency
do
{
 $mailbox = Get-Mailbox -Identity $user.alias -ErrorAction SilentlyContinue 
}
While ($mailbox -eq $null)

$Mailboxes = Get-Mailbox -ResultSize Unlimited | Where { $_.Displayname -ne $User.name }

$Mailboxes | foreach {Add-MailboxFolderPermission -Identity $User.name:\Calendar -User $_.Displayname -AccessRights Reviewer}

Open in new window

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Tiras25Author Commented:
So this is for either new or existing users?  Each new user I want to put into the .csv file , or put all user into that file and run it.   Right?
0
 
suriyaehnopCommented:
This is for new user only, I didn't test it out in my environment. The new use is in CSV file and assing the folder permission by

$Mailboxes = Get-Mailbox -ResultSize Unlimited | Where { $_.Displayname -ne $User.name } - get list of mailboxes except the new mailbox just create.

$Mailboxes | foreach {Add-MailboxFolderPermission -Identity $User.name:\Calendar -User $_.Displayname -AccessRights Reviewer} - Assign the Reviewer permission on newly mailbox to all existing mailboxes
0
 
Tiras25Author Commented:
So each new user I need to put into that CSV file?
0
 
suriyaehnopCommented:
yes
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now