Home » Cloud » [solved] how to get/export AWS workspaces details using command line/PowerShell into Excel

[solved] how to get/export AWS workspaces details using command line/PowerShell into Excel

AWS workspaces is a desktop solution that is provided by AWS for serving users on demand desktop without the need of adding hardware to your environment on monthly or hourly cost.

It is fully managed solution by AWS, where Microsoft patches and other third part patches are also manged by AWS.

Most organizations will set this up using their on-premise Active Directory “AD Connector”, where the user database, you also have the option to use “Simple AD”. it is a service offered by AWS

Below are the Directory service options offered by AWS


Once the AWS workspaces have been setup and working, there is no easy way to get all the info using the AWS web console. see the screenshot below of the AWS workspace console with the info that it provides for a single workspace.

If you have hundreds of workspaces there is no easy way to export all the data using the AWS web console. below are the only options you get if you were select multiple workspaces which is 10 workspaces per page and there is no export option for exporting the details for all the workspaces.

The issue with this and that you can only do administrative tasks for multiple of only 10 workspaces, which is not feasible when you have workspaces that are in hundreds or even in thousands


In order to use PowerShell with AWS, you will first need to download the AWS PowerShell module. below is the link to the AWS instruction page for setting up the AWS PowerShell module for Windows


you can also run the following PowerShell commands to download, see the screenshot below for reference

Once you have gone thru link or use the PowerShell commands and downloaded the module, you now can proceed to setup the connection using access and secret key from you AWS account.

Login into the AWS console and go to the IAM services and then “Users” in he left pane

Once you have picked the user that you want. clicking the user takes you to the above screen where in the “Security credentials” you have the option to create or use the keys. click on the “Create access key” to create a new key. once the keys are generated then you also have the option to download the file or can also copy the keys.

Launch PowerShell and enter the following Command to connect to your AWS account using access keys.

Once you are connected using PowerShell, now you can run the workspace commands to get all the details and export them to Excel.

Below is the exported excel file with the details. this simple command can export all the workspaces in your AWS account can save you lot of time.

Thanks for reading this and it has helped me so much and I am hoping, it will help others.



Leave a Reply

Your email address will not be published. Required fields are marked *