MS Office Installation using powershell

Praveen siva 45 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

Microsoft 365 and Office Install, redeem, activate For business Windows
Windows for business Windows Server User experience PowerShell
0 comments No comments
{count} votes

Accepted answer
  1. Jing Zhou 7,765 Reputation points Microsoft External Staff
    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

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. hossein jalilian 10,825 Reputation points Volunteer Moderator
    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

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.