Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8" ?>
- <Configuration version="1.0">
- <Feature Name="MailboxProvisioning" Cmdlets="new-mailbox,enable-mailbox">
- <ApiCall Name="OnComplete">
- if($succeeded) {
- start-sleep -s 5
- Set-ADServerSettings -ViewEntireForest $true
- $mailbox = [string]$provisioningHandler.UserSpecifiedParameters["Identity"]
- $Folder = ":\Calendar"
- $Root = ":\"
- $UserAndFolder = $mailbox + $Folder
- $UserAndRoot = $mailbox + $root
- add-MailboxFolderPermission -Identity $UserAndFolder -User "adamh" -AccessRights author
- add-MailboxFolderPermission -Identity $UserAndRoot -User "adamh" -AccessRights foldervisible
- }
- </ApiCall>
- </Feature>
- </Configuration>
- ----
- #No Account
- [PS] C:\Windows\system32>get-mailbox fowler
- The operation couldn't be performed because object 'fowler' couldn't be found on 'DC01.CORP.WHYADMIN.COM'.
- + CategoryInfo : NotSpecified: (:) [Get-Mailbox], ManagementObjectNotFoundException
- + FullyQualifiedErrorId : 23B091B0,Microsoft.Exchange.Management.RecipientTasks.GetMailbox
- + PSComputerName : mbx01.corp.whyadmin.com
- #Create Account
- [PS] C:\Windows\system32>enable-mailbox fowler
- Name Alias ServerName ProhibitSendQuota
- ---- ----- ---------- -----------------
- Fowler Mc. Fowler fowler mbx01 Unlimited
- #Check Permissions
- [PS] C:\Windows\system32>Get-MailboxFolderPermission fowler:\calendar
- FolderName User AccessRights
- ---------- ---- ------------
- Calendar Default {AvailabilityOnly}
- Calendar Anonymous {None}
- Calendar Adam Hubbard {Author}
- [PS] C:\Windows\system32>Get-MailboxFolderPermission fowler:\
- FolderName User AccessRights
- ---------- ---- ------------
- Top of Informatio... Default {None}
- Top of Informatio... Anonymous {None}
- Top of Informatio... Adam Hubbard {FolderVisible}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement