Amazon Web Services offers two choices to run Microsoft Office productivity applications on Amazon WorkSpaces Family services. One option is to license Microsoft Office as part of a WorkSpaces application bundle. As of August 1, 2023, you have the option to bring Microsoft 365 Apps for enterprise licenses to use on Amazon WorkSpaces services. Microsoft 365 adds to the power of WorkSpaces services with popular office productivity applications like Microsoft Word, Microsoft Excel, Microsoft PowerPoint, Microsoft Outlook, and others. Included apps vary by Microsoft 365 license plan. Microsoft allows Microsoft 365 E3, E5, A3, A5, and Business Premium licenses to run on WorkSpaces services.
Customers often ask how to migrate their users from the license-included version of Office to Microsoft 365 licenses they already own. Previously, administrators had to remove application bundles through the WorkSpaces migration process, which creates a new root volume while keeping the user volume intact. That migration option is still available, but now customers can use the new manage applications feature to do the same. This blog guides you through removing Office from existing WorkSpaces bundle using the new APIs provided by the manage applications feature. You will also learn how to identify and remove Office license included from your WorkSpaces at scale, using either standalone PowerShell scripts or an AWS Lambda function.
This article assumes that you have the following in place:
In this step, you create an IAM policy for the administrator running the scripts. This provides permissions required to find WorkSpaces with the associated application, remove that application association, and deploy the change. AWS recommends that you review and vet the policy created in this step within your environment to verify it meets your security standards prior to deployment.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"workspaces:DescribeApplications",
"workspaces:DeployWorkspaceApplications",
"workspaces:DescribeWorkspaceAssociations",
"workspaces:AssociateWorkspaceApplication",
"workspaces:DisassociateWorkspaceApplication",
"workspaces:DescribeApplicationAssociations",
"workspaces:DescribeWorkspaces",
"workspaces:DescribeWorkspaceDirectories"
],
"Resource": "*"
}
]
}
Once you have met the prerequisites, proceed with running the scripts. In this step, WorkSpaces instances with Office installed are written to a CSV file. In this script, you supply the directoryId, region, and a path for the output file. That file is used in later steps.
.\Office-removal-Step-1.ps1
You can now remove any rows in the file output from step 2 that contain WorkSpaces instances that you do not want targeted for Office removal. This script loops through the WorkSpaces instances in the output file and issues the command to disassociate the Office application package from them.
.\Office-removal-Step-2.ps1
Once the applications are no longer associated with the WorkSpaces instances, you publish the changes. When this script runs, the WorkSpaces instances will reboot and begin the Office removal process. The user is logged out of their machine and the WorkSpace enters a maintenance mode, preventing reconnection until the process is complete.
.\Office-removal-Step-3.ps1
Alternatively, you can create a Lambda function scheduled to run during a time that does not impact users or is used as part of another automation workflow.
In this step, you create an IAM policy and role that the Lambda function will assume. This provides Lambda the permissions required to find WorkSpaces with associated applications, remove the application association, and deploy the change. The policy also contains the basic Lambda permissions required for logging. The policy created in this step should be viewed and vetted within your environment to verify it meets your security standards prior to deployment.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"workspaces:DescribeApplications",
"workspaces:DeployWorkspaceApplications",
"workspaces:DescribeWorkspaceAssociations",
"workspaces:AssociateWorkspaceApplication",
"workspaces:DisassociateWorkspaceApplication",
"workspaces:DescribeApplicationAssociations",
"workspaces:DescribeWorkspaces",
"workspaces:DescribeWorkspaceDirectories"
],
"Resource": "*"
},
{
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "arn:aws:logs:aws-region-code:account-id-without-hypens:*",
"Effect": "Allow"
}
]
}
In this step, you create the Lambda function that searches a specified directory for WorkSpaces instances with associated applications. The script then removes the application association and initiates the uninstallations on each WorkSpaces. It logs the results of its actions into Amazon CloudWatch for review.
You are now ready to run the Lambda function manually or using triggers such as Amazon EventBridge. The Lambda function can be utilized as part of a larger automation tool your company utilizes.
In this blog post, you created several components that may generate costs based on usage. To avoid incurring future charges, remove the following resources.
In this post, you learned about two options for automating the removal of Office-included bundles from Amazon WorkSpaces. With these methods, streamline the process of migrating to Microsoft 365 Apps for enterprises using licenses you already own. If you’d like to discuss how to optimize the procedure described in this blog for your specific use case, reach out to your account team.
![]() | Justin Grego is a Senior End User Computing Specialist Solutions Architect. As part of the EUC Service Aligned SA Team, he helps enable both customers and fellow SAs get up to speed on and be successful with new AWS EUC features and services. |
![]() | Dave Jaskie is a Senior End User Computing Specialist Solutions Architect. He brings 15 years of experience in the End User Computing space. Outside of Work, Dave enjoys traveling and hiking with his wife and 3 kids. |
Grazie del tuo interesse, se desideri rimanere aggiornato iscriviti alla nostra Newsletter !