6.0

Table Of Contents
Getting Started with vSphere Command-Line Interfaces
40 VMware, Inc.
DCLI Syntax
EachDCLIcommandusesthesamesyntax.
ThecommandnameisfollowedbyDCLIconnectionandformattingoptions,eachprecededbya+sign.After
theDCLIoptionscomethenamespace,thecommand,andthecommandoptions,as inthefollowingexample:
dcli +[DCLI options] <namespace> [<namespace> ...] <cmd> --[cmd option] [option value]
DCLIoptions.Predefinedoptionsforconnectioninformationandformattingoptions.Alwayspreceded
bya+sign.
NotrequiredwhenyourunthecommandonthelocalhostattheWindowscommandpromptorthe
vCenterServerApplianceshell.
namespace.GroupsDCLIcommands.NamespacescorrespondtothevCloudSuiteSDKnamespaces.
command.Reportsonormodifiesstateonthesystem.
optionandvalue.Commandoptionandvaluepairsprecededbyminusminus(--).
Example
$dcli +server my_remote_vc +username user42 com vmware cis tagging tag list
DCLI Options
YoucanruneachDCLIcommandwithconnectionorformattingoptionsprecededbya+.
Formanyoftheoptions,youcaninsteadusevariables,discussedinTable 53,“VariablesSupportedbyDCLI,”
onpage 43.
dcli [+server SERVER_IP]
[+interactive]
[+prompt PROMPT]
[+ssl-cert-file SSL_CERT_FILE]
[+ssl-key-file SSL_KEY_FILE]
[+cacert-file CACERT_FILE]
[+more]
[+formatter {simple,table,xml,json,html,csv}]
[+loglevel {debug, info, warning, error}]
[+username USERNAME] [+password]
[+credstore-file CREDSTORE_FILE]
[+credstore-add | +credstore-remove | +credstore-list]
[+session-manager SESSION_MANAGER] [args [args ...]]
Theseoptionsallowyoutoprovidethefollowinginformation.Ifyouareenteringoptionsinteractively,tab
completionissupportedonLinuxsystems.Inallcases,youcanspecifyapartialoptionaslongastheoption
isnotambiguous.Forexample,+iindicatesinteractive,butyouhavetospecify,ata
minimum,+credstore-a
todisambiguatethatoption.
Table 5-1. DCLI Options
Option Description Default
server ThevCenterServersystemtowhichDCLIconnects. localhost
interactive RunsDCLIininteractiveshellmode,whichsupportstab
completionofcommands,options,andsomeoptionvalues.Italso
supportssavingthecommandhistoryacrossDCLIsessions.
InteractivemodeisfasterbecauseDCLIcachesthelistof
commandsavailableona
vCenterServersystem.
prompt Promptthattheinteractiveshelluses. dcli>
ssl-key-file
ssl-cert-file
cacert-file
IftheCLIclientconnectstoavCenterServersystemthatisusing
HTTPSconnections,youcanusetheseoptionstoprovideSSL
authenticationoptions.
more Displayspagewiseoutput.