MS Office Installation using powershell

Praveen siva 20 Reputation points
2024-04-10T05:39:05.5133333+00:00

Does Microsoft Office support silent installation using powershell? if YES, i have use this powershell script to install MSOFFICE, but it won't works. can someone please fix this.

$exePackageToInstall = "C:\Users\Administrator\Downloads\OfficeSetup.exe"

Start-Process -FilePath "$exePackageToInstall" -ArgumentList "/q" -NoNewWindow -Wait

Office
Office
A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
1,340 questions
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,016 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,128 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jing Zhou 2,550 Reputation points Microsoft Vendor
    2024-04-10T06:11:17.6666667+00:00

    Hello,

     

    Thank you for posting in Q&A forum.

    Yes, Microsoft Office supports silent installation using PowerShell. However, the script you provided seems incomplete and lacks the parameters required for silent installation.

    We suggest that you try the following modified example script to perform a silent installation:

     

    $exePackageToInstall = "C:\Users\Administrator\Downloads\OfficeSetup.exe"

    $arguments = "/configure C:\path\to\configuration.xml"

     

    Start-Process -FilePath $exePackageToInstall -ArgumentList $arguments -NoNewWindow -Wait

    In this script:

    Replace "C:\Users\Administrator\Downloads\OfficeSetup.exe" with the path to your Office installation file.

    Replace "C:\path\to\configuration.xml" with the path to the configuration XML file containing Office installation settings.

    Ensure that your configuration file contains the necessary settings for silent installation. Once the script has been adjusted and a valid configuration file has been provided, try running the script again to use PowerShell for silent installation of Microsoft Office. If it still doesn't work, please provide more details and I will continue to assist you.

    Hope this answer can help you well.

     

    Best regards,

    Jill Zhou

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. hossein jalilian 4,040 Reputation points
    2024-04-10T06:06:22.8+00:00

    Thanks for posting your question in the Microsoft Q&A forum.

    Yes, Microsoft Office supports silent installation via PowerShell. Your script is almost correct but can be improved. Here's a refined version:

    $exePackageToInstall = "C:\Users\Administrator\Downloads\OfficeSetup.exe"  
    
    $arguments = "/quiet" 
    
    Start-Process -FilePath $exePackageToInstall -ArgumentList $arguments -Wait 
    
    

    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful

    0 comments No comments