PowerShell Script to Capture Office 365 Build to Version Mappings
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
O365VersionToBuildMap.ps1
README.md

README.md

O365VersionToBuildMap

PowerShell Script to Capture Office 365 Build to Version Mappings.

Get-Office365BuildToVersionMap

The purpose of this function is to go to the Microsoft support sites and download the Version and Build information. It will then map it into an array that can be referenced for other things or exported to a CSV.

Example Function Calls for Get-Office365BuildToVersionMap

# Get Map and then Export to Screen.
Get-Office365BuildToVersionMap | Sort-Object versionNumber

# Get Map and then Export to CSV.
Get-Office365BuildToVersionMap | Export-CSV $env:temp\Office365BuildToVersionMap.csv -NoTypeInformation

Sample Output:

BuildNumber VersionNumber
1802 16.0.9029.2253
1803 16.0.9126.2072
1803 16.0.9126.2098
1803 16.0.9126.2116
1803 16.0.9126.2152
... ...
1806 16.0.10228.20080
1806 16.0.10228.20104

Get-OfficeBuildListToCase

The purpose of this function is to use the build list generated by Get-Office365BuildToVersionMap and to generate SQL Case Statements for Configuration Manager (SCCM) SQL reporting or adhoc queries.

Example Function Calls for Get-OfficeBuildListToCase

# Generate SQL case statements
Export-OfficeBuildListToCase -officeBuildList $(Get-Office365BuildToVersionMap) | Out-File $env:temp\O365CaseStatements.txt

Sample Output (abbreviated):

case when v_GS_OFFICE365PROPLUSCONFIGURATIONS.VersionToReport0 = '16.0.4229.1024' then '1509'
when v_GS_OFFICE365PROPLUSCONFIGURATIONS.VersionToReport0 = '16.0.4229.1029' then '1509'
when v_GS_OFFICE365PROPLUSCONFIGURATIONS.VersionToReport0 = '16.0.6001.1034' then '1509'
when v_GS_OFFICE365PROPLUSCONFIGURATIONS.VersionToReport0 = '16.0.6001.1038' then '1509'
...
...
...
when v_GS_OFFICE365PROPLUSCONFIGURATIONS.VersionToReport0 = '16.0.9330.2087' then '1805'
when v_GS_OFFICE365PROPLUSCONFIGURATIONS.VersionToReport0 = '16.0.9330.2118' then '1805'
when v_GS_OFFICE365PROPLUSCONFIGURATIONS.VersionToReport0 = '16.0.9330.2124' then '1805'
when v_GS_OFFICE365PROPLUSCONFIGURATIONS.VersionToReport0 = '16.0.10228.20080' then '1806'
when v_GS_OFFICE365PROPLUSCONFIGURATIONS.VersionToReport0 = '16.0.10228.20104' then '1806'
else 'Unknown' end as Office365Build

Get-OfficeBuildListToSQLTable

The purpose of this function is to use the build list generated by Get-Office365BuildToVersionMap and to generate drop, create, and insert statements to build a mapping table that you can link to Configuration Manager (SCCM) for reporting or adhoc queries.

Example Function Calls for Get-OfficeBuildListToSQLTable

$sql = Get-OfficeBuildListToSQLTable -officeBuildList $(Get-Office365BuildToVersionMap) | Out-File $env:temp\O365SQL.txt

Sample Output (abbreviated):

IF OBJECT_ID('O365BuildToVersionMap', 'U') IS NOT NULL DROP TABLE O365BuildToVersionMap;
IF OBJECT_ID('O365BuildToVersionMap', 'U') IS NULL CREATE TABLE O365BuildToVersionMap (VersionNumber VARCHAR(32) NOT NULL, BuildNumber VARCHAR(8) NOT NULL, CONSTRAINT PK_O365Version PRIMARY KEY (VersionNumber));
INSERT INTO O365BuildToVersionMap (VersionNumber, BuildNumber) VALUES ('16.0.4229.1024','1509');
INSERT INTO O365BuildToVersionMap (VersionNumber, BuildNumber) VALUES ('16.0.4229.1029','1509');
...
...
...
INSERT INTO O365BuildToVersionMap (VersionNumber, BuildNumber) VALUES ('16.0.9330.2124','1805');
INSERT INTO O365BuildToVersionMap (VersionNumber, BuildNumber) VALUES ('16.0.10228.20080','1806');
INSERT INTO O365BuildToVersionMap (VersionNumber, BuildNumber) VALUES ('16.0.10228.20104','1806');