Trying to update Office to acertain version

Rick Someone 411 Reputation points
2021-03-02T18:27:39.703+00:00

I'm using PS to generally say, this is my current version. What version do I have, and run the PS to upgrade Office until I get to that current version.

I was using variables

$UpdateToVersion="16.0.13127.xxxx"

$updateEXE="C:\path to OfficeC2Run.exe"

$Update arguments="/update user displaylevel=true"

$version=Get-WmiObject win32_product | where{$_.Name -like "Microsoft Office 365"} | Select-Object -ExpandProperty Version

while($version -lt $UpdateToVersion){

Start-Process $UpdateEXE $UpdateArguments

I've been reading that querying the win32_product is not the proper way to get a version. It completely locks up the pc.

Office Management
Office Management
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Management: The act or process of organizing, handling, directing or controlling something.
2,102 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
38,422 questions
{count} votes

6 answers

Sort by: Most helpful
  1. sj 0 Reputation points
    2023-05-18T19:34:28.9366667+00:00

    the output looks like this

    ComputerName :

    O365Channel :

    BaseURL :

    InstallID :

    O365Version : 16.0.11328.20368

    Channel : Semi-Annual Enterprise Channel

    ...i deleted values that appear to be null. you could use either that created as a function or the oneliner to determine the version if you think it may work for you.

    (Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration).VersionToReport

    cheers ;-)

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.