Use RegisterWorkspaceDirectory with an AWS SDK or CLI - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Use RegisterWorkspaceDirectory with an AWS SDK or CLI

The following code examples show how to use RegisterWorkspaceDirectory.

CLI
AWS CLI

To register a directory

The following register-workspace-directory example registers the specified directory for use with Amazon WorkSpaces.

aws workspaces register-workspace-directory \ --directory-id d-926722edaf \ --no-enable-work-docs

This command produces no output.

For more information, see Register a directory with WorkSpaces in the Amazon WorkSpaces Administration Guide.

PowerShell
Tools for PowerShell

Example 1: This sample registers the specified directory for Workspaces Service

Register-WKSWorkspaceDirectory -DirectoryId d-123412a123 -EnableWorkDoc $false