You can use ESXCLI as a vCLI command with connection options (see Connection Options for vCLI Host Management Commands) or in the ESXi shell.
2 Add a new NAS file system to the ESXi host. Specify the NAS server with --host, the volume to use for the mount with --volume-name, and the share name on the remote system to use for this NAS mount point with --share.You can use vicfg-nas as a vCLI command with connection options. See Connection Options for vCLI Host Management Commands.