If you working with Office 365 PowerShell on daily basis, you may find that it is taking too much time to connect your Office 365 console, especially if you working with multiple tenants. You have to note usernames, passwords for all of the tenants and copy/paste them every time you want to make connection. Below you will find description, how to make it “single command” task.
Because that script will give access to your tenant without typing any username/password, I would suggest that you should not implement that on any public machine. Make sure that you are only person who can execute connection script.
OK, let’s start.
First of all we need to create addition file where encrypted tenant’s password will be stored. As an example create directory “O365Connections” on your C: drive and then create folder “keys” in it.
Start PowerShell prompt and type following command:
Read-Host -Prompt "Enter your tenant password" -AsSecureString | ConvertFrom-SecureString | Out-File "C:\O365Connections\keys\tenant1.key"
If you running Hybrid Environment or just trying to share free/busy information between your on-premise Exchange Organization and Office 365 you may experience that free/busy information for some mailboxes which were recently moved to O365 is not available. Please note that problem does not affect free/busy from on-premise to O365, if you cannot get free/busy for on-premise mailboxes – it must be another issue.
In addition you may see error similar to following in Application Event Log of your Hybrid server:
Event 4002, MSExchange Availability
Process 4192: ProxyWebRequest FederatedCrossForest from S-0-0-00
-0000000000-0000000000-000000000-0000 to https://server_name.outl
ook.com/EWS/Exchange.asmx/WSSecurity failed. Caller SIDs: WSSecur
ity. The exception returned is Microsoft.Exchange.InfoWorker.Comm
rvices.Protocols.SoapException: An internal server error occurred
. The operation failed.
In case you looking for downloading services.wsdl for Office 365 possible that you may find that is not so straightforward.
In general services.wsdl usually located on URL:
How to determine actual server for Office 365 mailbox?
On internet you may find such kind of solution:
— Login to your e-mail account using Outlook Web App (OWA).
— Click Options > See All Options > Account > My Account > Settings for POP, IMAP, and SMTP access.
— In the list of entries, locate the server name
In fact it is not exactly correct, because name you will see there is outlook.office365.com – which is global alias and does not pointing to actual server:
In Office 365 OWA it is possible to rename default folders like Inbox, Sent, Deleted, etc. to match specified language.
Sometimes you may receive following error message:
“The localization operation of the default folders of mailbox “someserver.prod.outlook.com/Microsoft Exchange Hosted Organizations/yourtenant.name/username” failed:Cannot localize the default folders.”
That message does not contain any explanations about possible reasons of that error.
One of the reason that can cause such error is that folder with such name is already exists. Sometimes users exporting their old folders into Office 365 and these folders have same names as default folders.
How it works: