Powershell to get the version of Exchange in Office365 you are running on.
Powershell to get the version of Exchange in Office365 you are running on.
This powershell will get the version of Exchange that your Office365 tenant is running on, and pipe it to a file in c:\temp\ExchangeVersion.txt.
If you set a scheduled task to run this nightly it will build up a history of the version numbers in the log file.
$user = "<Office 365 login>"
$password = convertto-securestring "<password>" -asplaintext -force
$cred = New-Object system.management.automation.pscredential $user,$password
Connect-MsolService -Credential $cred
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $Cred -Authentication Basic -AllowRedirection
Import-PSSession $Session
$name= Get-Date
$Name | out-file -append C:\temp\ExchangeVersion.txt
Get-mailbox -identity "<mailbox on Office365>" | Select ExchangeVersion | out-file -append C:\temp\ExchangeVersion.txt
$name= "=================================================="
$Name | out-file -append C:\temp\ExchangeVersion.txt
Remove-PSSession $Session
This powershell will get the version of Exchange that your Office365 tenant is running on, and pipe it to a file in c:\temp\ExchangeVersion.txt.
If you set a scheduled task to run this nightly it will build up a history of the version numbers in the log file.
$user = "<Office 365 login>"
$password = convertto-securestring "<password>" -asplaintext -force
$cred = New-Object system.management.automation.pscredential $user,$password
Connect-MsolService -Credential $cred
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $Cred -Authentication Basic -AllowRedirection
Import-PSSession $Session
$name= Get-Date
$Name | out-file -append C:\temp\ExchangeVersion.txt
Get-mailbox -identity "<mailbox on Office365>" | Select ExchangeVersion | out-file -append C:\temp\ExchangeVersion.txt
$name= "=================================================="
$Name | out-file -append C:\temp\ExchangeVersion.txt
Remove-PSSession $Session
Comments
Post a Comment