VMware Horizon CLI Cheatsheet
#
VMware Horizon CLI provides commands to manage VMware Horizon virtual desktops and applications. These commands help administrators perform tasks related to pools, sessions, configurations, and more directly from the command line.
General Commands
#
Command/Option | Example | Description |
---|
viewcmd –help | viewcmd --help | Display help for the Horizon CLI commands |
viewcmd –version | viewcmd --version | Display the version of the Horizon CLI |
Pool Management
#
Command/Option | Example | Description |
---|
viewcmd pool –list | viewcmd pool --list | List all pools |
viewcmd pool –create | viewcmd pool --create --name <pool_name> --description "Description" | Create a new pool |
viewcmd pool –delete | viewcmd pool --delete --name <pool_name> | Delete a pool |
viewcmd pool –update | viewcmd pool --update --name <pool_name> --description "New description" | Update pool properties |
Session Management
#
Command/Option | Example | Description |
---|
viewcmd session –list | viewcmd session --list | List all active sessions |
viewcmd session –terminate | viewcmd session --terminate --user <username> | Terminate a session for a user |
viewcmd session –disconnect | viewcmd session --disconnect --user <username> | Disconnect a session for a user |
Desktop Management
#
Command/Option | Example | Description |
---|
viewcmd desktop –list | viewcmd desktop --list | List all desktops |
viewcmd desktop –create | viewcmd desktop --create --name <desktop_name> --pool <pool_name> | Create a new desktop in a pool |
viewcmd desktop –delete | viewcmd desktop --delete --name <desktop_name> | Delete a desktop |
viewcmd desktop –reset | viewcmd desktop --reset --name <desktop_name> | Reset a desktop |
Application Management
#
Command/Option | Example | Description |
---|
viewcmd app –list | viewcmd app --list | List all applications |
viewcmd app –publish | viewcmd app --publish --name <app_name> --package <package_path> | Publish a new application |
viewcmd app –unpublish | viewcmd app --unpublish --name <app_name> | Unpublish an application |
viewcmd app –update | viewcmd app --update --name <app_name> --package <package_path> | Update an application package |
User Management
#
Command/Option | Example | Description |
---|
viewcmd user –list | viewcmd user --list | List all users |
viewcmd user –add | viewcmd user --add --username <username> --password <password> | Add a new user |
viewcmd user –delete | viewcmd user --delete --username <username> | Delete a user |
viewcmd user –update | viewcmd user --update --username <username> --password <new_password> | Update user properties |
Configuration Management
#
Command/Option | Example | Description |
---|
viewcmd config –list | viewcmd config --list | List all configuration settings |
viewcmd config –set | viewcmd config --set --key <key> --value <value> | Set a configuration setting |
viewcmd config –get | viewcmd config --get --key <key> | Get the value of a configuration setting |
viewcmd config –delete | viewcmd config --delete --key <key> | Delete a configuration setting |
Log Management
#
Command/Option | Example | Description |
---|
viewcmd log –list | viewcmd log --list | List all log files |
viewcmd log –show | viewcmd log --show --file <log_file> | Display the contents of a log file |
viewcmd log –download | viewcmd log --download --file <log_file> --output <output_path> | Download a log file |
Troubleshooting
#
Command/Option | Example | Description |
---|
viewcmd support –bundle | viewcmd support --bundle --output <output_path> | Create a support bundle for troubleshooting |
viewcmd support –diagnose | viewcmd support --diagnose --component <component> | Run diagnostics on a specific component |
viewcmd support –status | viewcmd support --status | Display the status of support services |
This cheatsheet covers the most commonly used VMware Horizon CLI commands and options, helping you to manage pools, sessions, desktops, applications, users, configurations, logs, and perform troubleshooting effectively.