Use RegisterWorkspaceDirectory with a CLI - AWS SDK Code Examples

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

Use RegisterWorkspaceDirectory with a 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

This command produces no output.

For more information, see Register an existing AWS Directory Service directory with WorkSpaces Personal in the Amazon WorkSpaces Administration Guide.

PowerShell
Tools for PowerShell V4

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

Register-WKSWorkspaceDirectory -DirectoryId d-123412a123 -EnableWorkDoc $false
Tools for PowerShell V5

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

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