Office 365 powershell cmdlets for Managing Exchange online

Follow me We have been working on Office 365 migrations quite long and found Azure PowerShell more than useful in managing 365 hosted organizations. There are a lot of cmdlet which we use regularly and believe every Office 365 Admin should know about them. Hence I am summarizing this article detailing all of them. To execute following Cmdlets , you need to install and connect to windows Azure PowerShell console,  Refer following article to understand how to do that. How to Connect to Office 365 via PowerShell Get company information Get-MsolCompanyInformation Find out total number of users in your office 365 Organization. (Get-MsolUser -All).length Get the total number of deleted users in your Office365 Org (get-msoluser -returndeletedusers).length Get a complete dump of all the users in your Office 365 Org. Get-MsolUser -All Get List of all the Groups in your Office 365 Org. Get-MsolGroup -All Provide the details of one particular user name Get-MsolUser -UserPrincipalName $myusername | Format-List Provides a dump of all users with UsageLocation US Get-MsolUser -UsageLocation “US”   Specify  Usage location ( Country where user is going to be mostly working like US or India) before activating it. Set-MSOLUser –UserPrincipalName $myusername –UsageLocation US   How to set Password Never Expire for Office 365 users. Set-MsolUser -UserPrincipalName $myusername -PasswordNeverExpires $true   Find Users with certain UPN or replace with other attribute or logic Get-MsolUser | where {$_.UserPrincipalName -match “contoso.com”} Get-MsolUser | where {$_.UsageLocation -match “UK”} | Format-Table DisplayName, UserPrincipalName, UsageLocation Get-MsolUser | where {$_.UserPrincipalName -match “John”} | Format-Table DisplayName, UserPrincipalName, UsageLocation Set User attributes using Set-MsolUser Cmdlet Set-MsolUser -UserPrincipalName $myusername -Title  “Dr.” Similarly Get-msoluser can provide dump...

Read Receipts sent without user actually reading the Email

Follow me Some users from a company which we migrated six months back to Office 365 started to complain that senders are getting two read receipt of the emails without them actually reading it. We found the issue was random and only some users had this problem not the whole organisation. After some research we found out the users who are facing this issue are using POP to download the email to their mail client. And the sender is getting two Read receipts, One when the mail is downloaded and the other when it’s actually read by the user. Fortunately the solution for the issue as quite simple, we have a switch available for CAS server to suppress the Read Receipt by pop. In order to run the following commands, you need to connect to Azure online PowerShell, if you are not aware of the steps, feel free to follow How to Connect to Office 365 via PowerShell. Run the following PowerShell commands for the problem POP3 users: Set-CASMailbox popmbx -PopUseProtocolDefaults $false Set-CASMailbox popmbx -PopSuppressReadReceipt $true Hope this fixes the issue at hand, For dedicated support options refer our support plans Here Follow...

Office 365 users sending Winmail.dat attachment

Follow me Ever wondered about people complaining that they got weird attachment with your email named WinMail.dat, they even try to open it but it didn’t open, actually they didn’t have a program capable to open that file. It was the Job of their email client (Mac Mail, Mozilla Opera) whatever they were using and that’s the sole reason that it removed all the styling which you did in your brand new Microsoft outlook and attached it as a strange file called WinMail.dat and presented the user with a dull  text only email. Here is what Microsoft says about it: By default, email messages that are sent from Exchange Online in Office 365/Outlook 2013/Microsoft Exchange Server use the Transport Neutral Encapsulation Format (TNEF) format. Messaging systems that aren’t based on Microsoft Exchange may be unable to interpret messages that use this rich text format. If the recipient’s messaging system can’t process this format, a file attachment that’s called Winmail.dat is added to the message. So now that we know about the issue lets talk about the solution. Well as we have already explained that the issue is not with your computer but with the outdated email client that Recipient using. What needs to be done is that you send him an email in plain text which his email client can understand.  So we have a couple of options here. If the recipient is someone to whom everyone (in your company) sends email and its an issue with everyone then we can do a change on the exchange server itself or if its only your problem then you can make...

The application experienced an internal error loading the SSL libraries

Follow me We do quite few Office 365 migrations, In past month or so we noticed that some users have started to complain about Outlook 2013 throwing a security alert on start-up stating “The application experienced an internal error loading the SSL libraries”.   With some quick research we have found out that it is actually some bug with Microsoft Outlook 2013 where it gives this error when you domain website (given that it shares the same name as your SMTP domain) doesn’t run on SSL or has Bad/Expired/Un-trusted SSL certificate. Outlook Uses various AutoDiscover processes to query an Exchange email account connection information, one of them is also Domain name lookup, so if you website name is same as your email SMTP domain name then Outlook can look that up.  However this never used to pop-up with this warning message until recently. One solution to the issue is to get your website on SSL with a good third-party certificate but it not something very acceptable to me, I don’t care if my website has a SSL cert or not than why is outlook bothered with it.  MS is working on a solution to the problem but in the mean while you can create the following registry entry on the problem PC to suppress this warning message For Outlook 2013 Create or import the following key: HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\AutoDiscover “ExcludeHttpsRootDomain”=dword:00000001 For Outlook 2010 Create or import the following key: HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\AutoDiscover “ExcludeHttpsRootDomain”=dword:00000001   Hope this article helped you to fix the quick issue at hand, for more support options visit here Follow...

View Office 365 License / Plan information via PowerShell

This article provides the step-by-step procedure to check the type of licenses you have in your Office 365 plan. This information is required if you are planning to add individual or bulk users on Office 365 via PowerShell and License them as well. First you’ll need to connect to your Office 365 Portal via PowerShell. Connect to Office 365 via PowerShell To get Plan/License Information, run the following command: Get-MsolAccountSku As shown in the image below, AccountSkuID is the type of License assigned to your Organization. If you have multiple type of Office 365 License, than they all will be listed here. You can use tho information when you configure a new user on Office 365 Portal via PowerShell to assign it to the user. Please do not forget to share your feedback, or ask a question by clicking here.   Follow...