How to use Powershell to set delegate for user mailbox in Office 365?
-
Friday, February 04, 2011 3:20 PM
Hello,
Could you please tell me if I can use Powershell to set delegate for user mailbox in Office 365 or BPOS?
If I can, then how can I do that (which Powershell command should I use?)?
Many thanks and have a good day!
All Replies
-
Friday, February 04, 2011 3:39 PM
Sure, it is similar to Powershell in BPOS with some additional pieces:
Use this command to set your credential variable:
$cred = Get-Credential
When you execute the above command, you'll be prompted for your Office 365 credentials.Then create a new PowerShell Session object with this command:
$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic -AllowRedirection
You'll get a warning about being redirected, don't worry that is what the -AllowRedirection command is for.
Next, import the cmdlets to your local shell session:
$importresults = Import-PSSession $s
Once you are there you can run the Get-Command like this to see all the available commands, the one you'll need is probably 'Add-MailboxPermissions'
Get-Command -Module $importresults | Out-Host -Paging
Hope this helps!
Jorge R. Diaz, PMP, CCNA, MCSA, MCSE
Senior Microsoft Consultant
Check out My Blog!- Proposed As Answer by Jorge R. Diaz - PlanetMVP Friday, February 04, 2011 3:39 PM
- Marked As Answer by Vickie L - BPOS SupportModerator Monday, December 19, 2011 1:01 AM
-
Friday, February 04, 2011 3:54 PM
Many thanks! I will try that.
Have a good day!
-
Friday, February 04, 2011 4:33 PM
Hello,
I'd like to set the permission on folder level, that's why I am using Add-MailboxFolderPermission to add the Editor permission for user A to access my Inbox folder. It did set the permission as Editor for user A to access my Inbox nicely. Thank you very much!
However, user A didn't show up on my mailbox delegate list. (Though he was shown up in the Permission list for my Inbox as Editor)
Do you know how can I make user A to show up on my mailbox delegate list using Powershell?Many thanks!
-
Friday, February 04, 2011 5:55 PM
That I am not sure about...I did a little digging and keep getting thrown back to this blog, check it out and maybe it can help:
http://gsexdev.blogspot.com/2009/04/add-delegates-to-mailbox-with.html
Thanks,
Jorge R. Diaz, PMP, CCNA, MCSA, MCSE
Senior Microsoft Consultant
Check out My Blog! -
Friday, February 04, 2011 7:14 PMMany thanks, I will...
-
Friday, February 04, 2011 8:08 PM
You know, I've checked the link, it requires to have local Exchange on my machine :(
Anyway, many thanks for your help. If you happen to know how to set delegate for Office 365 using Powershell, or any tool, please let me know.
Have a great day!
-
Tuesday, February 08, 2011 7:59 AM
How about giving permissions to the mailbox?
Add-MailboxPermission "MailboxYouWant2Delegate" -user PleaseUseUPN@company.com -Accessright FullAccess
See this link for more details: http://technet.microsoft.com/en-us/library/bb676368.aspx#UseShell
SendAs right needs to be set with "Add-AdPermission"
Please make sure to use UPN instead of "Domain\Username"
Regards,
Tim
- Proposed As Answer by Daniel Trautman Tuesday, March 15, 2011 10:10 PM
-
Wednesday, March 16, 2011 2:21 PMThat is the command for giving full mailbox access rights, but the question at hand is can you just add permissions to view the Inbox if I am reading the post correctly.
Jorge R. Diaz, PMP, CCNA, MCSA, MCSE, MCTS
Senior Microsoft Consultant
Check out My Blog!

