Get Office Version
Purpose
The purpose of this solution is to audit the MS Office Version installed on the windows machine and store the details in custom fields.
Associated Content
| Content | Type | Function |
|---|---|---|
| Get Office Version | Script | This script will check for the MS Office Version installed on the windows machine and updates the custom field. |
| cPVAL Office Version | Custom Field | Stores the Office version installed on the machine fetched by Get Office Version script. |
| cPVAL Office Bitness | Custom Field | Stores the Office bitness on the machine fetched by Get Office Version script. |
| cPVAL Office Edition | Custom Field | Stores the Office Edition on the machine fetched by Get Office Version script. |
| cPVAL Office Install Type | Custom Field | Stores the Office install Type on the machine fetched by Get Office Version script. |
| cPVAL M365 Apps Installed | Custom Field | Stores the Office m365 application information on the machine fetched by Get Office Version script. |
| cPVAL Windows Office Version | Group | This device group displays an audit of Office versions when the following custom fields are populated: cPVAL Office Bitness, cPVAL Office Install Type, cPVAL Office Edition, cPVAL Office Version, and cPVAL M365 Apps Installed. |
| Check Office Version | Task | This task is used to run the automation on weekly basis. |
Implementation
- Create the Get Office Version using the implementation instruction provided in the document.
- Create the following custom fields using the implementation instruction provided in their documents:
- Create the group cPVAL Windows Office Version using the implementation instruction provided in the document.
- Schedule the task Check Office Version
FAQ
Q1: What does this script detect?
Ans: This script detects the installed Microsoft Office version on a Windows machine,
including edition (MSI or Click-to-Run), bitness (32-bit or 64-bit), install type
(Full, Language Pack, Partial, or Full + Language Pack), and whether Microsoft 365
Apps are installed.
Q2: Does it support Microsoft 365 detection?
Ans: Yes, the script accurately detects Microsoft 365 Apps using Click-to-Run (C2R)
registry information and ProductReleaseIds. It also sets a dedicated M365 Apps Installed field to Yes or No, which is useful for identifying machines that already
have Microsoft 365 Apps present alongside an older MSI Office installation.
Q3: What happens if Office is not detected?
Ans: If Office is not detected, all five custom fields (Office Version, Office Edition,
Office Bitness, Office Install Type, and M365 Apps Installed) are set to undetermined
to ensure consistent output.
Q4: Does the script support both MSI and Click-to-Run installations?
Ans: Yes, the script primarily uses Click-to-Run registry detection and falls back to
ASSOC/FTYPE methods for MSI-based installations.
Q5: How does the script identify Language Packs vs full installations?
Ans: The script parses the ProductReleaseIds registry value to classify the install
as Full, LanguagePack, Partial (listing the individual apps found e.g. Word, Excel),
or Full + LanguagePack where both are present.
Q6: Can the script detect Microsoft 365 Apps on a machine that also has an older MSI Office version installed?
Ans: Yes, the Check-M365AppsInstalled function handles mixed environments by checking
both the Click-to-Run registry key and the Windows uninstall registry entries
independently of the primary Office detection path.
Changelog
2026-05-27
- Added two new custom fields:
cPVAL Office Install TypeandcPVAL M365 Apps Installed. - Added
Resolve-InstallTypefunction to detect whether an Office installation is a Full suite, Language Pack only, Partial (individual apps e.g. Word, Excel), or a combination of Full + Language Pack by parsing theProductReleaseIdsregistry value. - Added
Check-M365AppsInstalledfunction to detect Microsoft 365 Apps in mixed environments where an older MSI Office version and M365 Apps may both be present, checking both the C2R registry key and Windows uninstall registry entries. - Script now updates two more custom fields:
cPVAL Office Install Type, andcPVAL M365 Apps Installed. - Fixed variable scoping issues by using $script: for all in-function assignments.
2026-05-12
- Added two new custom fields:
Office Edition, andOffice Bitness - Enhanced
Get Office Versionscript to improve Click-to-Run (C2R) version identification using ProductReleaseIds and CDN channel mapping. - Added accurate detection for Microsoft 365 Apps, Office 2016, 2019, 2021, and 2024 along with improved Office bitness detection (32-bit / 64-bit).
- Retained MSI fallback detection using ASSOC/FTYPE and updated Ninja custom field handling with undetermined fallback values for reliability.
- Script now updates three separate custom fields for Office Version, Office Edition, and Office Bitness seperately.
2025-12-12
- Initial version of the document