Install-Microsoft365
Description
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
Usage
- Checks for elevated session privileges. If not elevated, it warns and exits.
- Sets up the environment.
- Checks if a custom XML configuration path is provided. If not, it creates a default configuration for Microsoft 365 Apps for Business installation.
- Downloads and extracts the Office Deployment Tool (ODT) in a dedicated ODT folder within the script's directory.
- Uses the ODT with the provided or default XML configuration to start the installation of Microsoft 365 Apps.
- Cleans up the ODT folder after the installation is complete. Optionally, restarts the computer if requested.
.\\Install-Microsoft365.ps1
Installs Microsoft 365 Apps for Business with default configuration.
.\\Install-Microsoft365.ps1 -XMLPath "C:\\Path\\To\\config.xml"
Installs Microsoft 365 using the specified local XML configuration file.
.\\Install-Microsoft365.ps1 -XMLPath "https://contoso.com/config.xml" -Restart
Installs Microsoft 365 using the specified XML configuration from a URL and restarts the computer after installation.
Parameters
Parameter | Alias | Required | Default | Type | Description |
---|---|---|---|---|---|
XMLPath | False | String | The URL/path to the XML config file | ||
Restart | False | $False | Switch | Restart after the install |
Output
- .\Install-Microsoft365-log.txt
- .\Install-Microsoft365-error.txt