Skip to main content
Version: Archive

DxCLI Admin Guide

Introduction

This document contains the list of DxCLI commands used for DxEnterprise administration.

Commands

activate-server

Description

Activates the server via internet using the provided license key. See get-license-request for offline node activation.

Syntax

dxcli activate-server <license_key> [node_name][,...]

Parameters

NameDescriptionTypeRequired
license_keyThe license key.StringTrue
node_nameThe name of the node. Leaving this parameter blank will activate the current node.StringFalse
,...Comma-delimited list of node names for multiple activations.False

Examples

Activate the current node
dxcli activate-server AAAA-BBBB-CCCC-DDDD
Activate multiple nodes
dxcli activate-server AAAA-BBBB-CCCC-DDDD node1,node2,node4

add-addressfilter

Description

Adds an address filter for accepting or denying connections from specific IP addresses or subnets.

Syntax

dxcli add-addressfilter <filter_name> <address>,<action>[|...] <default_action>

Parameters

NameDescriptionTypeRequired
filter_nameThe name of the filter.StringTrue
addressThe IP address or subnet.StringTrue
actionWhether or not to accept or deny the IP address or subnet. Must be accept or deny.StringTrue
|...Pipe-delimited list of additional address filters.False
default_actionSets the default action for the address filter to accept all or deny all connections outside of the specified IP or subnet from the previous parameter. Must be accept or deny.StringTrue

Example

dxcli add-addressfilter filter1 "10.1.1.0,accept|10.1.2.0,accept" deny

add-ags

Description

Adds an availability group to a Vhost. The third positional parameter is a pipe-delimited list of configuration settings for the availability group, and can be repeated for each member being added to the AG. The third positional parameter must be passed in as a single quoted string.

Syntax

dxcli add-ags <vhost_name> <ags_name> <node_name|instance_name|sql_login|sql_pass|mirror_port|availability_mode|[tunnel_port]> [...]

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
ags_nameThe name of the availability group.StringTrue
node_nameThe name of the node.StringTrue
instance_nameThe name of the instance.StringTrue
sql_loginThe user name used to login to SQL Server. The SQL Server login can be any SQL login or Windows domain accounts that has been assigned the sysadmin role for the instance being managed. When supplying a domain account, the username needs to follow the UPN format (for example: user@domain.com). If sql_login is left blank, DxEnterprise will use the the underlying HA instance credentials for an exVhost AGS, or the LocalSystem account for regular AGS on Windows.StringTrue
sql_passThe password used to login to SQL Server. If no HA instance is configured or the AG credentials are different than those used by the underlying HA instance, provide the password used to login (encrypted using dxcli encrypt-text). Leave blank if utilizing credentials from the underlying HA instance.StringTrue
mirror_portThe mirroring port to use for the availability group (default is 5022).IntTrue
availability_modeSynchronous_commit, asynchronous_commit or configuration_only.StringTrue
tunnel_portThe port to be used for tunnel connections (for cross-site, cross-domain replication).IntFalse
...The third positional parameter can be repeated to add multiple cluster members to the availability group.False

Examples

No tunnel and no credentials
dxcli add-ags vhost1 ags1 "node1|MSSQLSERVER|||5022|SYNCHRONOUS_COMMIT" "node2|MSSQLSERVER|||5022|SYNCHRONOUS_COMMIT"
Tunnel and credentials
dxcli add-ags vhost1 ags1 "node1|MSSQLSERVER|SA|6pnFaDrRS+W/F+dkRuPKAA==|5022|SYNCHRONOUS_COMMIT|50221" "node2|MSSQLSERVER|SA|6pnFaDrRS+W/F+dkRuPKAA==|5022|SYNCHRONOUS_COMMIT|50222"

add-ags-databases

Description

Adds one or more databases to an availability group.

Syntax

dxcli add-ags-databases <vhost_name> <ags_name> <db_name>[,...]

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
ags_nameThe name of the availability group.StringTrue
db_nameThe name of the database.StringTrue
,...Comma-delimited list of additional databases.False

Example

dxcli add-ags-databases vhost1 ags1 db1,db2,db3

add-ags-listener

Description

Adds a listener to an availability group.

Syntax

dxcli add-ags-listener <vhost_name> <ags_name> <listener_port>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
ags_nameThe name of the availability group.StringTrue
listener_portThe port number for the listener.IntTrue

Example

dxcli add-ags-listener vhost1 ags1 55001

add-ags-node

Description

Adds a single node into a Vhost that has an availability group.

Syntax

dxcli add-ags-node <vhost_name> <ags_name> <node_name|instance_name|sql_login|sql_pass|mirror_port|availability_mode|[tunnel_port]>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
ags_nameThe name of the availability group.StringTrue
node_nameThe name of the node.StringTrue
instance_nameThe name of the instance.StringTrue
sql_loginThe user name used to login to SQL Server. The SQL Server login can be any SQL login or Windows domain accounts that has been assigned the sysadmin role for the instance being managed. When supplying a domain account, the username needs to follow the UPN format (for example: user@domain.com). Leave blank to use credentials from the underlying HA instance.StringTrue
sql_passThe password used to login to SQL Server. If no HA instance is configured or the AG credentials are different than those used by the underlying HA instance, provide the password used to login (encrypted using dxcli encrypt-text). If sql_login is left blank, DxEnterprise will use the the underlying HA instance credentials for an exVhost AGS, or the LocalSystem account for regular AGS on Windows.StringTrue
mirror_portThe mirroring port to use for the availability group (default is 5022).IntTrue
availability_modeSynchronous_commit, asynchronous_commit or configuration_only.StringTrue
tunnel_portThe port to be used for tunnel connections (for cross-site, cross-domain replication).IntFalse

Example

dxcli add-ags-node vhost1 ags1 "node1|MSSQLSERVER|SA|6pnFaDrRS+W/F+dkRuPKAA==|5022|SYNCHRONOUS_COMMIT"

add-client

Description

Adds a DxConnect client to the cluster.

Syntax

add-client <client_name> <client_password> [client_description] [max_session_count] [group_name]

Parameters

NameDescriptionTypeRequired
client_nameThe name of the client.StringTrue
client_passwordThe password for the client.StringTrue
client_desciptionThe description for the client.StringFalse
max_session_countThe maximum number of active sessions for the client.IntFalse
group_nameThe name of the client group to add the client to.StringFalse

Example

dxcli add-client client1 passw0rd "Accounting admins" 25 group1

add-client-group

Description

Adds a client group consisting of one or more clients.

Syntax

dxcli add-client-group <group_name> [client_name][,...] [group_description]

Parameters

NameDescriptionTypeRequired
group_nameThe name of the group.StringTrue
client_nameThe name of the client to add to the client group. Running the command without a client will create an empty client group.StringFalse
,...Comma-delimited list of additional clients to add to the client group.False
group_descriptionThe description for the group.StringFalse

Example

dxcli add-client-group group1 client1,client2,client3

add-contact

Description

Adds contact to Contact Address Book.

Syntax

dxcli add-contact <username> <email>

Parameters

NameDescriptionTypeRequired
usernameThe name of the user.StringTrue
emailThe email address of the user.StringTrue

Example

dxcli add-contact user1 user1@mail.com

add-disk

Description

Adds a disk to DxEnterprise management.

Syntax

dxcli add-disk <disk_id> [disk_label]

Parameters

NameDescriptionTypeRequired
disk_idThe ID of the disk. Run dxcli get-disks to find the disk ID.StringTrue
disk_labelThe label for the disk.StringFalse

Example

dxcli add-disk 50842140-be32-d3a7-45d4-3999bf3ad3a8 "Disk 1"

add-docker

Description

Adds a Docker container the Vhost.

Syntax

dxcli add-docker <vhost_name> <container_name> [docker_param] [...] <image_name>

info

When passing docker run parameters through dxcli, the parameters need to be formatted. This formatting follows the pattern:

<option>|<value>|<encryption>

The <option> is a parameter given in docker run --help, or also on Docker's website. For instance, use -p to map ports to the host, or -v to mount volumes.

The <value> is the value for the Docker parameter. Using the above example, -p would now look like -p|11433:1433.

The <encryption> is a bool that specifies whether the <value> should be stored encrypted or unencrypted in DxEnterprise's configuration files. Sensitive information such as passwords and usernames can be encrypted using dxcli encrypt-text. Note that the entire value must be encrypted (i.e, dxcli encrypt-text SA_PASSWORD=PassW0rd).

DxEnterprise decrypts these values before passing them into the container. These values are still visible in plain text when inspecting the container using docker inspect. For example, the final string for a port mapping might look like -p|11433:1433|false

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
container_nameThe name of the container.StringTrue
docker_paramA docker run parameter. For more information, view Docker documentation.StringFalse
...Additional docker run parameters.False
image_nameThe name of the image.StringTrue

Example

dxcli add-docker vhost1 centos1 "-p|11433:1433|false" "-e"-image|mcr.microsoft.com/mssql/server:2019-latest"

add-instance

Description

Adds a SQL instance to a Vhost.

Syntax

add-instance <vhost_name>\<instance_name> <instance_port> <sql_data_path> <sql_log_path> [sql_login] [sql_pass] [keep]

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
instance_nameThe name of the SQL instance.StringTrue
instance_portThe port to be used for the instance.IntTrue
sql_data_pathThe path for the SQL data.StringTrue
sql_log_pathThe path for the SQL logs.StringTrue
sql_loginThe user name used to login to SQL Server. The SQL Server login can be any SQL login or Windows domain accounts that has been assigned the sysadmin role for the instance being managed. When supplying a domain account, the username needs to follow the UPN format (for example: user@domain.com). DxEnterprise will use the LocalSystem account if sql_login is left blank for Windows instances only.StringFalse
sql_passThe password used to login to SQL Server (encrypted using dxcli encrypt-text).StringFalse
keepSpecify this parameter to keep the current SQL data.SwitchFalse

Example

dxcli add-instance vhost1\instance1 30002 C:\mount1\data C:\mount1\logs sa p@ssw0rd

add-node

Description

Adds a node to a Vhost.

Syntax

dxcli add-node <vhost_name> <node_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
node_nameThe name of the node.StringTrue

Example

dxcli add-node vhost1 node1

add-policy

Description

Add a policy to a cluster resource. See the boxes below for constraints on each policy type.

This cmdlet defines a SYSTEM/PERF/ALLOC/FILTER policy.

Policy Types
SYSTEM

The SYSTEM policy sends alerts when a node is down.

This policy type can only be attached to ObjectName "node" and CounterName "system-down".

PERF

The PERF policy send alerts when a performance threshold is reached.

This policy type can be attached to:

ObjectName

  • node
  • instance
  • service
  • Docker

CounterName

  • processor-consumption
  • system-free-memory
  • system-networking
  • system-disk-io
  • docker-processor
  • docker-working-set
  • docker-networking
  • docker-disk-io
  • instance-processor
  • instance-working-set
  • instance-networking
  • instance-disk-io
  • service-processor
  • service-working-set
  • service-networking
  • service-disk-io
ALLOC

The ALLOC policy sends alerts when an allocation threshold is reached.

This policy type can be attached to:

ObjectName

  • node
  • instance
  • service
  • Docker.

CounterName

  • alloc-docker-processor
  • alloc-docker-memory
  • alloc-docker-disk
  • alloc-docker-network
  • alloc-instance-processor
  • alloc-instance-memory
  • alloc-instance-disk
  • alloc-instance-network
  • alloc-node-processor
  • alloc-node-memory
  • alloc-node-disk
  • alloc-node-network
  • alloc-service-processor
  • alloc-service-memory
  • alloc-service-disk
  • alloc-service-network
FILTER

Global filter alert type policy.

This policy type can be attached to ObjectName:

  • node
  • instance
  • service
  • Vhost
  • AGS
  • Docker

Syntax

add-policy <policy> <GUID> [description] <counter> <object> <threshold> <email> <script_path> <priority> [filter_options]

Parameters

NameDescriptionTypeRequired
policyThe type of policy to use. Can be SYSTEM, PERF, ALLOC, or FILTER.StringTrue
GUIDThe globally unique identifier (GUID) of the policy.StringFalse
descriptionA description for the policy.StringFalse
counterThe performance counter, or type of resource, to be monitored (e.g. System-Disk-Io, System-Down, System-Free-Memory, System-Networking).StringTrue
objectThe node, instance, service, Vhost, or Docker to attach the policy to.StringTrue
thresholdWhen to invoke alert i.e. 99 (where resource hits 99%).IntTrue
emailThe email address to send the alert to.StringTrue
script_pathThe full path to the script to invoke.StringTrue
priorityThe priority level 0-5.IntTrue
filter_optionsEnables the policy when set to true.StringFalse

Example

dxcli add-policy PERF "f7d70673-dde1-4b71-84a7-ae7324e4ace4" "test" System-Disk-Io  "node1" "99" "user1@email.com" "c:\scripts\script.ps1" 0 true

add-service

Description

Add a service to a Vhost.

Syntax

dxcli add-service <vhost_name> <service_name> [description] [assume_vhost_name]

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
service_nameThe name of the service.StringTrue
descriptionThe description for the service.StringFalse
assume_vhost_nameWhether or not to run the service under the Vhost name.BoolFalse

Example

dxcli add-service vhost1 spooler

add-service-registry

Description

Add registry management to a virtualized service.

Syntax

dxcli add-service-registry <vhost_name> <service_name> <reg_key> <reg_path>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
service_nameThe name of the service.StringTrue
reg_keyThe full path to the registry key.StringTrue
reg_pathThe full path of where the service reg_key is backed up. It is recommended to put this on a shared volume for the Vhost.StringTrue

Example

dxcli add-service-registry vhost1 service1 HKLM\Software\service1 c:\mounts\volume1\service1

add-share

Description

Add a file share to a Vhost.

Syntax

dxcli add-share <vhost_name> <share_name>=<share_path> [/remarks:"text"] [/unlimited|/users:number] [/cache:<mode>] [/grant:<user>,<READ|CHANGE|FULL>] [...]

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
share_nameThe name of the file share.StringTrue
share_pathThe full path to the shared folder.StringTrue
/remarks:"text"The description for the file share.StringFalse
/unlimited|/users:numberThe number of users to allow.StringFalse
/cache:modeSets the caching options. Can be Manual, Documents, Programs, BranchCache, or None.StringFalse
/grant:user,READ|CHANGE|FULLGrants the user privileges.StringFalse
...Repeat the /grant:user parameter for each user that requires a grant. Default is READ if no grant is specified for the user.StringFalse

Example

dxcli add-share vhost1 "share1=c:\mount1\share1" /remarks:"This is share1" /unlimited /cache:none /grant:everyone,read /grant:user1,full

add-smtp

Description

Add SMTP server configuration.

Syntax

dxcli add-smtp <server_name> <server_port> <email_address> <password> <protocol> <user_name>

Parameters

NameDescriptionTypeRequired
server_nameThe name or IP address of the server. TLS protocol must provide the server name that is on the certificate.StringTrue
server_portThe port for the server.IntTrue
email_addressThe user email address.StringTrue
passwordThe user password.StringTrue
protocolWhich email protocol to use. Acceptable values are NONE, TLS, and SSL.StringTrue
user_nameThe name of the user.StringTrue

Example

dxcli add-smtp server.mail.com user1@mail.com p@ssw0rd 555 TLS user1

add-tunnel

Description

Add a tunnel to the cluster.

Syntax

dxcli add-tunnel <tunnel_name> <enabled> <destination_node_name> <target_address>:<target_port> <origin_node>,<origin_address>:<origin_port>[/address_filter][|...] [vhost_name]

Parameters

NameDescriptionTypeRequired
tunnel_nameThe name of the tunnel.StringTrue
enabledEnable the tunnel.BoolTrue
destination_node_nameThe name of the destination node.StringTrue
target_addressThe target IP address or hostname of the tunnel destination.StringTrue
target_portThe port number for the target.IntTrue
origin_nodeThe name of the origin node. This is the node where the tunnel listener will be active.StringTrue
origin_addressThe IP address the origin will bind to. Can be set to 0.0.0.0 to allow connections from any IP address with network access, or 127.0.0.1 to only allow connections from the node itself.StringTrue
origin_portThe port number for the origin address.IntTrue
address_filterThe name of the address filter to associate with the tunnel. See dxcli add-addressfilter for more information.StringFalse
|...Pipe-delimited list of additional origins.False
vhost_nameThe name of the Vhost to associate with the tunnel.StringFalse

Example

dxcli add-tunnel tunnel1 true node1 10.1.200.62:30004 "node2,0.0.0.0:30004/FILTER1|node3,127.0.0.1:30004/FILTER2" VHOST1

add-witness

Description

Add a network fileshare witness.

LEGACY

This command has been superseded by dxcli set-witness. Do not use this command for Azure Blob Storage.

Syntax

dxcli add-witness <share_path>[,...] <username> <password>

Parameters

NameDescriptionTypeRequired
share_pathThe UNC path of the network share.StringTrue
,...Comma-delimited list of additional UNC paths.False
usernameThe name of the user.StringTrue
passwordThe password of the user (recommended to encrypt using dxcli encrypt-text).StringTrue

Examples

Add a Single Witness
dxcli add-witness "\\server1\myshare1" "user1" "6pnFaDrRS+W/F+dkRuPKAA=="
Add Multiple Witnesses
dxcli add-witness "\\server1\myshare1,\\server2\myshare2" "user1" "6pnFaDrRS+W/F+dkRuPKAA=="
Add an Azure File Share
dxcli add-witness "\\mystorage.file.core.windows.net\azshare1" "mystorage" "/nbFVz1fOKH7b0RaY/5Ms8uytbY99PZsspZkcHvNtVRj//pUk4jUPV7owaUSuDd6eExv96sBvkCXsleATEsT33=="

attach-ags

Description

Attach an existing availability group to a Vhost. Make sure the existing primary node for the AG is also the current primary node for the Vhost.

Syntax

dxcli attach-ags <vhost_name> <ags_name> <node_name|instance_name|sql_login|sql_pass|mirror_port|availability_mode|> <...>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
ags_nameThe name of the availability group.StringTrue
node_nameThe name of the node.StringTrue
instance_nameThe name of the instance.StringTrue
sql_loginThe user name used to login to SQL Server. The SQL Server login can be any SQL login or Windows domain accounts that has been assigned the sysadmin role for the instance being managed. When supplying a domain account, the username needs to follow the UPN format (for example: user@domain.com).StringTrue
sql_passThe password used to login to SQL Server (encrypted using dxcli encrypt-text).StringTrue
mirror_portThe mirroring port to use for the availability group (default is 5022).IntTrue
availability_modeSynchronous_commit, asynchronous_commit or configuration_only.StringTrue
...Repeat third positional parameter set to add the other availability group members to the Vhost.True

Example

dxcli attach-ags vhost1 ags1 "node1|MSSQLSERVER|SA|6pnFaDrRS+W/F+dkRuPKAA==|5022|SYNCHRONOUS_COMMIT" "node2|MSSQLSERVER|SA|6pnFaDrRS+W/F+dkRuPKAA==|5022|SYNCHRONOUS_COMMIT"

clean-disk

Description

Cleans the disk of all partitions, volumes, and any hidden sector information.

danger

All volumes and data will be destroyed by running this command.

Syntax

dxcli clean-disk <disk_id>

Parameters

NameDescriptionTypeRequired
disk_idThe ID of the disk. Run dxcli get-disks to find the disk ID.StringTrue

Example

dxcli clean-disk 9b85d24a-5c5a-136d-e3ba-7ffd9584feaf

clear-otpk

Description

Clears and invalidates any generated One-Time PassKey for the cluster.

Syntax

dxcli clear-otpk

Parameters

None

Example

dxcli clear-otpk

clear-reservation

Description

This command removes all SCSI-3 persistent reservations on the selected disk(s).

Clearing the reservation on a disk can cause data corruption if the disk is accessible to nodes outside of the cluster.

Syntax

dxcli clear-reservation <disk_id>

Parameters

NameDescriptionTypeRequired
disk_idThe ID of the disk. Run dxcli get-disks to find the disk ID.StringTrue

Example

dxcli clear-reservation 9b85d24a-5c5a-136d-e3ba-7ffd9584feaf

cluster-add-vhost

Description

Adds a virtual host (Vhost) or extended virtual host (exVhost) to the cluster.

Syntax

dxcli cluster-add-vhost <vhost_name> <virtual_ip>[,...] <member_name>[,...] [autofailback] [priority[1-5]] [ilb_port][,...]

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of Vhost or exVhost.StringTrue
virtual_ipThe virtual IP for the Vhost.StringTrue
,...Comma-delimited list of additional virtual IPs for the Vhost.False
member_nameThe name of the node or Vhost to add to the Vhost/exVhost.StringTrue
,...Comma-delimited list of additional nodes or Vhosts to add to the Vhost or exVhost.False
autofailbackEnables autofailback behavior. Leave blank to keep autofailback disabled.SwitchFalse
priorityThe priority order of failover between Vhosts (1 is the highest and 5 is the lowest).IntFalse
ilb_portThe port to use for internal load balancer probing.IntFalse
,...Comma-delimited list of additional ports to use for internal load balancer probing.False

Examples

Standard Vhost
dxcli cluster-add-vhost vhost1 10.1.200.10,10.2.100.5 node1,node2,node3
Extended Vhost (exVhost)
dxcli cluster-add-vhost exvhost1 10.1.200.10,10.2.100.5 VHOST:vhost1,VHOST:vhost2,VHOST:vhost3
Optional Parameters
dxcli cluster-add-vhost vhost1 10.1.200.10,10.2.100.5 node1,node2,node3 autofailback 2 40001

cluster-disable-node

Description

Disables the specified node.

Syntax

dxcli cluster-disable-node <node_name>

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringTrue

Example

dxcli cluster-disable-node node1

cluster-enable-node

Description

Enables the specified node.

Syntax

dxcli cluster-enable-node <node_name>

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringTrue

Example

dxcli cluster-enable-node node1

cluster-get-docker-images

Description

Returns a list of docker images.

Syntax

dxcli cluster-get-docker-images

Parameters

None

Example

dxcli cluster-get-docker-images

cluster-get-features

Description

Returns all cluster members’ enabled features on a per-node basis, in XML.

Syntax

dxcli cluster-get-features

Parameters

None

Example

dxcli cluster-get-features

cluster-get-licenses

Description

Returns a list of licenses.

Syntax

dxcli cluster-get-licenses

Parameters

None

Example

dxcli cluster-get-licenses

cluster-get-sql-instances

Description

Returns a list of SQL instances.

Syntax

dxcli cluster-get-sql-instances

Parameters

None

Example

dxcli cluster-get-sql-instances

cluster-rehost-docker

Description

Moves a docker instance from one Vhost to another Vhost.

Syntax

dxcli cluster-rehost-docker <source_vhost>\<source_docker> <target_vhost>\<target_docker>

Parameters

NameDescriptionTypeRequired
source_vhostThe name of the source Vhost.StringTrue
source_dockerThe name of the source docker.StringTrue
target_vhostThe name of the target Vhost.StringTrue
target_dockerThe name of the target docker.StringTrue

Example

dxcli cluster-rehost-docker vhost1\mydocker vhost2\mydocker

cluster-rehost-instance

Description

Moves an instance from one Vhost to another Vhost.

Syntax

cluster-rehost-instance <source_vhost>\<source_instance> <target_vhost>\<target_instance>

Parameters

NameDescriptionTypeRequired
source_vhostThe name of the source Vhost.StringTrue
source_instanceThe name of the source instance.StringTrue
target_vhostThe name of the target Vhost.StringTrue
target_instanceThe name of the target instance.StringTrue

Example

dxcli cluster-rehost-instance vhost1\instance1 vhost2\instance1

cluster-rehost-service

Description

Moves a service from one Vhost to another Vhost.

Syntax

cluster-rehost-service <source_vhost>\<source_service> <target_vhost>\<target_service>

Parameters

NameDescriptionTypeRequired
source_vhostThe name of the source Vhost.StringTrue
source_serviceThe name of the source service.StringTrue
target_vhostThe name of the target Vhost.StringTrue
target_serviceThe name of the target service.StringTrue

Example

dxcli cluster-rehost-service vhost1\spooler vhost2\spooler

cluster-remove-vhost

Description

Removes a Vhost from the cluster.

Syntax

dxcli cluster-remove-vhost <vhost_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue

Example

dxcli cluster-remove-vhost vhost1

cluster-resync

Description

Forces a re-synchronization of the cluster.

Syntax

dxcli cluster-resync

Parameters

None

Example

dxcli cluster-resync

cluster-set-secret

Description

Begins interactive process of setting the cluster passkey. This command cannot be run remotely.

Syntax

dxcli cluster-set-secret

Parameters

Interactive only.

Example

dxcli cluster-set-secret

cluster-set-secret-ex

Description

Sets the cluster passkey non-interactively. This command cannot be run remotely.

Syntax

dxcli cluster-set-secret-ex <passkey>

Parameters

NameDescriptionTypeRequired
passkeyThe passkey for the cluster.StringTrue

Example

dxcli cluster-set-secret-ex PassKey

collect-log

Description

Generates logs on the specified node(s). Logs will be gathered from every node in the cluster if collect log is run without a node_name parameter.

Log locations
Windows

The logs are created in the installation directory for DxEnterprise in the Support folder. By default this is C:\Program Files\DH2i\Support.

Linux

The logs are created in the /opt/dh2i/support folder.

Containers

collect-log is not supported in containers. Use docker logs or an equivalent command from the host to gather logs from DxEnterprise containers.

Syntax

dxcli collect-log [node_name][,...]

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringFalse
,...Comma-delimited list of additional nodes.False

Example

dxcli collect-log NODE1,NODE2,NODE3

create-volume

Description

Creates a volume on the specified disk.

Syntax

dxcli create-volume <disk_id>,<size_in_bytes>

Parameters

NameDescriptionTypeRequired
disk_idThe ID of the disk. Run dxcli get-disks to find the disk ID.StringTrue
size_in_bytesThe size of the volume to create in bytes.IntTrue

Example

dxcli create-volume 9b85d24a-5c5a-136d-e3ba-7ffd9584feaf,1073741824

deactivate-server

Description

Deactivates and clears the license on the specified node.

Syntax

dxcli deactivate-server <node_name>

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringTrue

Example

dxcli deactivate-server node1

delete-volume

Description

Deletes a volume on the specified disk.

Syntax

dxcli delete-volume <volume_id>

Parameters

NameDescriptionTypeRequired
volume_idThe ID of the volume. Run dxcli get-disks to find the disk ID.StringTrue

Example

dxcli delete-volume 8218ceeb-6ff1-4818-89e9-4d7f1a7ad0ef

demote-ags-node

Description

Demotes the specified replica to secondary role in the availability group.

Syntax

dxcli demote-ags-node <vhost_name> <ags_name> <node_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
ags_nameThe name of the availability group.StringTrue
node_nameThe name of the node.StringTrue

Example

dxcli demote-ags-node vhost1 ags1 node1

detach-ags

Description

Detaches availability group from the specified Vhost, but does not delete the configuration from SQL Server. Can be reattached using dxcli attach-ags.

Syntax

dxcli detach-ags <vhost_name> <ags_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
ags_nameThe name of the availability group.StringTrue

Example

dxcli detach-ags vhost1 ags1

encrypt-text

Description

Encrypts text for use in other DxCLI commands.

Syntax

dxcli encrypt-text <value>

Parameters

NameDescriptionTypeRequired
valueThe text to be encrypted.StringTrue

Example

dxcli encrypt-text p@ssw0rd

export-config

Description

Exports a client configuration file to be used on DxConnect client machines.

Syntax

dxcli export-config <file_name>

Parameters

NameDescriptionTypeRequired
file_nameThe name of the file, including the .dh2i extension. The file will be created in the working directory if no directory is included as part of the filename.StringTrue

Example

dxcli export-config dxe_client.dh2i

extend-volume

Description

Extends a volume on the specified disk.

Syntax

dxcli extend-volume <volume_id> <disk_id>,<size_in_bytes>

Parameters

NameDescriptionTypeRequired
volume_idThe ID of the volume.StringTrue
disk_idThe ID of the disk. Run dxcli get-disks to find the disk ID.StringTrue
size_in_bytesThe size to extend the volume, in bytes.IntTrue

Example

dxcli extend-volume 8218ceeb-6ff1-4818-89e9-4d7f1a7ad0ef 9b85d24a-5c5a-136d-e3ba-7ffd9584feaf,1073741824

format-volume

Description

Formats the specified volume.

danger

Formatting will delete all data on the specified volume.

Syntax

dxcli format-volume <volume_id> <fstype> <label> <block_size> <quick_format:true|false> <compression:true|false> [optional_parameters]

Parameters

NameDescriptionTypeRequired
volume_idThe ID of the volume.StringTrue
fstypeThe file system type. Possible types: FAT, FAT32, exFAT, EXT3, EXT4, NTFS, UDF, ReFS, or XFS.StringTrue
labelThe label for the volume.StringTrue
block_sizeThe block size in bytes. Possible sizes: 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536.IntTrue
quick_format:true|falseWhether or not to perform a quick format.StringTrue
compression:true|falseWhether or not to enable compression.StringTrue
optional_parametersOptional parameters from FORMAT.com. A list of these parameters can be found on Microsoft docs.StringFalse

Example

dxcli format-volume 8218ceeb-6ff1-4818-89e9-4d7f1a7ad0ef NTFS Volume1 4096 quick_format:true compression:false

freeze-node

Description

Freezes the specified node and disables automatic failover of any active Vhosts.

Syntax

dxcli freeze-node <node_name>

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringTrue

Example

dxcli freeze-node node1

freeze-vhost

Description

Freezes a specified Vhost and disables automatic failover.

Syntax

dxcli freeze-vhost <vhost_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue

Example

dxcli freeze-vhost vhost1

generate-otpk

Description

Generates a new One-Time PassKey to use with dxcli set-otpk.

Syntax

dxcli generate-otpk

Parameters

None

Example

dxcli generate-otpk

get-addressfilter

Description

Returns details for the specified address filter.

Syntax

dxcli get-addressfilter <filter_name>

Parameters

NameDescriptionTypeRequired
filter_nameThe name of the address filter.StringTrue

Example

dxcli get-addressfilter filter1

get-ags-detail

Description

Returns details for the specified availability group.

Syntax

dxcli get-ags-detail <vhost_name> <ags_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
ags_nameThe name of the availability group.StringTrue

Example

dxcli get-ags-detail vhost1 AG1

get-alerts

Description

Returns any active alerts for the cluster.

Syntax

dxcli get-alerts

Parameters

None

Example

dxcli get-alerts

get-client-connections

Description

Returns all active client connections.

Syntax

dxcli get-client-connections

Parameters

None

Example

dxcli get-client-connections

get-client-detail

Description

Returns the details for the specified client.

Syntax

dxcli get-client-detail <client_name>

Parameters

NameDescriptionTypeRequired
client_nameThe name of the client.StringTrue

Example

dxcli get-client-detail client1

get-cluster-disks

Description

Returns all disks under DxEnterprise management.

Syntax

dxcli get-cluster-disks

Parameters

None

Example

dxcli get-cluster-disks

get-cluster-nodes

Description

Returns the name, IP, pubkey hash, status, role, and operating system of each node in the cluster.

Syntax

dxcli get-cluster-nodes

Parameters

None

Example

dxcli get-cluster-nodes

get-contacts

Description

Returns all contacts in the address book.

Syntax

dxcli get-contacts

Parameters

None

Example

dxcli get-contacts

get-coordinators

Description

Returns which cluster member(s) are the cluster and app coordinators.

Syntax

dxcli get-coordinators

Parameters

None

Example

dxcli get-coordinators

get-coordinator-status

Description

Returns detailed status information for the cluster coordinator.

Syntax

dxcli get-coordinator-status

Parameters

None

Example

dxcli get-coordinator-status

get-counters

Description

Returns all performance counters.

Syntax

dxcli get-counters

Parameters

None

Example

dxcli get-counters

get-disk-detail

Description

Returns the specified disk details.

Syntax

dxcli get-disk-detail <disk_id>

Parameters

NameDescriptionTypeRequired
disk_idThe ID of the disk. Run dxcli get-disks to find the disk ID.StringTrue

Example

dxcli get-disk-detail 9b85d24a-5c5a-136d-e3ba-7ffd9584feaf

get-diskinfo

Description

Returns the specified disk information.

Syntax

dxcli get-diskinfo <disk_id> [node_name]

Parameters

NameDescriptionTypeRequired
disk_idThe ID of the disk.StringTrue
node_nameThe name of the node.StringFalse

Example

dxcli get-diskinfo 9b85d24a-5c5a-136d-e3ba-7ffd9584feaf node1

get-disks

Description

Returns all disk information from all nodes.

Syntax

dxcli get-disks

Parameters

None

Example

dxcli get-disks

get-docker-detail

Description

Returns the specified Docker information.

Syntax

dxcli get-docker-detail <vhost_name> <docker>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
dockerThe name of the Docker.StringTrue

Example

dxcli get-docker-detail vhost1 centos1

get-dxversion

Description

Returns the version of DxEnterprise installed on the current node.

Syntax

dxcli get-dxversion

Parameters

None

Example

dxcli get-dxversion

get-features

Description

Returns a list of features enabled on the connected node.

Syntax

dxcli get-features

Parameters

None

Example

dxcli get-features

get-globalsettings

Description

Returns any non-default configurations of global settings.

Syntax

dxcli get-globalsettings

Parameters

None

Example

dxcli get-globalsettings

get-instance-detail

Description

Returns the specified instance details.

Syntax

dxcli get-instance-detail <vhost_name> <instance_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
instance_nameThe name of the instance.StringTrue

Example

dxcli get-instance-detail vhost1\instance1

get-interfaces

Description

Returns an XML output of all interfaces available for connected cluster, or a specified node if supplied.

Syntax

dxcli get-interfaces [node_name]

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringFalse

Example

dxcli get-interfaces NODE1

get-license

Description

Returns the license key for the specified node.

Syntax

dxcli get-license <node_name>

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringTrue

Example

dxcli get-license node1

get-license-detail

Description

Returns details for the product license including the key, product, expiration, etc. for the connected server or a specified node.

Syntax

dxcli get-license-detail [node_name]

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringFalse

Example

dxcli get-license-detail NODE1

get-license-request

Description

Returns a license request for a node; use in conjunction with set-license. Go to DH2i License Activation and paste the output of get-license-request to obtain an activation response. The response from the website is used in the set-license command to activate the server.

Syntax

dxcli get-license-request <license_key> [node_name]

Parameters

NameDescriptionTypeRequired
license_keyThe license of the node.StringTrue
node_nameThe name of the node.StringFalse

Example

dxcli get-license-request AAAA-BBBB-CCCC-DDDD node1

get-monitored-apps

Description

Returns the information on all monitored applications.

Syntax

dxcli get-monitored-apps [node] [app_monitor]

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringFalse
app_monitorName of the application monitor. Must be DxHealthMonitor or DxRegMonitor.StringFalse

Example

dxcli get-monitored-apps

get-monitored-dockers

Description

Returns information on monitored dockers.

Syntax

dxcli get-monitored-dockers [node_name]

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringFalse

Example

dxcli get-monitored-dockers

get-monitored-instances

Description

Returns information on monitored instances.

Syntax

dxcli get-monitored-instances [node] [instance_monitor]

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringFalse
instance_monitorName of the instance monitor. Must be DxHealthMonitor or DxRegMonitor.StringFalse

Example

dxcli get-monitored-instances

get-monitored-services

Description

Returns information on monitored services.

Syntax

dxcli get-monitored-services [node] [service_monitor]

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringFalse
service_montiorThe name of the service monitor. Must be DxHealthMonitor or DxRegMonitor.StringFalse

Example

dxcli get-monitored-services

get-monitored-shares

Description

Returns information on monitored shares.

Syntax

dxcli get-monitored-shares [node_name]

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringFalse

Example

dxcli get-monitored-shares

get-node-detail

Description

Returns detailed information on the node.

Syntax

dxcli get-node-detail [node_name]

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringFalse

Example

dxcli get-node-detail

get-node-detail-xml

Description

Returns detailed information on the node in XML.

Syntax

dxcli get-node-detail-xml [node_name]

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringFalse

Example

dxcli get-node-detail-xml

get-otpk

Description

Returns the current One-Time PassKey (OTPK) for the cluster and its expiration date.

Syntax

dxcli get-otpk

Parameters

None

Example

dxcli get-otpk

get-policies

Description

Returns the current policies.

Syntax

dxcli get-policies

Parameters

None

Example

dxcli get-policies

get-policy

Description

Returns information on a specific policy.

Syntax

dxcli get-policy <policy_id>

Parameters

NameDescriptionTypeRequired
policy_idThe ID of the policy.StringTrue

Example

dxcli get-policy 676db1d4-91f5-4a68-b897-9fe75c27edcc

get-producttype

Description

Returns the product name and license features. This command cannot be run remotely.

Syntax

dxcli get-producttype

Parameters

None

Example

dxcli get-producttype

get-reservation

Description

Returns the reservation information from a specific disk.

Syntax

dxcli get-reservation <disk_id>

Parameters

NameDescriptionTypeRequired
disk_idThe ID of the disk. Run dxcli get-disks to find the disk ID.StringTrue

Example

dxcli get-reservation 9b85d24a-5c5a-136d-e3ba-7ffd9584feaf

get-service-detail

Description

Returns the service detail.

Syntax

dxcli get-service-detail <vhost_name> <service_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
service_nameThe name of the service.StringTrue

Example

dxcli get-service detail vhost1 spooler

get-sql-instances

Description

Returns the installed SQL instances.

Syntax

dxcli get-sql-instances

Parameters

None

Example

dxcli get-sql-instances

get-sql-paths

Description

Returns the SQL data and log paths.

Syntax

dxcli get-sql-paths <vhost_name>\<instance_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
instance_nameThe name of the instance.StringTrue

Example

dxcli get-sql-paths vhost1\instance1

get-tunnels

Description

Returns tunnel details.

Syntax

dxcli get-tunnels <tunnel_name>

Parameters

NameDescriptionTypeRequired
tunnel_nameThe name of the tunnel.StringTrue

Example

dxcli get-tunnels tunnel1

get-unused-driveletters

Description

Returns unused drive letters.

Syntax

dxcli get-unused-driveletters [volume_id]

Parameters

NameDescriptionTypeRequired
volume_idThe ID of the volume.StringFalse

Example

dxcli get-unused-driveletters

get-vhost

Description

Returns configuration information for the given Vhost.

Syntax

dxcli get-vhost <vhost_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue

Example

dxcli get-vhost vhost1

get-vhosts

Description

Returns configuration information for all Vhosts.

Syntax

dxcli get-vhosts

Parameters

None

Example

dxcli get-vhosts

get-volume-detail

Description

Returns the specified volume details.

Syntax

dxcli get-volume-detail <volume_id>

Parameters

NameDescriptionTypeRequired
volume_idThe ID of the volume.StringTrue

Example

dxcli get-volume-detail 8218ceeb-6ff1-4818-89e9-4d7f1a7ad0ef

get-witness

Description

Returns the current witness settings for the cluster.

Syntax

dxcli get-witness

Parameters

None

Example

dxcli get-witness

join-cluster

Description

Begin the interactive process of joining a cluster. This command cannot be run remotely.

Syntax

dxcli join-cluster

Parameters

Interactive only.

Example

dxcli join-cluster

join-cluster-ex

Description

Join an existing cluster non-interactively.

Syntax

dxcli join-cluster-ex <target> <passkey> <use_nat>

Parameters

NameDescriptionTypeRequired
targetThe IP of the target server.StringTrue
passkeyThe passkey of the target server.StringTrue
use_natSpecifies whether or not to use the DH2i Matchmaking Service. Use match.dh2i.com as the target and an OTPK instead of a passkey. Default value is false. See dxcli set-otpk for more information.BoolFalse

Examples

Local Join
dxcli join-cluster-ex 10.2.2.29 passkey
NAT Join
dxcli join-cluster-ex match.dh2i.com xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx true

list-globalsettings

Description

Returns a list of all available global settings in plain text, including their definitions and defaults.

Syntax

dxcli list-globalsettings

Parameters

None

Example

dxcli list-globalsettings

list-globalsettings-xml

Returns a list of all available global settings in XML, including their definitions and defaults.

Syntax

dxcli list-globalsettings-xml

Parameters

None

Example

dxcli list-globalsettings-xml

refresh-volmonitor-applications

Description

Re-checks what applications the node is able to start.

Syntax

dxcli refresh-volmonitor-applications

Parameters

None

Example

dxcli refresh-volmonitor-applications

reload-monitored-apps

Description

Reload the monitors for all applications.

Syntax

dxcli reload-monitored-apps [node] [app_monitor]

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringFalse
app_monitorThe name of the application monitor. Must be DxHealthMonitor or DxRegMonitor.StringFalse

Example

dxcli reload-monitored-apps

reload-monitored-dockers

Description

Reload the monitors for all dockers.

Syntax

dxcli reload-monitored-dockers [node_name]

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringFalse

Example

dxcli reload-monitored-dockers

reload-monitored-instances

Description

Reload the monitors for all instances.

Syntax

dxcli reload-monitored-instances [node] [instance_monitor]

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringFalse
instance_monitorThe name of the instance monitor. Must be DxHealthMonitor or DxRegMonitor.StringFalse

Example

dxcli reload-monitored-instances

reload-monitored-services

Description

Reload the monitors for all services.

Syntax

dxcli reload-monitored-services [node] [service_monitor]

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringFalse
service_monitorThe name of the service monitor. Must be DxHealthMonitor or DxRegMonitor.StringFalse

Example

dxcli reload-monitored-services

reload-monitored-shares

Description

Reload the monitors for all shares.

Syntax

dxcli reload-monitored-shares [node_name]

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringFalse

Example

dxcli reload-monitored-shares

relocate-systemdatabases

Description

Relocate the system databases for the specified instance. Moving master is required.

Syntax

dxcli relocate-systemdatabases <vhost_name>\<instance_name> <sql_data_path> <sql_log_path> [msdb,model,tempdb]

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
instance_nameThe name of the instance.StringTrue
sql_data_pathThe new path for instance data.StringTrue
sql_log_pathThe new path for instance logs.StringTrue
msdb,model,tempdbSystem databases to move along with the master database.StringFalse

Example

dxcli relocate-systemdatabases vhost1\instance1 C:\mount1\data C:\mount1\logs msdb,model

remove-addressfilter

Description

Removes an address filter from the cluster.

Syntax

dxcli remove-addressfilter <filter_name>

Parameters

NameDescriptionTypeRequired
filter_nameThe name of the address filter.StringTrue

Example

dxcli remove-addressfilter FILTER1

remove-ags

Description

Removes an availability group from a Vhost, and deletes the configuration from SQL Server.

Syntax

dxcli remove-ags <vhost_name> <ags_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
ags_nameThe name of the availability group.StringTrue

Example

dxcli remove-ags vhost1 ags1

remove-ags-databases

Description

Removes databases from an availability group.

Syntax

dxcli remove-ags-databases <vhost_name> <ags_name> <db_name>[,...]

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
ags_nameThe name of the availability group.StringTrue
db_nameThe name of the database.StringTrue
,...Comma-delimited list of additional databases to remove from the availability group.False

Example

dxcli remove-ags-databases vhost1 ags1 db1,db2,db3

remove-ags-listener

Description

Removes listener from an availability group.

Syntax

dxcli remove-ags-listener <vhost_name> <ags_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
ags_nameThe name of the availability group.StringTrue

Example

dxcli remove-ags-listener vhost1 ags1

remove-client

Description

Removes a DxConnect client from the cluster.

Syntax

dxcli remove-client <client_name>

Parameters

NameDescriptionTypeRequired
client_nameThe name of the client.StringTrue

Example

dxcli remove-client client1

remove-client-group

Description

Removes a DxConnect client group from the cluster.

Syntax

dxcli remove-client-group <group_name>

Parameters

NameDescriptionTypeRequired
group_nameThe name of the group.StringTrue

Example

dxcli remove-client-group group1

remove-cluster-members

Description

Remove node(s) from the cluster.

Syntax

dxcli remove-cluster-members <node_name>[,...]

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringTrue
,...Comma-delimited list of addtional nodes to remove from the cluster.False

Example

dxcli remove-cluster-members node1

remove-contact

Description

Remove a contact from the address book.

Syntax

dxcli remove-contact <name>

Parameters

NameDescriptionTypeRequired
nameThe name of the contact.StringTrue

Example

dxcli remove-contact user1

remove-disk

Description

Removes the specified disk from DxEnterprise management.

Syntax

dxcli remove-disk <disk_id>

Parameters

NameDescriptionTypeRequired
disk_idThe ID of the disk. Run dxcli get-disks to find the disk ID.StringTrue

Example

dxcli remove-disk 9b85d24a-5c5a-136d-e3ba-7ffd9584feaf

remove-docker

Description

Removes a Docker from a Vhost.

Syntax

dxcli remove-docker <vhost_name> <docker>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
dockerThe name of the docker.StringTrue

Example

dxcli remove-docker vhost1 centos1

remove-globalsetting

Description

Resets a global setting to its default value.

Syntax

dxcli remove-globalsetting <setting_name>

Parameters

NameDescriptionTypeRequired
setting_nameThe name of the global setting. Run dxcli get-globalsettings to list any non-default global settings.StringTrue

Example

dxcli remove-globalsetting timeout.ping

remove-instance

Description

Removes an instance from a Vhost.

Syntax

dxcli remove-instance <vhost\instance>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
instanceThe name of the instance.StringTrue

Example

dxcli remove-instance vhost1\instance1

remove-node

Description

Removes a node from the specified Vhost.

Syntax

dxcli remove-node <vhost_name> <node_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
node_nameThe name of the node.StringTrue

Example

dxcli remove-node vhost1 node1

remove-policy

Description

Removes a policy.

Syntax

dxcli remove-policy <policy_type> <guid>

Parameters

NameDescriptionTypeRequired
SYSTEM|PERF|ALLOC|FILTERThe policy type. Can be one of SYSTEM, PERF, ALLOC, or FILTER.StringTrue
guidThe globally unique identifier (GUID) of the policy.StringTrue

Example

dxcli remove-policy PERF 51b753b2-0969-473e-804b-a5c4db210faf

remove-script

Description

Removes a script.

Syntax

dxcli remove-script <object_name> <script_type> <object_type> [vhost_name]

Parameters

NameDescriptionTypeRequired
object_nameThe name of the instance, Vhost, service, availability group, or Docker.StringTrue
script_typeSpecifies the script type. One of prestart, poststart, prestop or poststop.StringTrue
object_typeThe type of object that the script is being removed from. This can be instance, vhost, service, ags, or docker.StringTrue
vhost_nameThe name of the Vhost the script is associated with. This parameter is required for the service, docker, and instance object types.StringFalse

Example

dxcli remove-script docker1 poststop docker vhost1 

remove-service

Description

Removes a service from a Vhost.

Syntax

dxcli remove-service <vhost_name> <service_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
service_nameThe name of the service.StringTrue

Example

dxcli remove-service vhost1 spooler

remove-service-registry

Description

Removes registry management from a virtualized service.

Syntax

dxcli remove-service-registry <vhost_name> <service_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
service_nameThe name of the service.StringTrue

Example

dxcli remove-service-registry vhost1 spooler

remove-share

Description

Removes a share from a Vhost.

Syntax

dxcli remove-share <vhost_name> <share_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
share_nameThe name of the share.StringTrue

Example

dxcli remove-share vhost1 share1

remove-smtp

Description

Removes the SMTP configuration.

Syntax

dxcli remove-smtp <server_name>

Parameters

NameDescriptionTypeRequired
server_nameThe name of the server.StringTrue

Example

dxcli remove-smtp server.mail.com

remove-tunnel

Description

Remove a tunnel from the cluster.

Syntax

dxcli remove-tunnel <tunnel_name>

Parameters

NameDescriptionTypeRequired
tunnel_nameThe name of the tunnel.StringTrue

Example

dxcli remove-tunnel tunnel1

remove-witness

Description

Remove current witness settings for the cluster.

Syntax

dxcli remove-witness

Parameters

None

Example

dxcli remove-witness

rescan-disk

Description

Re-scans the specified disk.

Syntax

dxcli rescan-disk <disk_id>

Parameters

NameDescriptionTypeRequired
disk_idThe ID of the disk. Run dxcli get-disks to find the disk ID.StringTrue

Example

dxcli rescan-disk 9b85d24a-5c5a-136d-e3ba-7ffd9584feaf

resync-ags-secondary

Description

Re-synchronizes an availability group's secondary node.

Syntax

dxcli resync-ags-secondary <vhost_name> <ags_name> <node_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
ags_nameThe name of the availability group.StringTrue
node_nameThe name of the node.StringTrue

Example

dxcli resync-ags-secondary vhost1 ag1 node2

set-ags-cred

Description

Modifies an availability group node's SQL credentials.

Syntax

dxcli set-ags-cred <vhost_name> <ags_name> <node_name|instance_name|sql_login|sql_pass> [...]

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
ags_nameThe name of the availability group.StringTrue
node_nameThe name of the node.StringTrue
instance_nameThe name of the instance.StringTrue
sql_loginThe user name used to login to SQL Server. The SQL Server login can be any SQL login or Windows domain accounts that has been assigned the sysadmin role for the instance being managed. When supplying a domain account, the username needs to follow the UPN format (for example: user@domain.com). Leave blank to use credentials from the underlying HA instance.StringTrue
sql_passThe password used to login to SQL Server. If no HA instance is configured or the AG credentials are different than those used by the underlying HA instance, provide the password used to login (encrypted using dxcli encrypt-text). Leave blank if utilizing credentials from underlying HA instance.StringTrue
...The previous parameter set can be repeated to modify the credentials for multiple availability group members in one command.False
Example
dxcli set-ags-cred vhost1 ags1 "node1|MSSQLSERVER|SA|6pnFaDrRS+W/F+dkRuPKAA==" "node2|MSSQLSERVER|SA|6pnFaDrRS+W/F+dkRuPKAA=="

set-ags-node-availability-mode

Description

Modifies a replica's availability mode.

Syntax

dxcli set-ags-node-availability-mode <vhost_name> <ags_name> <node_name> <availability_mode>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
ags_nameThe name of the availability group.StringTrue
node_nameThe name of the node.StringTrue
availability_modeSelect 0 for synchronous_commit or 1 for asynchronous_commit.BoolTrue

Example

dxcli set-ags-node-availability-mode vhost1 ags1 replica2 1

set-appcoordinator

Description

Assigns the application coordinator role to the specified node.

Syntax

dxcli set-appcoordinator <node_name>

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringTrue

Example

dxcli set-appcoordinator node1

set-cluster-member-addresses

Description

Sets the node’s interface(s) and protocol(s) for cluster communication.

Syntax

dxcli set-cluster-member-addresses <node_name> <ip>[,...]

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringTrue
ipIP Address, alias, or asterisk("*") to assign to the node. The asterisk (*) selection will cycle through the interfaces until a valid connection is established to the other cluster members.StringTrue
,...Ordered, comma-delimited list for multiple IP addresses and/or aliases. The order in which the interfaces and/or protocols are ordered determine their priority, from highest to lowest.False

Examples

Set the node IP address
dxcli set-cluster-member-addresses NODE1 1.2.3.4
Set an interface:protocol and IP address
dxcli set-cluster-member-addresses NODE1 "{eth0:IPV4},172.16.1.1"
Set to the default 'bind all'
dxcli set-cluster-member-addresses NODE1 "*"

set-coordinator

Description

Sets the cluster coordinator.

Syntax

dxcli set-coordinator <node_name>

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringTrue

Example

dxcli set-coordinator node1

set-depends

Description

Defines the start-up order of services in a list of dependencies.

Syntax

dxcli set-depends <vhost_name> <SQL:INSTANCE|SVC:SERVICE|VFS:SHARE|DCK:DOCKER> <DEPENDS [SQL:INSTANCE|SVC:SERVICE|VFS:SHARE|DCK:DOCKER]>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
SQL:INSTANCE|SVC:SERVICE|VFS:SHARE|DCK:DOCKERThe type and name of the parent application in all caps.True
DEPENDS [SQL:INSTANCE|SVC:SERVICE|VFS:SHARE|DCK:DOCKER]The type and name of the child application in all caps.True

Example

dxcli set-depends vhost1 SQL:INSTANCE1 SVC:SQLBROWSER

set-docker-description

Description

Sets the description of a docker.

Syntax

dxcli set-docker-description <docker> <description>

Parameters

NameDescriptionTypeRequired
docker_nameThe name of the Docker.StringTrue
descriptionThe description for the Docker.StringTrue

Example

dxcli set-docker-description centos1 "This is a CentOS docker"

set-failback

Description

Sets the auto-failback option for a Vhost.

Syntax

dxcli set-failback <vhost_name> <enabled>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
enabledSets whether auto-failback is enabled or disabled on the Vhost.BoolTrue

Example

dxcli set-failback vhost1 true

set-globalsetting

Description

Sets a cluster global setting. For more information on the available global settings, please see [DxCLI Global Settings for DxEnterprise].

Syntax

dxcli set-globalsetting <setting_key> <setting_value>

Parameters

NameDescriptionTypeRequired
setting_keyThe name of the global setting.StringTrue
setting_valueThe value for the global setting.String, Int, BoolTrue

Example

dxcli set-globalsetting timeout.ping 10

set-instance-description

Description

Sets the description for an instance.

Syntax

dxcli set-instance-description <instance_name> <description>

Parameters

NameDescriptionTypeRequired
instance_nameThe name of the instance.StringTrue
descriptionThe description for the instance.StringTrue

Example

dxcli set-instance-description instance1 "This is a SQL 2019 instance"

set-license

Description

Activates a node that has no internet connection; used in conjunction with get-license-request.

Syntax

dxcli set-license <license_key> <license_response> [node_name]

Parameters

NameDescriptionTypeRequired
license_keyThe license key for the node.StringTrue
license_responseThe activation response string given by the Client Portal.StringTrue
node_nameThe name of the node. If no node is specified, the command defaults to the currently connected node.StringFalse

Example

dxcli set-license AAAA-BBBB-CCCC-DDDD 2ki44uOaLK4gbfjSStNVUXNQsM4eMwjVRBNyAQrp6UABN0frE9ZiGwhP1oxLD+y6F5UDwfaZkTZqQF0JfoEpGhu8V8WAS/dkOGNkBqGv2Qi+Nuc21kV/d2p4elTZSdI2rGrL== node2

set-mountpoint

Description

Sets the volume mount point.

Syntax

dxcli set-mountpoint <volume_id> <mount_point>

Parameters

NameDescriptionTypeRequired
volume_idThe ID of the volume.StringTrue
mount_pointThe mount point path or drive letter.StringTrue

Example

dxcli set-mountpoint 8218ceeb-6ff1-4818-89e9-4d7f1a7ad0ef C:\mount1

set-otpk

Description

Sets the One-Time PassKey (OTPK).

Syntax

dxcli set-otpk [expiration_date] [otpk]

Parameters

NameDescriptionTypeRequired
expiration_dateThe time and date the One-Time PassKey will expire. Should be formatted as YYYY-MM-DDTHH:MM:SS. Leaving this parameter empty will default the expiration to one hour.StringFalse
otpkThe One-Time Passkey in base64. A One-Time PassKey can be generated using dxcli generate-otpk.StringFalse

Example

dxcli set-otpk 2021-01-01T18:00:00 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

set-script

Description

This sets a PreStart, PostStart, PreStop or Poststop script for a Vhost, instance or service.

Syntax

dxcli set-script <object_name> <script_type> <script_path>

Parameters

NameDescriptionTypeRequired
object_nameThe name of the instance, Vhost, service, availability group, or Docker.StringTrue
script_typeSpecifies the script type. One of prestart, poststart, prestop or poststop.StringTrue
script_pathThe full path to the script file.StringTrue

Example

dxcli set-script vhost1 prestart C:\mount1\script.ps1

set-script-embedded

Description

Sets an embedded PreStart, PostStart, PreStop or PostStop script for a Vhost, instance or service. The advantage of having an embedded script is that it is part of the cluster configuration and is always available to all of the cluster member nodes.

Syntax

dxcli set-script-embedded <object_name> <script_type> <script_content> <script_extension>

Parameters

NameDescriptionTypeRequired
object_nameThe name of the instance, Vhost, service, availability group, or Docker.StringTrue
script_typeSpecifies the script type. One of prestart, poststart, prestop or poststop.StringTrue
script_contentThe script content to be embedded into the cluster configuration.StringTrue
script_extensionThe file extension, such as CMD, BAT, or PS1.StringTrue

Example

dxcli set-script-embedded vhost1 PreStart "echo %computername%" CMD

set-server

Description

Interactively connect to a remote node for cluster administration.

Syntax

dxcli set-server

Parameters

Interactive only.

Example

dxcli set-server

set-server-ex

Description

Non-interactively connect to a remote node for cluster administration.

Syntax

dxcli set-server-ex <target> <passkey>

Parameters

NameDescriptionTypeRequired
targetThe target node. Can beStringTrue
passkeyThe passkey of the target node. The cluster passkey must be set using dxcli cluster-set-secret or dxcli cluster-set-secret-ex.StringTrue

Example

dxcli set-server-ex 10.2.2.29 passkey

set-service-description

Description

Sets the description for the service.

Syntax

dxcli set-service-description <service_name> <description> [vhost_name]

Parameters

NameDescriptionTypeRequired
service_nameThe name of the service.StringTrue
descriptionThe description for the service.StringTrue
vhost_nameThe name of the Vhost. This parameter is only required if there is a service with the same name already configured on another Vhost.StringFalse

Example

dxcli set-service-description BITS "Background Intelligent Transfer Service" vhost2

set-sqlcred

Description

Sets the sysadmin credentials DxEnterprise will use for instance management.

Syntax

dxcli set-sqlcred <instance> <sql_login> <sql_pass>

Parameters

NameDescriptionTypeRequired
instance_nameThe connection string for the SQL instance (vhost\instance).StringTrue
sql_loginThe user name used to login to SQL Server. The SQL Server login can be any SQL login or Windows domain accounts that has been assigned the sysadmin role for the instance being managed. When supplying a domain account, the username needs to follow the UPN format (for example: user@domain.com).StringTrue
sql_passThe password used to login to SQL Server (encrypted using dxcli encrypt-text).StringTrue

Example

dxcli set-sqlcred vhost1\instance1 sa 6pnFaDrRS+W/F+dkRuPKAA==

set-storcoordinator

Description

Sets the cluster storage coordinator.

Syntax

dxcli set-storcoordinator <node_name>

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringTrue

Example

dxcli set-storcoordinator node1

set-vhost-ilbports

Description

Sets or removes the Vhost internal load balancer probe port.

Syntax

dxcli set-vhost-ilbports <vhost_name> <ilb_port>[,...]

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
ilb_portThe port to use for internal load balancer probing. Use empty double quotes ("") to remove the port assignment.StringTrue
,...Comma-delimited list of additional probe ports.False

Examples

Add an ILB Port to the Vhost
dxcli set-vhost-ilbports "vhost1" 30001
Remove ILB Ports from the Vhost
dxcli set-vhost-ilbports "vhost1" ""

set-vhost-priority

Description

Sets the Vhost failover priority.

Syntax

dxcli set-vhost-priority <vhost_name> <priority>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
priorityThe priority level (1 is the highest and 5 is the lowest).IntTrue

Example

dxcli set-vhost-priority vhost1 3

set-volume-label

Description

Sets the label for the specified volume.

Syntax

dxcli set-volume-label <volume_id> <volume_label>

Parameters

NameDescriptionTypeRequired
volume_idThe name of the volume.StringTrue
volume_labelThe label for the volume.StringTrue

Example

dxcli set-volume-label 8218ceeb-6ff1-4818-89e9-4d7f1a7ad0ef "Volume 1"

set-witness

Description

Sets the cluster witness settings.

Syntax

dxcli set-witness <witness_path>[|username|password] [...]

Parameters

NameDescriptionTypeRequired
witness_pathThe UNC path of the network share or Azure Blob Storage connection string or SAS URL. Prefix with az: if using Azure Blob Storage connection string or SAS URL. Empty to remove current cluster witness settings.StringTrue
usernameThe name of the user. Not specified for Azure Blob Storage Access Key or SAS URL.StringFalse
passwordThe password of the user (encrypted using dxcli encrypt-text recommended). Not specified for Azure Blob Storage Access Key or SAS URL.StringFalse
...Space-delimited set of parameters for multiple witness configurations.False

Examples

Local File Share
dxcli set-witness "\server1\myshare1|user1|6pnFaDrRS+W/F+dkRuPKAA=="
Cloud File Share
dxcli set-witness "\\mystorage.file.core.windows.net\azshare1|mystorage|/nbFVz1fOKH7b0RaY/5Ms8uytbY99PZsspZkcHvNtVRj//pUk4jUPV7owaUSuDd6eExv96sBvkCXsleATEsT33=="
Azure Blob Storage via Access Key
dxcli set-witness "az:DefaultEndpointsProtocol=https;AccountName=mystorage;AccountKey=/nbFVz1fOKH7b0RaY/5Ms8uytbY99PZsspZkcHvNtVRj//pUk4jUPV7owaUSuDd6eExv96sBvkCXsleATEsT33==;EndpointSuffix=core.windows.net"
Azure Blob Storage via SAS URL
dxcli set-witness "az:https://mystorage.blob.core.windows.net/?sv=2020-02-10&ss=b&srt=sco&sp=rwdlactfx&se=2021-06-09T13:15:48Z&st=2021-06-09T05:15:48Z&spr=https&sig=cRDqOc25lpHfbP8X1hlkDnV4H1wJycCyuuqlgu8U1xg%3D"
Mixed File Shares
dxcli set-witness "\\server1\myshare1|user1|6pnFaDrRS+W/F+dkRuPKAA=="
"\mystorage.file.core.windows.net\azshare1|mystorage|/nbFVz1fOKH7b0RaY/5Ms8uytbY99PZsspZkcHvNtVRj//pUk4jUPV7owaUSuDd6eExv96sBvkCXsleATEsT33=="
"az:DefaultEndpointsProtocol=https;AccountName=mystorage;AccountKey=/nbFVz1fOKH7b0RaY/5Ms8uytbY99PZsspZkcHvNtVRj//pUk4jUPV7owaUSuDd6eExv96sBvkCXsleATEsT33==;EndpointSuffix=core.windows.net"

shrink-volume

Description

Shrinks the current volume size.

Syntax

dxcli shrink-volume <volume_id> <size_in_bytes>

Parameters

NameDescriptionTypeRequired
volume_idThe name of the volume.StringTrue
size_in_bytesThe number of bytes the volume size will be reduced by.IntTrue

Example

dxcli shrink-volume 23d6d8a0-c3bd-0ec3-9e98-c0021494b827 500000000

start-disk

Description

Starts the disk on the specified node.

Syntax

dxcli start-disk <disk_id> <node_name>

Parameters

NameDescriptionTypeRequired
disk_idThe ID of the disk. Run dxcli get-disks to find the disk ID.StringTrue
node_nameThe name of the node.StringTrue

Example

dxcli start-disk 9b85d24a-5c5a-136d-e3ba-7ffd9584feaf node1

start-disk-associates

Description

Starts all associated disks in a diskgroup.

Syntax

dxcli start-disk-associates <disk_id> <node_name>

Parameters

NameDescriptionTypeRequired
disk_idThe ID of the disk. Run dxcli get-disks to find the disk ID.StringTrue
node_nameThe name of the node.StringTrue

Example

dxcli start-disk-associates 9b85d24a-5c5a-136d-e3ba-7ffd9584feaf node1

start-docker

Description

Starts the specified docker.

Syntax

dxcli start-docker <vhost_name> <docker_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
docker_nameThe name of the docker.StringTrue

Example

dxcli start-docker vhost1 centos1

start-instance

Description

Starts the specified instance.

Syntax

dxcli start-instance <vhost_name>\<instance_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
instance_nameThe name of the instance.StringTrue

Example

dxcli start-instance vhost1\instance1

start-service

Description

Starts the specified service.

Syntax

dxcli start-service <vhost_name> <service_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
serviceThe name of the service.StringTrue

Example

dxcli start-service vhost1 spooler

start-volume

Description

Starts the specified volume on a node.

Syntax

dxcli start-volume <volume_id> <node_name>

Parameters

NameDescriptionTypeRequired
volume_idThe ID of the volume.StringTrue
node_nameThe name of the node.StringTrue

Example

dxcli start-volume 8218ceeb-6ff1-4818-89e9-4d7f1a7ad0ef node1

stop-disk

Description

Stops the specified disk.

Syntax

dxcli stop-disk <disk_id>

Parameters

NameDescriptionTypeRequired
disk_idThe ID of the disk. Run dxcli get-disks to find the disk ID.StringTrue

Example

dxcli stop-disk 9b85d24a-5c5a-136d-e3ba-7ffd9584feaf

stop-disk-associates

Description

Stops all associated disks in a diskgroup.

Syntax

dxcli stop-disk-associates <disk_id>

Parameters

NameDescriptionTypeRequired
disk_idThe ID of the disk. Run dxcli get-disks to find the disk ID.StringTrue

Example

dxcli stop-disk-associates 9b85d24a-5c5a-136d-e3ba-7ffd9584feaf

stop-docker

Description

Stops the specified docker.

Syntax

dxcli stop-docker <vhost_name> <docker_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
docker_nameThe name of the docker.StringTrue

Example

dxcli stop-docker vhost1 centos1

stop-instance

Description

Stops the specified instance.

Syntax

dxcli stop-instance <vhost_name>\<instance_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
instance_nameThe name of the instance.StringTrue

Example

dxcli stop-instance vhost1\instance1

stop-service

Description

Stops the specified service.

Syntax

dxcli stop-service <vhost_name> <service_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
service_nameThe name of the service.StringTrue

Example

dxcli stop-service vhost1 spooler

stop-volume

Description

Stops the specified volume.

Syntax

dxcli stop-volume <volume_id>

Parameters

NameDescriptionTypeRequired
volume_idThe ID of the volume.StringTrue

Example

dxcli stop-volume 8218ceeb-6ff1-4818-89e9-4d7f1a7ad0ef

test-connection

Description

Tests the connection between the node and the cluster.

Syntax

dxcli test-connection

Parameters

None

Example

dxcli test-connection

test-nat

Description

Determines the NAT type for the connected server.

Syntax

dxcli test-nat [-v]

Parameters

NameDescriptionTypeRequired
-vEnables verbose output.SwitchFalse

Example

dxcli test-nat -v

test-witness

Description

Tests the availability and authentication to the UNC network share(s).

LEGACY

This command has been superseded by dxcli test-witness-ex. Do not use this command for Azure Blob Storage.

Syntax

dxcli test-witness <share_path>[,...] <username> <password>

Parameters

NameDescriptionTypeRequired
share_pathThe UNC path of the network share.StringTrue
,...Comma-delimited list of additional UNC paths.False
usernameThe name of the userStringTrue
passwordThe password of the user (encrypted using dxcli encrypt-text recommended).StringTrue

Examples

Local File Share
dxcli test-witness "\\server1\myshare1" "user1" "6pnFaDrRS+W/F+dkRuPKAA=="
Cloud File Share
dxcli test-witness "\\mystorage.file.core.windows.net\azshare1" "mystorage" "/nbFVz1fOKH7b0RaY/5Ms8uytbY99PZsspZkcHvNtVRj//pUk4jUPV7owaUSuDd6eExv96sBvkCXsleATEsT33=="

test-witness-ex

Description

Tests the availability and authentication to the UNC network share(s) and/or Azure Blob Storage access key or SAS URL. Prefix with az: if using Azure Blob Storage access key or SAS URL.

Syntax

dxcli test-witness-ex <witness_path>[|username|password] [...]

Parameters

NameDescriptionTypeRequired
witness_pathThe UNC path of the network share, Azure Blob Storage connection string, or SAS URL. Prefix with az: if using Azure Blob Storage connection string or SAS URL. Empty to remove current cluster witness settings.StringTrue
usernameThe name of the user. Not specified for Azure Blob Storage Access Key or SAS URL.StringFalse
passwordThe password of the user (encrypted using dxcli encrypt-text recommended). Not specified for Azure Blob Storage Access Key or SAS URL.StringFalse
...Space-delimited set of parameters for multiple witness configurations.False

Examples

Local File Share
dxcli test-witness-ex "\\server1\myshare1|user1|6pnFaDrRS+W/F+dkRuPKAA=="
Cloud File Share
dxcli test-witness-ex "\\mystorage.file.core.windows.net\azshare1|mystorage|/nbFVz1fOKH7b0RaY/5Ms8uytbY99PZsspZkcHvNtVRj//pUk4jUPV7owaUSuDd6eExv96sBvkCXsleATEsT33=="
Azure Blob Storage via Access Key
dxcli test-witness-ex "az:DefaultEndpointsProtocol=https;AccountName=mystorage;AccountKey=/nbFVz1fOKH7b0RaY/5Ms8uytbY99PZsspZkcHvNtVRj//pUk4jUPV7owaUSuDd6eExv96sBvkCXsleATEsT33==;EndpointSuffix=core.windows.net"
Azure Blob Storage via SAS URL
dxcli test-witness-ex "az:https://mystorage.blob.core.windows.net/?sv=2020-02-10&ss=b&srt=o&sp=rwdlactfx&se=2021-06-09T13:15:48Z&st=2021-06-09T05:15:48Z&spr=https&sig=cRDqOc25lpHfbP8X1hlkDnV4H1wJycCyuuqlgu8U1xg%3D"
Mixed File Shares
dxcli test-witness-ex "\\server1\myshare1|user1|6pnFaDrRS+W/F+dkRuPKAA==" "\\mystorage.file.core.windows.net\azshare1|mystorage|/nbFVz1fOKH7b0RaY/5Ms8uytbY99PZsspZkcHvNtVRj//pUk4jUPV7owaUSuDd6eExv96sBvkCXsleATEsT33==" "az:DefaultEndpointsProtocol=https;AccountName=mystorage;AccountKey=/nbFVz1fOKH7b0RaY/5Ms8uytbY99PZsspZkcHvNtVRj//pUk4jUPV7owaUSuDd6eExv96sBvkCXsleATEsT33==;EndpointSuffix=core.windows.net"

unfreeze-node

Description

Unfreezes the specified cluster node and enables automatic failover.

Syntax

dxcli unfreeze-node <node_name>

Parameters

NameDescriptionTypeRequired
node_nameThe name of the node.StringTrue

Example

dxcli unfreeze-node node1

unfreeze-vhost

Description

Unfreezes the specified Vhost and enables automatic failover.

Syntax

dxcli unfreeze-vhost <vhost_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue

Example

dxcli unfreeze-vhost vhost1

update-addressfilter

Description

Updates an address filter to accept or deny connections from specific IP addresses or subnets.

Syntax

dxcli update-addressfilter <filter_name> <address>,<action>[|...] <default_action>

Parameters

NameDescriptionTypeRequired
filter_nameThe name of the filter.StringTrue
addressThe IP address or subnet.StringTrue
actionWhether or not to accept or deny the IP address or subnet. Must be accept or deny.StringTrue
|...Pipe-delimited list of additional address filters.False
default_actionSets the default action for the address filter to accept all or deny all connections outside of the specified IP or subnet from the previous parameter. Must be accept or deny.StringTrue

Example

dxcli update-addressfilter filter1 "10.1.1.0,accept|10.1.2.0,accept" deny

update-client

Description

Updates the specified client.

Syntax

dxcli update-client <client_name> <client_password> [client_description] [max_session_count]

Parameters

NameDescriptionTypeRequired
client_nameThe name of the client.StringTrue
client_passwordThe password of the client.StringTrue
client_descriptionThe description for the client.StringFalse
max_session_countThe number of active client sessions allowed.IntFalse

Example

dxcli update-client client1 p@ssw0rd "Accounting Admins" 10

update-client-group

Description

Updates an existing client group.

Syntax

dxcli update-client-group <group_name> [modifier]<client_name>[,...] [group_description]

Parameters

NameDescriptionTypeRequired
group_nameThe name of the group.StringTrue
modifierSpecifies whether to add or remove a client from the group. Use a plus (+) to add clients and minus (-) before the client name to remove clients. If no sign is given, the default action adds the client.StringFalse
client_nameThe name of the client.StringTrue
,...Comma-delimited list of additional clients to add or remove from the client group.False
group_descriptionThe description for the group.StringFalse

Example

dxcli update-client-group group1 client1,-client2

update-contact

Description

Updates the contact in the address book.

Syntax

dxcli update-contact <name> <email>

Parameters

NameDescriptionTypeRequired
nameThe name of the contact.StringTrue
emailThe email address of contact.StringTrue

Example

dxcli update-contact user1 user1@mail.com

update-disk

Description

Updates the disk label.

Syntax

dxcli update-disk <disk_id> <disk_label>

Parameters

NameDescriptionTypeRequired
disk_idThe ID of the disk. Run dxcli get-disks to find the disk ID.StringTrue
disk_labelThe label for the disk.StringTrue

Example

dxcli update-disk 23d6d8a0-c3bd-0ec3-9e98-c0021494b827 "Disk 1"

update-policy

Description

Updates a policy. See dxcli add-policy for more information.

Syntax

dxcli update-policy <policy> <GUID> [description] <counter> <object> <threshold> <email> <script_path> <priority> [filter_options]

Parameters

NameDescriptionTypeRequired
policyThe type of policy to use. Can be SYSTEM, PERF, ALLOC, or FILTER.StringTrue
GUIDThe globally unique identifier (GUID) of the policy.StringFalse
descriptionA description for the policy.StringFalse
counterThe performance counter, or type of resource, to be monitored (e.g. System-Disk-Io, System-Down, System-Free-Memory, System-Networking).StringTrue
objectThe node, instance, service, Vhost, or Docker to attach the policy to.StringTrue
thresholdWhen to invoke alert i.e. 99 (where resource hits 99%).IntTrue
emailThe email address to send the alert to.StringTrue
script_pathThe full path to the script to invoke.StringTrue
priorityThe priority level 0-5.IntTrue
filter_optionsEnables the policy when set to true.StringFalse

Example

dxcli update-policy PERF "f7d70673-dde1-4b71-84a7-ae7324e4ace4" "test" System-Disk-Io "node1" "99" "user1@mail.com" "c:\scripts\script.ps1" 0 true

update-share

Description

Updates the file share.

Syntax

dxcli update-share <vhost_name> <share_name> [/remarks:"text"] [/unlimited|/users:number] [/cache:Manual|Documents|Programs|BranchCache|None] [/grant:user,[READ|CHANGE|FULL]

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
share_nameThe name of the share.StringTrue
remarksRemarks to add to the share.StringFalse
/unlimited|/usersThe number of users allowed.StringFalse
cacheThe cache options for the share (manual, documents, programs, branchcache, none).StringFalse
/grant:everyone,readGrant everyone read permissions.StringFalse
/grant:user1,readGrant specific user permissions.StringFalse

Example

dxcli update-share vhost1 "share1=c:\mount1\share1" /remarks:"This is fileshare1" /unlimited /cache:manual /grant:everyone,READ

update-tunnel

Description

Update an existing tunnel.

Syntax

dxcli update-tunnel <tunnel_name> <enabled> <destination_node_name> <target_address>:<target_port> <origin_node>,<origin_address>:<origin_port>[/address_filter][|...] [vhost_name]

Parameters

NameDescriptionTypeRequired
tunnel_nameThe name of the tunnel.StringTrue
enabledEnable the tunnel.BoolTrue
destination_node_nameThe name of the destination node.StringTrue
target_addressThe target IP address or hostname of the tunnel destination.StringTrue
target_portThe port number for the target.IntTrue
origin_nodeThe name of the origin node. This is the node where the tunnel listener will be active.StringTrue
origin_addressThe IP address the origin will bind to. Can be set to 0.0.0.0 to allow connections from any IP address with network access, or 127.0.0.1 to only allow connections from the node itself.StringTrue
origin_portThe port number for the origin address.IntTrue
address_filterThe name of the address filter to associate with the tunnel. See dxcli add-addressfilter for more information.StringFalse
|...Pipe-delimited list of additional origins.False
vhost_nameThe name of the Vhost.StringFalse

Example

dxcli update-tunnel tunnel1 true node1 10.1.200.62:30004 "node2,0.0.0.0:30004/FILTER1|node3,127.0.0.1:30004/FILTER2" VHOST1

update-tunnel-clients

Description

Updates the clients and/or client groups associated with a tunnel.

Syntax

dxcli update-tunnel-clients <tunnel_name> [modifier]<name>:<ip_address>:<port>,[...]

Parameters

NameDescriptionTypeRequired
tunnel_nameThe name of the tunnel.StringTrue
modifierAdd (+) or remove (-) a client or client group from the tunnel. If no sign is given, the default action is add.StringFalse
nameThe name of the client or client group to add or remove from the tunnel.StringTrue
ip_addressThe IP address the client or client group uses to connect to the tunnel.StringTrue
portThe port the client or client group uses to connect to the tunnel.StringTrue
,...Comma-delimited list of additional clients to update for the tunnel.False

Example

dxcli update-tunnel-clients tunnel1 client1:127.0.0.1:30001,client2:127.0.0.1:40001,-client3:127.0.0.1:40001 clientgroup1:127.0.0.1:40001

update-vhost

Description

Updates the node or Vhost list for an existing Vhost or exVhost.

Syntax

dxcli update-vhost <vhost_name> <member_name>[,...]

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost or exVhost.StringTrue
member_nameThe name of the node or Vhost.StringTrue
,...Comma-delimited list of additional nodes or Vhosts.False

Examples

Update Vhost
dxcli update-vhost "vhost1" "node1,node3,node2"
Update exVhost
dxcli update-vhost "exvhost1" "VHOST:vhost1,VHOST:vhost2,VHOST:vhost3"

vhost-get-docker-images

Description

Returns a list of available docker images.

Syntax

dxcli vhost-get-docker-images <vhost_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue

Example

dxcli vhost-get-docker-images vhost1

vhost-get-services

Description

Returns a list of the available Vhost services.

Syntax

dxcli vhost-get-services <vhost_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue

Example

dxcli vhost-get-services vhost1

vhost-get-sql-instances

Description

Returns a list of the available SQL instances.

Syntax

dxcli vhost-get-sql-instances <vhost_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue

Example

dxcli vhost-get-sql-instances vhost1

vhost-set-diskgroup

Description

A list of disk IDs to be added to the specified Vhost diskgroup. The disk(s) will be brought online on the active node of the Vhost. The list of disk IDs must include all disk(s) that are to be assigned to the diskgroup.

Syntax

dxcli vhost-set-diskgroup <vhost_name> <disk_id>[|...]

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
disk_idID to add to the diskgroup.StringTrue
|...A pipe-delimited list of additional disks to add to the diskgroup.False

Example

dxcli vhost-set-diskgroup vhost1 "9b85d24a-5c5a-136d-e3ba-7ffd9584feaf|23d6d8a0-c3bd-0ec3-9e98-c0021494b827"

vhost-set-docker-image

Description

Sets the docker to use the specified image.

Syntax

dxcli vhost-set-docker-image <vhost_name> <docker_image> <image_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
docker_nameThe name of the docker.StringTrue
image_nameThe name of the docker image.StringTrue

Example

dxcli vhost-set-docker-image vhost1 centos1 centosimage

vhost-start-diskgroup

Description

Starts the Vhost diskgroup on the specified node.

Syntax

dxcli vhost-start-diskgroup <vhost_name> <node_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue
node_nameThe name of the node.StringTrue

Example

dxcli vhost-start-diskgroup vhost1 node1

vhost-start-node

Description

Starts hosting the Vhost or exVhost on the specified member.

Syntax

dxcli vhost-start-node <vhost_name> <member_name> [force_failover]

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost or exVhost.StringTrue
member_nameThe name of the node or Vhost.StringTrue
force_failoverWhether or not to force an AG to failover to an asynchronous replica.BoolFalse
danger

Forcing failover to an asynchronous availability group replica can result in data loss.

Example

dxcli vhost-start-node vhost1 node1 true

vhost-stop-diskgroup

Description

Stops the diskgroup on the specified Vhost.

Syntax

dxcli vhost-stop-diskgroup <vhost_name>

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost.StringTrue

Example

dxcli vhost-stop-diskgroup vhost1

vhost-stop-node

Description

Stops the specified Vhost or exVhost.

Syntax

dxcli vhost-stop-node <vhost_name> [member_name] [disabled]

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost or exVhost.StringTrue
member_nameThe name of the node or Vhost.StringFalse
disabledOption to also disable the node. Leaving this parameter blank will leave the node in its current state.SwitchFalse

Example

dxcli vhost-stop-node vhost1 node1 disabled

vhost-update-vips

Description

Changes the virtual IP(s) used by the Vhost or exVhost.

Syntax

dxcli vhost-update-vips <vhost_name> <virtual_ip>[,...]

Parameters

NameDescriptionTypeRequired
vhost_nameThe name of the Vhost or exVhost.StringTrue
virtual_ipVirtual IP to update on the Vhost.StringTrue
,...Comma-delimited list of additional virtual IPs to update on the Vhost.False

Example

dxcli vhost-update-vips vhost1 10.2.2.29,10.2.3.141