(60) Provisioning Package - Office 365
- Mr B SOE way
- May 3, 2023
- 1 min read
As part of a current project, a customer wants to have Office 365 provisioned and ready on the device before it is shipped out to the customer.
If you have issues with Windows Configuration Designer, you can refer to this: https://soeintunedevice.wixsite.com/home/post/48-windows-configuration-designer-unusable-icons-to-click
Instructions:
1. Create a folder named C:\O365
2. Download and run https://www.microsoft.com/en-us/download/details.aspx?id=49117
3. Extract the Office Deployment Tool to C:\O365 which has a number of XMLs
4. Edit the Configuration.xml file

5. Run Command Prompt as Administrator with:
CD C:\O365
setup.exe /download Configuration.xml

Which then provides the following:

6. Next zip up C:\O365

7. With your provisioning script, copy and paste this:
<# .Synopsis Office 365 installation script .DESCRIPTION Extract the ZIP and run the Office setup.exe with the configuration file as a parameter #> [CmdletBinding()] [Alias()] [OutputType([int])] Param ( [Parameter(Mandatory=$false, ValueFromPipelineByPropertyName=$true, Position=0)] $Log = "$env:windir\debug\Start-ProvisioningCommands.log" ) Begin { <# # Start logging #> Start-Transcript -Path $Log -Force -ErrorAction SilentlyContinue <# # Extract the ZIP #> $Archives = Get-ChildItem -Path $PSScriptRoot -Filter *.zip | Select-Object -Property FullName ForEach-Object -InputObject $Archives -Process { Expand-Archive -Path $_.FullName -DestinationPath "$env:TEMP" -Force } } Process { <# # Office 365 installation #> $WorkingDirectory = "$env:TEMP\O365" $Configuration = Get-ChildItem -Path $WorkingDirectory -Filter *.xml | Select-Object -Property FullName [XML]$XML = Get-Content -Path $Configuration.FullName $XML.Configuration.Add.SourcePath = $WorkingDirectory $XML.Save($Configuration.FullName) # Run Office 365 setup.exe Start-Process -FilePath "$WorkingDirectory\Setup.exe" -ArgumentList ('/Configure "{0}"' -f $Configuration.FullName) -WorkingDirectory $WorkingDirectory -Wait -WindowStyle Hidden # If you want to remove the extracted Office source, uncomment below # Remove-Item -Path $WorkingDirectory -Force } End { <# # Stop logging #> Stop-Transcript -ErrorAction SilentlyContinue } |
8. Next open up Windows Configuration Designer and navigate to [Runtime Settings] >[ProvisioningCommands] > [DeviceContext]
Under [CommandFiles] add "O365.zip" and "Start-ProvisioningCommands.ps1" files
Under [CommandLine], type the following command which will install silently Office:
PowerShell.exe –ExecutionPolicy Unrestricted .\Start-ProvisioningCommands.ps1

9. Next select Export and convert as a PPKG. Final results will be like this.

10. End result on the device, it will show like this.

Comentários