No one has responded to this discussion for at least a year, so this information may be out of date. If you're looking for information about this topic, please search for a more recent discussion or post a new question.

Remote O365 PowerShell session is missing Exchange data types

  • 2 Followers
  • 3 Replies |
  • This post has 0 verified answers |
Not Answered This question is not answered

I'm attempting to adapt a variety of PowerShell scripts that were used for on-premises Exchange 2010 administration to work with Office365.


I modified the scrips to import a remote powershell session (previously run with exchange management tools as a domain member) and am finding discrepancies between the two environments. There are many examples for I'll list one for simplicity.


When running cmdlet Get-CASMailbox on-premises it returns objects of type 'Microsoft.Exchange.Data.Directory.Management.CASMailbox' however when run against O365 it returns 'System.Management.Automation.PSCustomObject'


The mailbox's 'ExchangeVersion' property, when queried on-premises, is of type 'Microsoft.Exchange.Data.ExchangeObjectVersion' however is a String using O365.


This means that on-premises code can query Mailbox.ExchangeVersion.ExchangeBuild but this property does not exist when the code is run against O365.


I tried this on a box with the exchange management tools installed and also tried loading Microsoft.Exchange.Data.dll then casting to the correct data type but didn't have any success.


What solutions exist to use O365 and have return values with the appropriate data type? Trying to parse everything as a string is going to be problematic at best.

  • Post Points: 20
All Replies
Page 1 of 1 (4 items)