Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

SWM - Software Install - Install-Microsoft365

Overview

This guide enables the installation of Microsoft 365 Apps for Business or any Microsoft 365 product with XML configuration support.

Requirements

  • PowerShell 5+
  • Windows 10+ / Server 2016+
  • Must be run as an Administrator

Process

  1. Checks for elevated session privileges. If not elevated, it warns and exits.
  2. Sets up the environment.
  3. Checks if a custom XML configuration path is provided. If not, it creates a default configuration for Microsoft 365 Apps for Business installation.
  4. Downloads and extracts the Office Deployment Tool (ODT) in a dedicated ODT folder within the script's directory.
  5. Uses the ODT with the provided or default XML configuration to start the installation of Microsoft 365 Apps.
  6. Cleans up the ODT folder after the installation is complete. Optionally, it restarts the computer if requested.

Payload Usage

Example:

PS C:/> Install-Microsoft365.ps1 
# Installs Microsoft 365 Apps for Business with default configuration.

PS C:/> Install-Microsoft365.ps1 -XMLPath "C:/Path/To/config.xml"
# Installs Microsoft 365 using the specified local XML configuration file.

PS C:/> Install-Microsoft365.ps1 -XMLPath "https://contoso.com/config.xml" -Restart
# Installs Microsoft 365 using the specified XML configuration file and restarts the computer.

Parameters

ParameterAliasRequiredDefaultTypeDescription
-XMLPathFalseStringThe URL/path to the XML config file
-RestartFalse$FalseSwitchRestart after the installation

Output

./Install-Microsoft365-log.txt
./Install-Microsoft365-error.txt