O'Reilly logo

VMware vSphere 5.5 Cookbook by Abhilash G B

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Running CLI commands on target servers

In this recipe, we will learn how to issue commands on the added target vCenter Servers or ESXi hosts.

How to do it…

The following procedures explain how to set a target server and issue direct commands to it. We will discuss all three methods.

Method 1 – issuing commands on the default target

  1. Set the intended server as the default target for all commands.

    Command:

    vifptarget –s <servername>
    

    Example:

    vifptarget –s host001.vdescribed.lab
    vifptarget –s vcenterhost001.vdescribed.lab
    
  2. Similar to the CLI commands, you would run at an ESXi host's console.

    Example:

    esxcli system version get
    
    Method 1 – issuing commands on the default target

Method 2 – issuing commands by ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required