vSphere PowerCLI Overview

VMware vSphere PowerCLI Overview

VMware vSphere PowerCLI contains snapins of cmdlets based on Microsoft PowerShell for automating vSphere and vCloud administration. It provides C# and PowerShell interfaces to VMware vSphere and vCloud APIs.

For more information about VMware vSphere PowerCLI and its components, go to the product documentation web page.

To get help, share best practices, or provide feedback to the VMware vSphere PowerCLI team, visit the VMware vSphere PowerCLI Community and the VMware vSphere PowerCLI Blog sites.

Support is available through http://www.vmware.com/support/ .

Send feedback | Technical Support | Copyright © 1998 - 2013 VMware, Inc. All rights reserved. Protected by one or more U.S. Patents listed at http://www.vmware.com/go/patents.


about_invalid_certificates - vSphere PowerCLI Cmdlets Reference

about_invalid_certificates

Topic

Handling Invalid Certificates

Short Description

When you connect to a vCenter Server or vCloud Director system, the server checks for valid certificates. If the certificate is not recognized, the Invalid Certificate prompt appears.

Long Description

When you connect to a vCenter Server or vCloud Director system, the server checks for valid certificates. If the certificate is not recognized, the Invalid Certificate prompt appears.

You can select one of the four options provided by the Invalid Certificate prompt:

- Deny - Cancel the server connection.

- Connect once - Establish the server connection.

- Add a permanent exception for the server_address/certificate pair - Persist the server certificate in the PowerCLI Trusted Certificate Store (PCTCS) for the current user and establish the server connection.

- Add a permanent exception for all users - Persist the server/certificate pair both in the current user PowerCLI Trusted Certificate Store (PCTCS) and in the All Users PCTCS and establish the server connection.

To set the default behavior of vSphere PowerCLI when no valid certificates are recognized, use the InvalidCertificateAction parameter of the Set-PowerCLIConfiguration cmdlet.

POWERCLI TRUSTED CERTIFICATE STORE (PSTCS)

The PowerCLI Trusted Certificate Store (SslCertificateExceptions.csv) is a CSV file with two columns: server_address and certificate_thumbprint. You can edit the (PSTCS) manually by using a text editor.

There are two PSTCS files:

- The current user PSTCS is located in the %APPDATA%\VMware\PowerCLI directory of the user.
- The All Users PSTCS is located in %ALL USERS APPDATA%\VMware\PowerCLI.

The local certificate storage file is purposely simple and you can easily import and export certificates from one machine to another or fill it with certificates automatically.

Send feedback to docfeedback@vmware.com | Copyright 1998 - 2013 VMware, Inc. All rights reserved. Protected by one or more U.S. Patents listed at http://www.vmware.com/go/patents.
Copyright © 1998 - 2013 VMware, Inc. All rights reserved.


about_licensedatamanager - VMware.VimAutomation.License Cmdlets Reference

about_licensedatamanager

Topic

LicenseDataManager

Short Description

LicenseDataManager is used to control how license data is associated with inventory nodes. Presence of such license data makes it possible to support automatic licensing.

Long Description

LicenseDataManager allows for extending the vCenter Server inventory with license data associated with inventory nodes. The license data consists of VMware licensing material and takes the form of a list of {license type id, license key} pairs. The inventory nodes which can be associated with license data are individual hosts or host containers, such as clusters, datacenters and datacenter folders. Presence of such license data makes it possible to support automatic licensing when hosts are added to a particular host container entity.

LicenseDataManager provides methods for retrieving, creating, modifying and removing associations between license data and inventory nodes.

TYPES

TYPE
VMware.VimAutomation.License.Types.LicenseKeyEntry

Description:
Represents a pair of license type id and a corresponding license key.

Property:
String TypeId - The license type id.

Property:
String LicenseKey - Licensing material.

TYPE
VMware.VimAutomation.License.Types.LicenseData

Description:
Contains a collection of VMware.VimAutomation.License.Types.LicenseKeyEntry objects. License data can be associated with inventory nodes.

Property:
VMware.VimAutomation.License.Types.LicenseKeyEntry[] LicenseKeys - Array of (license type id, license key) pairs.

TYPE
VMware.VimAutomation.License.Types.EntityLicenseData

Description:
Represents an association between inventory node and license data.

Property:
VMware.Vim.ManagedObjectReference Entity - The inventory node.

Property:
VMware.VimAutomation.License.Types.LicenseData LicenseData - The license data.

TYPE
VMware.VimAutomation.License.Types.LicenseDataManager

Description:
Provides methods for retrieving, creating, modifying and removing associations between license data and inventory nodes.

Method:
VMware.VimAutomation.License.Types.EntityLicenseData[] QueryEntityLicenseData() - Retrieves all entity<->license data associations.

Method:
VMware.VimAutomation.License.Types.LicenseData QueryAssociatedLicenseData(VMware.Vim.ManagedObjectReference entity) - Retrieves the license data associated with the given inventory entity

Method:
System.Void UpdateAssociatedLicenseData(VMware.Vim.ManagedObjectReference entity, VMware.VimAutomation.License.Types.LicenseData licenseData) - Overwrites the license data associated with the given inventory entity.

Method:
VMware.VimAutomation.License.Types.LicenseData QueryEffectiveLicenseData(VMware.Vim.ManagedObjectReference entity) - Retrieves the merged license data associated with the given entity and its host container predecessors (in the context of the inventory).

Method:
VMware.VimAutomation.License.Types.LicenseData ApplyAssociatedLicenseData(VMware.Vim.ManagedObjectReference entity) - Applies associated license data to an entity. The license data to apply is derived using the same rules as in QueryEffectiveLicenseData(VMware.Vim.ManagedObjectReference entity). In case of host container entity, this method finds all hosts below the specified container (in the context of the inventory) and applies the license data to each of the hosts.

Send feedback to docfeedback@vmware.com | Copyright 1998 - 2011 VMware, Inc. All rights reserved. Protected by one or more U.S. Patents listed at http://www.vmware.com/go/patents.


about_obn - vSphere PowerCLI Cmdlets Reference

about_obn

Topic

Object-by-Name (OBN)

Short Description

A feature for specifying an object by its name. Instead of passing an object to a cmdlet parameter through a pipeline or by a variable, users can directly assign to the parameter the object name. A lot of PowerCLI cmdlets parameters support OBN.

Long Description

The Object-by-Name (OBN) selection is a feature for specifying an object by its name. Instead of passing an object to a cmdlet parameter through a pipeline or a variable, users can
directly assign to the parameter the object name. A lot of PowerCLI cmdlets parameters support OBN.

Example 1: The following three lines are interchangeable:

1. Remove-VM -VM "Win XP SP2"

2. Get-VM -Name "Win XP SP2" | Remove-VM

3. Remove-VM -VM (Get-VM -Name "Win XP SP2")

If one of the provided object names is not recognized, a non-terminating error is generated and the cmdlet runs ignoring the invalid name. This is called an "OBN failure".

Example 2: An "OBN Failure".

Set-VM -VM "VM1", "VM2", "VM3" -Server $server1, $server2 -MemoryGB 2

If the VM2 virtual machine does not exist on either of the specified servers, a non-terminating error is thrown and the command runs only on the VM1 and VM3 virtual machines.

OBN AND WILDCARDS

When specifying objects by name, you can use the standard PowerShell wildcards.

DETERMINING THE OBN SERVER LIST

You can use the Server parameter of a cmdlet to specify the servers from which to retrieve the objects specified by name. In such cases, the Server parameter can be set only if the parameter that takes an object name is specified.

Example 3: Using OBN and the cmdlets Server parameter.

Stop-VM -Server $svr1

To make the upper command work, you must provide at least one virtual machine name to the cmdlet VM parameter.

Stop-VM -Server $svr1 -VM "Win XP SP2"

If the Server parameter is not specified, OBN uses the servers associated with the objects passed as arguments to the other cmdlet parameters. If the arguments objects are associated with different servers, OBN is aborted for the current call and a non-terminating error is generated.

The Server parameter also supports OBN. You can specify servers either by their corresponding VIServer objects, or by their names.

Example 4: Using OBN with a server associated with the specified objects.

Move-VM -VM "Win XP SP2" -VMHost $myHost

The upper command will work only if the Win XP SP2 virtual machine and the $myHost host are associated with one and the same server. Otherwise, an error is generated.

If there are no servers specified by the Server parameter or associated with the provided objects, then the default server is used for OBN.

Example 5: Using OBN with the default server.

Move-VM -VM "Win XP SP2" -VMHost $myHost

If no server is associated with the specified objects, then the default server is used for OBN.

If a cmdlet parameter receives both managed objects and names, then the Server parameter applies only to the names and the managed objects are not filtered based on the servers.

If all cmdlet parameters receive only objects, and if a server list is specified, then the server list is ignored.

OBN ARGUMENT MULTIPLICITY AND PARAMETER MULTIPLICITY

After the object selection by name is performed, the returned objects are passed to the parameter together with the objects specified directly, if any, and the process continues.

Remove-VM -VM $vm1, $vm2, "Win XP SP2", $vm3, "linux*"

...is equivalent to...

Remove-VM -VM $vm1, $vm2, <the one or more objects named "Win XP SP2">, $vm3, <the zero or more objects, whose names start with "linux">

If a parameter receives multiple names specified by OBN as a part of its argument, and if the OBN for two of these names retrieves duplicate objects, these duplicates are not eliminated and the cmdlet works as if invoked with duplicate objects.

If the OBN selection returns no objects for a parameter that is specified as mandatory, or returns more than one object for a parameter that takes a single argument, an error is generated.

Send feedback to docfeedback@vmware.com | Copyright 1998 - 2013 VMware, Inc. All rights reserved. Protected by one or more U.S. Patents listed at http://www.vmware.com/go/patents.


about_powercli_objects - vSphere PowerCLI Cmdlets Reference

about_powercli_objects

Topic

VMware vSphere PowerCLI Objects

Short Description

Describes some importatant characteristics of the VMware vSphere PowerCLI objects.

Long Description

For their input and output, the VMware vSphere PowerCLI cmdlets use a set of .NET types that reside in the VMware.VimAutomation.ViCore.Types namespace. For example, the VMware.VimAutomation.ViCore.Types.V1.Inventory.VirtualMachine type describes virtual machine objects.

Each PowerCLI object represents a snapshot of the initial state of a server-side object by the time the PowerCLI object is created. Note that when the server-side object state changes, the state of the PowerCLI object is not automatically updated. To obtain the latest version, you have to retrieve the PowerCLI object from the server again.

This behavior of the PowerCLI objects has some implications illustrated by the following example scenarios.

Scenario 1:

1. User A obtains an OSCustomizationSpec object ( and stores it in a PowerShell variable).
2. User B runs the Set-OSCustomizationSpec cmdlet to change the Administrator's Password in the OS customization specification.
3. User A runs the Set-VM cmdlet providing the OSCustomizationSpec object obtained in step 1 as a parameter input.

In result, User A unsuccessfully tries to perform the virtual machine OS customization, without knowing that the AdminPassword property of the OSCustomizationSpec server-side object has been changed by User B.

Scenario 2:

1. User A obtains a VirtualMachine object (and stores it in a PowerShell variable). The virtual machine is powered off.
2. User B powers the virtual machine on.
3. The PowerState property of the VirtualMachine object stored by User A is not updated and its value is PowerdOff. User A tries to power on the virtual machine using the Start-VM cmdlet.

In result, Start-VM reports an error because the virtual machine is already powered on by User B.

Another important case is working with Task objects. The Get-Task cmdlet returns a Task object and the state of this object is a snapshot of the initial server-side task state. Once you save the retrieved Task object in a PowerShell variable, its State property is never updated with the current state of the task on the server. To check if the server-side task has changed its state, run the Wait-Task cmdlet using the Task object variable as a parameter.

In all cases, when you run a cmdlet it always retrieves and uses the latest version of the object properties for the specified parameters.

PROPERTIES LOADED ON-DEMAND
Some of the properties of the PowerCLI objects return other PowerCLI objects. Usually, when you first call such a property, it returns the output object and caches it for a faster return. Thus, every subsequent call to this property returns the cached object. However, every time when you retrieve an object through a cmdlet, the cached values of its properties are erased and the on-demand retrieving of the properties begins again.

Circular References

To address new properties of objects returned by PowerCLI cmdlets, PowerCLI introduces circular references.
For example, the VirtualMachine object has a property named VMResourceConfiguration that is of type VMResourceConfiguration. The VMResourceConfiguration type has a property named VM that is of type VirtualMachine.
In this case, the following expression is true:

$vm.VMResourceConfiguration.VM.Uid -eq $vm.Uid

The circular references should be taken into account when you use the Format-Custom cmdlet. By default, the Format-Custom cmdlet makes a full traversal of an object and its references, and this might cause an infinite loop (for example, Get-VM | Format-Custom).

Send feedback to docfeedback@vmware.com | Copyright 1998 - 2013 VMware, Inc. All rights reserved. Protected by one or more U.S. Patents listed at http://www.vmware.com/go/patents.


about_runasync - vSphere PowerCLI Cmdlets Reference

about_runasync

Topic

Using the RunAsync Parameter

Short Description

Specifying the RunAsync parameter indicates that the command is invoked asynchronously. In this mode, the command returns immediately without waiting for the task to complete and the output is a Task object.

Long Description

By default, vSphere PowerCLI cmdlets return only after completion of the requested tasks. If you want the cmdlet to return immediately, without waiting for the tasks to complete, you can specify the RunAsync parameter. In this case, the cmdlet returns Task objects instead of its usual output.

The Status property of a returned Task object contains a snapshot of the task initial state. This state is not automatically updated and has one of the following values - Error, Queued, Running, and Success. To refresh the task status, pass the Task object to the Get-Task cmdlet. To interrupt a running task, use the Stop-Task cmdlet. If you want to observe the progress of a running task and wait for its completion before initiating other commands, use the Wait-Task cmdlet.

Example 1: Running Remove-VM With and Without the RunAsync Parameter.

Remove-VM $vmList

//The command returns without an output when all virtual machines stored in the $vmList variable are removed (simultaneously or not).

Remove-VM $vmList -RunAsync

//The command returns immediately and the output is one or more Task objects.

In vSphere PowerCLI, the RunAsync parameter affects only the cmdlets invocation and does not control whether the initiated tasks run consecutively or in parallel. For example, the virtual machines passed to the Remove-VM cmdlet might be removed simultaneously or consecutively depending on the vSphere PowerCLI internal design.

To make sure that tasks initiated by a cmdlet do not run in parallel, run the cmdlet in a loop, each time applying it to a single object.

Example 2: Removing Virtual Machines Consecutively.

foreach ($vm in $vmList)
{
Remove-VM $vm1
}

Send feedback to docfeedback@vmware.com | Copyright 1998 - 2013 VMware, Inc. All rights reserved. Protected by one or more U.S. Patents listed at http://www.vmware.com/go/patents.


about_server_authentication - vSphere PowerCLI Cmdlets Reference

about_server_authentication

Topic

Authenticating with a vSphere or vCloud server.

Short Description

When connecting to a vSphere or vCloud server, you need to authenticate by providing valid credentials. PowerCLI follows a certain logic for authenticating a server session. When you connect to a server with the Connect-VIServer or Connect-CIServer cmdlets, you can provide either a user name and password through the User and Password parameters, or a PSCredential object through the Credential parameter. If you provide both User/Password and Credential, the cmdlet accepts only the value of the Credential parameter and discards the User and Password parameters.

LONG DESCRIPTION
When connecting to a vSphere or vCloud server, you need to authenticate by providing valid credentials. PowerCLI follows a certain logic for authenticating a server session. When you connect to a server with the Connect-VIServer or Connect-CIServer cmdlets, you can provide either a user name and password through the User and Password parameters, or a PSCredential object through the Credential parameter. If you provide both User/Password and Credential, the cmdlet accepts only the value of the Credential parameter and discards the User and Password parameters.

AUTHENTICATING USING A PSCREDENTIAL OBJECT

When you run the Connect-VIServer or Connect-CIServer to establish a server connection, you can use the Credential parameter to provide a PSCredential object that contains credentials for the specified server. If the provided credentials are not valid, the cmdlets show an error message.

AUTHENTICATING THROUGH THE USER AND PASSWORD PARAMETERS

Instead of providing a PSCredential object, you can directly specify a user name and password through the User and Password parameters of Connect-VIServer or Connect-CIServer.

If you specify only the User parameter without providing a value to Password, the cmdlet searches the credential store for credentials that correspond to the specified server and user. If such a credential is found, the cmdlet uses it to authenticate with the server. If no such a credential is found, you are prompted to provide credentials.

If you run Connect-VIServer or Connect-CIServer without specifying the User, Password, or Credential parameters, the cmdlet searches the credential store for available credentials for the specified server. If only one credential object is found, the cmdlet uses it to authenticate with the server. If none or more than one PSCredential objects are found, the cmdlet tries to perform a SSPI authentication. If the SSPI authentication fails, the cmdlet prompts you to provide credentials.

Note: If PowerCLI runs in a non-interactive mode, Connect-VIServer and Connect-CIServer will not prompt you for new credentials after the server authentication fails. To try to authenticate using new credentials, run the cmdlet again.

Send feedback to docfeedback@vmware.com | Copyright 1998 - 2013 VMware, Inc. All rights reserved. Protected by one or more U.S. Patents listed at http://www.vmware.com/go/patents.


about_uid - vSphere PowerCLI Cmdlets Reference

about_uid

Topic

Unique identifiers for PowerCLI objects (Uid)

Short Description

You can uniquely identify a PowerCLI object on a server or across multiple servers by specifying its Uid.

A Uid is a string that consists of one or more key-value pairs separated by a slash ("/"). The key and the value within a pair are separated by an equal sign ("=").

For example, the Uid if a virtual CD Drive might be "/VIServer=powershell@vc41-ga.pc:443/VirtualMachine=VirtualMachine-vm-88/CDDrive=3001/".

To retrieve the Uid of an object, use its Uid property.
For example:
$vm = Get-VM -Name aaa
$vm.Uid

To ease work with Uids, there is a global Powershell variable $UidUtil that provides methods for processing Uids.

LONG DESCRIPTION
Although the name of an object is unique within a server, PowerCLI allows you to run cmdlets on multiple servers and this can lead to ambiguity. This means that the name or the short ID you have provided to a cmdlet might correspond to multiple objects on different servers. To avoid this, you can identify a PowerCLI object on a server or across multiple servers by specifying its Uid (unique identifier). The Uid contains information about the target server.

A Uid is a string that consists of one or more key-value pairs separated by a slash ("/"). The key and the value within a pair are separated by an equal sign ("="). The first key-value pair represents the server connection. The objects which have no server-side analog and only live in the local memory start with "/Local=/".
A Uid is said to be parent of another Uid if it can be obtained from the child Uid by removing one or more key-value pairs from the end of the child Uid.

PROCESSING UIDS

The global variable $UidUtil provides the following methods for processing UIds:

bool IsUid(string str) - Checks if the specified string is a valid Uid.

string Append(string uid, string key, string value) - Appends the specified key and value to the specified Uid to form a child Uid. Any special characters will be encoded (in the same way as EncodeValue method).

string GetKey(string uid) - Retrieves the key of the rightmost Uid element.

string GetValue(string uid) - Retrieves the value of the rightmost Uid element.

string GetValue(string uid, string key) - Retrieves the value of the leftmost Uid element which has the specified key. If the key is not present ? returns $null.

string EncodeValue(string plainString) - Encodes a string so that it can be used as a value of a Uid element (escapes delimiters).

string DecodeValue(string encodedString) - Reverses the effect of Encode.

string GetParentUid(string uid) - Returns the parent Uid of 'uid'.
Example:
if $uid is equal to:
"/VIServer=powershell@vc41-ga.pc:443/VirtualMachine=VirtualMachine-vm-88/CDDrive=3001/"

Then $UidUtil.GetParentUid($uid) will return:
"/VIServer=powershell@vc41-ga.pc:443/VirtualMachine=VirtualMachine-vm-88/"

string GetParentUid(string uid, string parentKey) - Returns the shortest parent Uid of 'uid' which has a rightmost Uid element with the specified key. If the key is not present ? returns $null.
Example:
if $uid is equal to:
"/VIServer=powershell@vc41-ga.pc:443/VirtualMachine=VirtualMachine-vm-88/CDDrive=3001/"

Then $UidUtil.GetParentUid($uid, "VirtualMachine") will return:
"/VIServer=powershell@vc41-ga.pc:443/VirtualMachine=VirtualMachine-vm-88/"

And $UidUtil.GetParentUid($uid, "VIServer") will return:
"/VIServer=powershell@vc41-ga.pc:443/"

string GetConnectionUid(string uid) - Gets the Uid which represents the connection for this object. The connection Uid element is the first Uid element.

bool IsOnConnection(string uid, string connectionKey, string connectionValue) - Reports whether uid belongs to the specified connection.

void GetHelp() ? Displays an about_ article with help information about the Uid concept and description of the methods? functionality.

The $UidUtil Powershell variable also exposes the following properties:

string ElementDelimiter - The delimiter used to separate the different elements of a Uid
string KeyValueDelimiter - The delimiter used to separate the key and the value of a Uid element

Send feedback to docfeedback@vmware.com | Copyright 1998 - 2013 VMware, Inc. All rights reserved. Protected by one or more U.S. Patents listed at http://www.vmware.com/go/patents.


about_vimdatastore - vSphere PowerCLI Cmdlets Reference

about_vimdatastore

Topic

Datastore Provider (VimDatastore)

Short Description

The Datastore Provider (VimDatastore) provides filesystem-style view and access to the contents of datastores. The items in a datastore are files that contain configuration, virtual disk, and the other data associated with a virtual machine. All file operations are case-sensitive.

Long Description

The Datastore Provider (VimDatastore) provides filesystem-style view and access to the contents of datastores. The items in a datastore are files that contain configuration, virtual disk, and the other data associated with a virtual machine. All file operations are case-sensitive.

Note that on VirtualCenter 2.0 and ESX 3.0 Datastore Provider supports only browsing and deleting items. On VirtualCenter 2.5 and ESX 3.5 all file operations are available, including moving, copying, and renaming items.

DEFAULT DATASTORE DRIVES

When you connect to a server with Connect-VIServer, the cmdlet builds two default datastore drives. You can use the default drives or map custom drives based on the default ones.

The first default drive is called "vmstores" and shows all datastores available on all vSphere servers connected within the current vSphere PowerCLI session. The hierarchy of the "vmstore" drive looks like that:

1. vmstores - a common root for all connected vSphere servers
2. <vSphere server name>
3. Objects as they appear in the Datastores view of vClient
4. Objects as they appear in the Datastores Browser component of vClient

For example, the following is a valid "vmstores" datastore path:

vmstores:\ViServer1\Datacenter1\Datastore1\My WinXP\My WinXP.vmx

The second drive is called "vmstore" and displays the datastores available only on the last connected vSphere server. The root of the "vmstore" drive is the last connected vSphere server. The hierarchy of the "vmstore" drive looks like that:

1. <vSphere server name>
2. Objects as they appear in the Datastores view of vClient
3. Objects as they appear in the Datastores Browser component of vClient

For example, the following is a valid "vmstore" datastore path:

vmstore:\Datacenter1\Datastore1\My WinXP\My WinXP.vmx

The place where the Datastores view is glued to the Datastore Browser hierarchy is the datastore object (as part of the Datastores view) and the datastore root folder (as part of Datastore Browser hierarchy). Both are represented by the same provider location and a Datastore typed object is exposed at it. However the location also supports datastore folder-specific operations such as receiving datastore files.

CUSTOM DATASTORE DRIVES

For their convenience, users can create custom datastore drives from existing paths. To create a custom datastore drive, use using the New-PSDrive cmdlet.

Example 1: Creating custom datastore drive with different roots.

New-PSDrive ?Provider VIM ?Name ds_a ?Root vmstore:\Datacenter1

New-PSDrive ?Provider VIM ?Name ds_ab ?Root vmstore:\Datacenter1\Datastore1

New-PSDrive ?Provider VIM ?Name ds_abc ?Root vmstore:\Datacenter1\Datastore1\DsFolder1

A different way to create a datastore drive is to use the New-DatastoreDrive command, which is an alias of New-PSDrive. It creates a new datastore drive using the Name and Datastore parameters. For example:

Example 2: Creating a datastore drive using the New-DatastoreDrive command:

Get-Datastore Storage1 | New-DatastoreDrive -Name ds

To access the new drive, run:

cd ds:

To list the drive content, use:

dir

BASIC OPERATIONS WITH THE DATASTORE PROVIDER

You can use the Datastore Provider to copy, rename, delete files, and move files between datastores and local directories.

Example 3: Renaming a file in a datastore drive.

cd VirtualMachines\XPVirtualMachine

ren vmware-3.log vmware-3old.log

Example 4: Delete a file.

del ds:\VirtualMachines\XPVirtualMachine\vmware-2.log

Example 5: Copying a file to another datastore location:

1. Create a new folder:
mkdir -Path ds:\VirtualMachines -XPUpdates -Type Folder

2. Copy the file to the new directory:
copy ds:\VirtualMachines\XPVirtualMachine\vmware-3old.log ds:\VirtualMachines\XPUpdates\vmware-3.log

Example 6: Copy a file from the datastore drive to a local directory.
Copy-DatastoreItem ds:\VirtualMachines\XPVirtualMachine\vmware-3.log C:\Temp\vmware-3.log

Example 7: Copy a file from the local machine to a location on the datastore drive.
Copy-DatastoreItem C:\Temp\vmware-3.log ds:\VirtualMachines\XPVirtualMachine\vmware-3new.log

Send feedback to docfeedback@vmware.com | Copyright 1998 - 2013 VMware, Inc. All rights reserved. Protected by one or more U.S. Patents listed at http://www.vmware.com/go/patents.


Add-CIDatastore - vCloud Snapin Cmdlets Reference

Add-CIDatastore

Synopsis

This cmdlet adds one or more datastores to a provider virtual datacenter (vDC).

Syntax

Add-CIDatastore -Datastore <Datastore[]> [-ProviderVdc] <ProviderVdc> [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Get-CIDatastore
Online version

Detailed Description

This cmdlet adds one or more datastores from a vCenter Server system to a provider virtual datacenter (vDC). Note: This cmdlet is only available to Provider Administrators.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
ProviderVdc | ProviderVdc | Specifies the provider vDC to which you want to add the datastore. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Datastore | Datastore[] | Specifies one or more datastores from a vCenter Server system that you want to add to a provider vDC. | true | true (ByValue) |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

One or more CIDatastore objects

Notes

You can run this cmdlet only against vCloud Director 1.5.x environments.

Examples

-------------- Example 1 --------------

Get-Datastore -Name *cloud* | Add-CIDatastore -ProviderVdc 'MyProviderVdc'

Adds all datastores with names that contain "cloud" to the specified provider vDC.


Add-DeployRule - vSphere Auto Deploy Reference

Add-DeployRule

Synopsis

Adds one or more rules to the rule set.

Syntax

Add-DeployRule [-DeployRule] <DeployRule[]> [[-At] <UInt32>] [-NoActivate] [<CommonParameters>]

Related Commands

Get-DeployRule
New-DeployRule
Remove-DeployRule

Detailed Description

Adds one or more rules to the working rule set and then activates the working rule set. The rule can be added at a specific index with the "-At" option, otherwise it is added to the end. If you plan on making several changes to the rule set, you can pass the "-NoActivate" option to avoid activing the rule set after every change.

A rule set is an ordered list of rules that determines what items, such as a host profile, should be associated with a host. For each type of item, AutoDeploy will find a matching rule and select the item specified in that rule. If more than one rule matches a host and the rules contain the same type of item, the item from the rule that comes first in the rule set will be used. This behaviour makes it possible to write a single generic rule that matches many hosts and then write more specific rules to override settings for specialized hosts.

The working rule set can be used to test out changes to the rule set against hosts in vCenter Server. Once you are satisfied with the rules, you can activate the working rule set to control how any new hosts that are unknown to vCenter Server will be deployed.

You must have the "AutoDeploy.RuleSet.Edit" privilege on the root folder of vCenter Server to use this cmdlet.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
DeployRule | DeployRule[] | Rule(s) to add to the rule set. You can pass a DeployRule object here or the name of the rule. | true | true (ByValue) |
At | UInt32 | Index in the rule set where you want to add the rule. The placement of the rule in the set determines its priority. Lower indexes have a higher priority. | false | false |
NoActivate | SwitchParameter | Specify this parameter to add the rule to the working rule set but not to the active rule set. By default, the working rule set is activated after the change. | false | false |

Return Type

VMware.DeployAutomation.Types.DeployRuleSet

Notes

Examples

-------------- Example 1 --------------

C:\PS> Get-DeployRule "testrule" | Add-DeployRule

Get a rule named "testrule" and add it to the end of the rule set.

-------------- Example 2 --------------

C:\PS> Add-DeployRule testrule -At 0

Add a rule named "testrule" to the beginning of the rule set.

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Add-EsxSoftwareDepot - vSphere Imagebuilder Reference

Add-EsxSoftwareDepot

Synopsis

Syntax

Add-EsxSoftwareDepot [-DepotUrl] <String[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Related Commands

Detailed Description

Adds an ESX software depot or offline depot ZIP file to the current PowerCLI session. Use this cmdlet right after you start Image Builder by adding the Image Builder snap-in. The cmdlet imports metadata from the specified depots. You can then create new image profiles and generate ISOs from the image profiles and VIBs in the depots. The metadata from the depots is kept in memory until the PowerCLI session ends. When you run the cmdlet, Image Builder downloads and parses the metadata from the depot and analyzes the VIBs for dependencies.

The depot will be added to the list of depots maintained in the implicit session variable $DefaultSoftwareDepots that stores all software depots (similar to $DefaultVIServers).

If the software depot was previously added, metadata from the depot will be downloaded again.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
DepotUrl | String[] | Either a string or an array of strings; each string represents the URL of a depot or a file path to an offline depot ZIP file. The offline depot ZIP file must have the .zip extension. | true | true (ByValue, ByPropertyName) |
WarningAction | ActionPreference |  | false | false |
WarningVariable | String |  | false | false |

Return Type

Notes

Examples

---------- Example 1 ----------

Add-EsxSoftwareDepot http://www.vmware.com/go/ESXi/patches/

Connect to a depot.

---------- Example 2 ----------

$depot = Add-EsxSoftwareDepot http://www.vmware.com/go/ESXi/patches/

Connect to a depot, saving it to a variable.

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Add-EsxSoftwarePackage - vSphere Imagebuilder Reference

Add-EsxSoftwarePackage

Synopsis

Syntax

Add-EsxSoftwarePackage [-ImageProfile] <ImageProfile> [-SoftwarePackage] <SoftwarePackage[]> [-Force] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Detailed Description

Adds new VIBs to an image profile or updates existing VIBs in an image profile. For each package, if it is newer or older than an existing package in the profile, the existing package will be replaced. Image Builder performs all image profile validation tests on the modified image profile.

The output of this cmdlet may be piped into any other cmdlet taking image profiles as input.

Note that the image profile object that is passed in will have its VibList modified. Please see the New-EsxImageProfile cmdlet for details about persistence of image profiles.

Modification is not possible if the ReadOnly property of an ImageProfile is true.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
ImageProfile | ImageProfile | (pipeline input, prompt) Image profile to edit. Takes one of the following forms: *Name of an image profile, as displayed in the Name column of Get-EsxImageProfile, or the Name property of any ImageProfile object *ImageProfile object | true | true (ByValue, ByPropertyName) |
SoftwarePackage | SoftwarePackage[] | (pipeline input, prompt) List of software packages to add to the profile. Takes one of the following forms: *Name of a VIB, as displayed in the Name column of Get-EsxSoftwarePackage, or the Name property of any SoftwarePackage object. Image Builder selects the highest available version of the named package. *"<Name> <Version>", for specifying a specific version of a VIB. *SoftwarePackage object *GUID of the VIB (from the Guid property of a SoftwarePackage object) *A list containing a mix of any of the above If more than one vendor provides a package with the same name, then a non-terminating error results and the cmdlet skips that package. | true | true (ByValue, ByPropertyName) |
Confirm | SwitchParameter |  | false | false |
Force | SwitchParameter | Installs packages that break extensibility rules such as standard file path. Also bypasses dependency checks on packages. Use this option with care. Because it bypasses standard validation checks, an invalid image profile might result. | false | false |
WarningAction | ActionPreference |  | false | false |
WarningVariable | String |  | false | false |
WhatIf | SwitchParameter |  | false | false |

Return Type

Notes

Examples

---------- Example 1 ----------

Add-EsxSoftwarePackage -ImageProfile "My custom profile" -SoftwarePackage net-bnx2

Add a package by name to an image profile:

---------- Example 2 ----------

Add-EsxSoftwarePackage -ImageProfile "My custom profile" -SoftwarePackage "net-bnx2 1.6.7-0.1OEM1"

Add a package of a specific name and version:

---------- Example 3 ----------

New-EsxImageProfile -CloneProfile "ESX-5.0-234567-standard" -Name "My custom profile" | \
Add-EsxSoftwarePackage net-bnx2

Clone an image profile, then add a package by name, in one line using pipelining:

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Add-PassthroughDevice - vSphere PowerCLI Cmdlets Reference

Add-PassthroughDevice

Synopsis

This cmdlet attaches pass-through devices to the specified virtual machine.

Syntax

Add-PassthroughDevice [-VM] <VirtualMachine[]> [-PassthroughDevice] <PassThroughDevice[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-PassthroughDevice
Remove-PassthroughDevice

Detailed Description

This cmdlet attaches pass-through devices to the specified virtual machine. Note that the value of the ControllerKey property of the returned device might not be up to date, if a new SCSI controller creation process is running in the background.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machine to which you want to attach the passthrough devices. | true | true (ByValue) |
PassthroughDevice | PassThroughDevice[] | Specifies the passthrough devices you want to add to the virtual machine. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more newly added PassthroughDevice objects

Notes

Passing PciPassthroughDevice objects to the Device parameter is supported o nly on servers that are vCenter Server 4.0 and ESX 4.0, and later.

Examples

-------------- Example 1 --------------

$scsiDeviceList = Get-PassthroughDevice -VMHost Host -Type Scsi

Add-PassthroughDevice -VM $vm -PassthroughDevice $scsiDeviceList[0]

Adds the first SCSI passthrough device of the Host host to the $vm virtual machine.


Add-VDSwitchPhysicalNetworkAdapter - vSphere PowerCLI Cmdlets Reference

Add-VDSwitchPhysicalNetworkAdapter

Synopsis

This cmdlet adds host physical network adapters to a vSphere distributed switch.

Syntax

Add-VDSwitchPhysicalNetworkAdapter [-VMHostPhysicalNic] <PhysicalNic[]> [-DistributedSwitch] <DistributedSwitch> [-VirtualNicPortgroup <VDPortgroup[]>] [-VMHostVirtualNic <HostVirtualNic[]>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Remove-VDSwitchPhysicalNetworkAdapter

Detailed Description

This cmdlet adds host physical network adapters to a vSphere distributed switch.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHostPhysicalNic | PhysicalNic[] | Specifies the host physical network adapters that you want to add or migrate to the vSphere distributed switch. | true | false |
DistributedSwitch | DistributedSwitch | Specifies the vSphere distributed switch to which you want to add the host physical network adapter. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VirtualNicPortgroup | VDPortgroup[] | Specifies the port groups to which to attach the host virtual network adapters. Accepts either one port group, or the same number of port groups as the number of virtual network adapters specified. If one port group is specified, all adapters are attached to that port group. If the same number of port groups as the number of virtual network adapters are specified, the first adapter is attached to the first port group, the second adapter - to the second port group, and so on. | false | false |
VMHostVirtualNic | HostVirtualNic[] | Specifies the host virtual network adapters to be migrated along with the physical adapter, so that their connectivity is preserved. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

$vmhostNetworkAdapter = Get-VMHost "MyVMHost" | Get-VMHostNetworkAdapter -Physical -Name vmnic2
Get-VDSwitch "MyVDSwitch" | Add-VDSwitchPhysicalNetworkAdapter -VMHostNetworkAdapter $vmhostNetworkAdapter

Retrieves the specified physical network adapter from the specified host and adds it to the specified vSphere distributed switch.


Add-VDSwitchVMHost - vSphere PowerCLI Cmdlets Reference

Add-VDSwitchVMHost

Synopsis

This cmdlet adds hosts to the specified vSphere distributed switch.

Syntax

Add-VDSwitchVMHost -VDSwitch <VDSwitch> -VMHost <VMHost[]> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Remove-VDSwitchVMHost

Detailed Description

This cmdlet adds hosts to the specified vSphere distributed switch. The physical network adapters of the hosts are not connected to the vSphere distributed switch.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VDSwitch | VDSwitch | Specifies the vSphere distributed switch to which you want to add one or more hosts. | true | true (ByValue) |
VMHost | VMHost[] | Specifies the hosts that you want to add to the vSphere distributed switch. | true | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitch -Name "MyDistributedSwitch" | Add-VDSwitchVMHost -VMHost "VMHost1", "VMHost2"

Adds two hosts to the specified vSphere distributed switch.


Add-VirtualSwitchPhysicalNetworkAdapter - vSphere PowerCLI Cmdlets Reference

Add-VirtualSwitchPhysicalNetworkAdapter

Synopsis

This cmdlet adds a host physical NIC to a standard virtual switch.

Syntax

Add-VirtualSwitchPhysicalNetworkAdapter [-VMHostPhysicalNic] <PhysicalNic[]> [-VirtualSwitch] <VirtualSwitch> [-VirtualNicPortgroup <VirtualPortGroup[]>] [-VMHostVirtualNic <HostVirtualNic[]>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Remove-VirtualSwitchPhysicalNetworkAdapter

Detailed Description

This cmdlet adds a host physical NIC to a standard virtual switch. If VMHost virtual network adapters are specified, the cmdlet migrates them to the virtual switch as well.

Note: If VMHost virtual network adapters are specified, the cmdlet migrates them to the respective port groups or creates new ones if VirtualNicPortgroup is not specified.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHostPhysicalNic | PhysicalNic[] | Specifies the host physical network adapters that you want to add or migrate to the standard virtual switch. | true | false |
VirtualSwitch | VirtualSwitch | Specifies the standard virtual switch to which you want to migrate physical or virtual network adapters. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VirtualNicPortgroup | VirtualPortGroup[] | Specifies the port groups to which to attach the host virtual network adapters. Accepts the same number of port groups as the number of virtual network adapters specified. The first adapter is attached to the first port group, the second adapter - to the second port group, and so on. | false | false |
VMHostVirtualNic | HostVirtualNic[] | Specifies the host virtual network adapters to be migrated along with the physical adapter, so that their connectivity is preserved. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

$myVMHostNetworkAdapter = Get-VMhost "MyVMHost" | Get-VMHostNetworkAdapter -Physical -Name vmnic2
Get-VirtualSwitch "MyVirtualSwitch" | Add-VirtualSwitchPhysicalNetworkAdapter -VMHostPhysicalNic $myVMHostNetworkAdapter

Adds a VMHost physical network adapter to the specified distributed switch.

-------------- Example 2 --------------

$myVMHost = Get-VMHost 'MyVMHost'
$myVDSwitch = Get-VDSwitch 'MyVDSwitch'
$physicalNic = Get-VMHostNetworkApter -VMHost $myVMHost -DistrubutedSwitch $myVDSwitch -Name 'vmnic0'
$virtualNic = Get-VMHostNetworkApter -VMHost $myVMHost -DistrubutedSwitch $myVDSwitch -Name 'vmk0'
$myStandardSwitch = Get-VirtualSwitch -VMHost $myVMHost -Name 'vSwitch0'
Add-VirtualSwitchPhysicalNetworkAdapter -VirtualSwitch $myStandardSwitch -VMHostPhysicalNic $physicalNic -VMHostVirtualNic $virtualNic

Migrates VMHost physical and virtual network adapters from a distributed virtual switch to a standard virtual switch.


Add-VMHost - vSphere PowerCLI Cmdlets Reference

Add-VMHost

Synopsis

This cmdlet adds a host to be managed by a vCenter Server system.

Syntax

Add-VMHost [-Name] <String> [-Port <Int32>] [-Location] <VIContainer> [-Credential <PSCredential>] [-User <String>] [-Password <String>] [-Force] [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHost
Move-VMHost
Remove-VMHost
Restart-VMHost
Set-VMHost
Start-VMHost
Stop-VMHost
Suspend-VMHost

Detailed Description

This cmdlet adds a host to be managed by a vCenter Server system. The host is added to the datacenter or folder specified by the Location parameter. One of the User/Password and Credential parameters must be provided in order to authenticate with the host. If both are specified, the Credential parameter is used and the User and Password parameters are ignored.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies the name of the host you want to add to a vCenter Server system. | true | false |
Location | VIContainer | Specifies a datacenter or folder where you want to place the host. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Credential | PSCredential | Specifies a PSCredential object that contains credentials for authenticating with the virtual machine host. | false | false |
Force | SwitchParameter | Indicates that the cmdlet runs even if the authenticity of the host SSL certificate cannot be verified. | false | false |
Password | String | Specifies the password you want to use for authenticating with the host. | false | false |
Port | Int32 | Specifies the port on the host you want to use for the connection. | false | false | For ESX 2.x hosts this is the authd port (902 by default). For ESX 3.x and above this is the https port (443 by default).
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
User | String | Specifies the user name you want to use for authenticating with the host. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly added VMHost object

Notes

Add-VMHost works only if there is a connection to vCenter Server.

Examples

-------------- Example 1 --------------

$myServer = Connect-VIServer -Server 10.23.112.235
Add-VMHost -Server $myServer -Name MyVMHost1 -Location MyDatacenter1 -User MyUsername1 -Password MyPassword1

Adds a VM host to a specified vCenter Server system and provides a username and password for authentication.

-------------- Example 2 --------------

$myCredentials = Get-VICredentialStoreItem -File "C:\MyCredentials.xml"
$myServer = Connect-VIServer -Server 10.23.112.235
Add-VMHost -Server $myServer -Name MyVMHost1 -Location MyDatacenter1 -Credentials $myCredentials

Adds a VM host to a vCenter Server system and specifies a PSCredential object that contains authentication credentials.

-------------- Example 3 --------------

$myCredentials = Get-VICredentialStoreItem -File "C:\MyCredentials.xml"
$myServer = Connect-VIServer -Server 10.23.112.235
Add-VMHost -Server $server -Name MyVMHost1 -Location MyDatacenter1 -Credentials $myCredentials -Port MyVMHostPortNumber1 -Confirm:$false

Adds a VM host to a vCenter Server system without asking for confirmation and specifies a port on the host for connecting.

-------------- Example 4 --------------

$myCredentials = Get-VICredentialStoreItem -File "C:\MyCredentials.xml"
$myServer = Connect-VIServer -Server 10.23.112.235
Add-VMHost -Server $myServer -Name MyVMHost1 -Location MyDataCenter1 -Credentials $myCredentials -Port MyVMHostPortNumber1 -Force

Adds a VM host to a vCenter Server system even if the authenticity of the host SSL certificate cannot be verified.


Add-VmHostNtpServer - vSphere PowerCLI Cmdlets Reference

Add-VmHostNtpServer

Synopsis

This cmdlet adds the specified NTP servers to the NTP server list of the specified hosts.

Syntax

Add-VmHostNtpServer [-NtpServer] <String[]> [-VMHost] <VMHost[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostNtpServer
Remove-VMHostNtpServer

Detailed Description

This cmdlet adds the specified NTP servers to the NTP server list of the specified hosts. If a server is already in the list, a non-terminating error is generated and a duplicate is not created.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
NtpServer | String[] | Specifies the domain name or the IP address of the NTP server you want to add to the host. | true | false |
VMHost | VMHost[] | Specifies a host to which you want to add the NTP server. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more System.String objects

Notes

Examples

-------------- Example 1 --------------

Add-VmHostNtpServer -NtpServer "ntp-server-name.com" -VMHost $vmhost

Adds the NTP server with a domain name "ntp-server-name.com" to the virtual machine hosts stored in the $vmhost variable.

-------------- Example 2 --------------

Add-VmHostNtpServer -NtpServer "192.168.1.5" -VMHost (Get-VMHost)

Adds the NTP server with an IP address "192.168.1.5" to the virtual machine hosts pipelined through the Get-VMHost cmdlet.


Apply-DrsRecommendation - vSphere PowerCLI Cmdlets Reference

Apply-DrsRecommendation

Synopsis

This cmdlet applies the specified DRS recommendations.

Syntax

Apply-DrsRecommendation [-DrsRecommendation] <DrsRecommendation[]> [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-DrsRecommendation

Detailed Description

This cmdlet applies the specified DRS recommendations.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
DrsRecommendation | DrsRecommendation[] | Specifies the DRS recommendations you want to apply. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-DrsRecommendation -Priority 1,2 | Apply-DrsRecommendation

Retrieves and applies DRS recommendations with priorities 1 and 2.

-------------- Example 2 --------------

$drs = Get-DrsRecommendation -Cluster Cluster

Apply-DrsRecommendation -DrsRecommendation $drs -RunAsync

Retrieves the DRS recommendations from the Cluster cluster and applies them. The command returns without waiting for the task to complete.


Apply-ESXImageProfile - vSphere Auto Deploy Reference

Apply-ESXImageProfile

Synopsis

Associates the specified image profile with the specified ESXi system.

Syntax

Apply-ESXImageProfile [-ImageProfile] <ImageProfile> [-Entities] <VIObjectCore[]> [<CommonParameters>]

Related Commands

Get-ESXImageProfile
Get-VMHost

Detailed Description

Associates the specified image profile with the specified ESXi system. Currently, the Entities parameter can point only to ESXi hosts.

You must have the "AutoDeploy.Profile.Edit" privilege on the root folder of vCenter Server to use this cmdlet.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
ImageProfile | ImageProfile | Image profile to associate with the specified ESXi host. | true | false |
Entities | VIObjectCore[] | Must be an ESXi host. Use the Get-VMHost PowerCLI cmdlet to find a host. | true | true (ByValue) |

Return Type

Notes

Examples

-------------- Example 1 --------------

C:\PS> Apply-ESXImageProfile "MyImage" "h1","h2"

Associate the "MyImage" image profile with the hosts named "h1" and "h2".

-------------- Example 2 --------------

C:\PS> $img = Get-ESXImageProfile -Name "MyImage"

C:\PS> Apply-ESXImageProfile $img (Get-VMHost "h1")

Associate an image profile with the host named "h1" using PowerCLI objects.

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Apply-VMHostProfile - vSphere PowerCLI Cmdlets Reference

Apply-VMHostProfile

Synopsis

This cmdlet applies a host profile to the specified host or cluster.

Syntax

Apply-VMHostProfile [-Entity] <InventoryItem[]> [-Profile <VMHostProfile>] [-Variable <Hashtable>] [-AssociateOnly] [-ApplyOnly] [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Export-VMHostProfile
Get-VMHostProfile
Import-VMHostProfile
New-VMHostProfile
Remove-VMHostProfile
Set-VMHostProfile
Test-VMHostProfileCompliance

Detailed Description

This cmdlet applies a host profile to the specified host or cluster. The host or cluster must be in a maintenance mode. If no value is provided to the Profile parameter, the profile currently associated with the host or cluster is applied.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Entity | InventoryItem[] | Specifies hosts or clusters to which you want to apply the virtual machine host profile. | true | true (ByValue) |
ApplyOnly | SwitchParameter | Indicates whether to apply the host profile to the specified virtual machine host without associating it. | false | false |
AssociateOnly | SwitchParameter | Indicates whether to associate the host profile to the specified host or cluster without applying it. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Profile | VMHostProfile | Specifies the host profile you want to apply. | false | true (ByValue) |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Variable | Hashtable | Specifies a hash table object that provides values for the host profile required variables. | false | true (ByValue) |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more VMHost or Cluster or System.Collections.Hashtable

Notes

If there are missing values for the required variables, a hash table with t he names of the required variables and the current or default values is ret urned. Otherwise, all directly affected host and cluster objects are return ed. If the cmdlet is run for a cluster with the AssociateOnly parameter set , only the cluster object is returned, but not its hosts.

Examples

-------------- Example 1 --------------

Apply-VMHostProfile -AssociateOnly -Entity $cluster -Profile $profile

Associates the specified profile to all hosts in the specified cluster.

-------------- Example 2 --------------

Apply-VMHostProfile -Entity $vmhost -Profile $profile

Associates and applies the specified profile to the specified host.

-------------- Example 3 --------------

Get-VMHost | Apply-VMHostProfile -ApplyOnly -Profile $profile

Applies the specified profile to all specified hosts.

-------------- Example 4 --------------

Get-VMHost | Apply-VMHostProfile -AssociateOnly -profile $profile

Asscociates the specified profile to all specified hosts.

-------------- Example 5 --------------

Apply-VMHostProfile $vmhost

Applies the associated host's profile to the host.

-------------- Example 6 --------------

$requireInput = Apply-VMHostProfile $vmhost -Profile $profile;

$requireInput['network.hostPortGroup["key-vim-profile-host-HostPortgroupProfile-VMkernel"].ipConfig.IpAddressPolicy.address'] = '192.168.0.1';

$requireInput['network.hostPortGroup["key-vim-profile-host-HostPortgroupProfile-VMkernel"].ipConfig.IpAddressPolicy.subnetmask'] = '255.255.255.0';

Apply-VMHostProfile $vmhost -Profile $profile -Variable $requireInput;

Applies a profile to host but first assigns values to all required values.


Compare-EsxImageProfile - vSphere Imagebuilder Reference

Compare-EsxImageProfile

Synopsis

Syntax

Compare-EsxImageProfile [-ReferenceProfile] <ImageProfile> [-ComparisonProfile] <ImageProfile> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Detailed Description

Returns an ImageProfileDiff object that specifies whether two profiles have the same VIB list and acceptance level. If two profiles are different, the ImageProfileDiff object specifies the differences.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
ReferenceProfile | ImageProfile | (pipeline input, prompt) Specifies the reference image profile for comparison. Takes one of the following forms: *Name of an image profile, as displayed in the Name column of Get-EsxImageProfile, or the Name property of any ImageProfile object *ImageProfile object | true | true (ByValue, ByPropertyName) |
ComparisonProfile | ImageProfile | (prompt) The image profile to compare against. Takes one of the following forms: *Name of an image profile, as displayed in the Name column of Get-EsxImageProfile, or the Name property of any ImageProfile object *ImageProfile object | true | false |
Confirm | SwitchParameter |  | false | false |
WarningAction | ActionPreference |  | false | false |
WarningVariable | String |  | false | false |
WhatIf | SwitchParameter |  | false | false |

Return Type

Notes

Examples

---------- Example 1 ----------

Compare-EsxImageProfile "Profile 1" "Profile 2"

Compares Profile 1 with Profile 2.

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Connect-CIServer - vCloud Snapin Cmdlets Reference

Connect-CIServer

Synopsis

This cmdlet establishes a connection to the specified servers.

Syntax

Connect-CIServer [-Server] <String[]> [-Org <String>] [-Credential <PSCredential>] [-User <String>] [-Password <String>] [-Port <Int32>] [-NotDefault] [-SaveCredentials] [-WhatIf] [-Confirm] [<CommonParameters>]
Connect-CIServer [-Server] <String[]> [-SessionId] <String> [-Port <Int32>] [-NotDefault] [-WhatIf] [-Confirm] [<CommonParameters>]
Connect-CIServer -Menu [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Disconnect-CIServer

Detailed Description

This cmdlet establishes a connection to the specified cloud servers. The cmdlet starts a new session or re-establishes a previous session with a cloud server using the specified parameters. If a connection to a server already exists, the cmdlet returns an object which represents the existing connection.

When you attempt to connect to a server, the server checks for valid certificates. To set the default behavior of PowerCLI when no valid certificates are recognized, use the InvalidCertificateAction parameter of the Set-PowerCLIConfiguration cmdlet. For more information about invalid certificates, run 'Get-Help about_invalid_certificates'.

PowerCLI for vCloud supports a list of default servers. If the target servers cannot be determined from the specified parameters, the cmdlet runs against the servers in the default server list. All default servers are kept in a global array variable called $DefaultCIServers. When you connect to a server, the server is added at the beginning of the array, unless the NotDefault parameter is specified. When you disconnect from a server, the server is removed from the $DefaultCIServers variable. You can modify the value of the $DefaultCIServers variable manually.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Server | String[] | Specifies the IP or DNS addresses of the cloud servers you want to connect to. | true | false |
SessionId | String | Specifies the ID of an existing cloud server session you want to reestablish. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Credential | PSCredential | Specifies a PSCredential object that contains credentials for authenticating with the server. For more information about the server authentication logic of PowerCLI, run "help about_server_authentication". | false | false |
Menu | SwitchParameter | Indicates that you want to select a server from a list of recently connected servers. If Menu is set to $true, the cmdlet retrieves a list of the last visited servers and enters a nested command prompt, so that you can select a server from the list. | true | false |
NotDefault | SwitchParameter | Specifies that you do not want to save the specified servers as default servers. | false | false |
Org | String | Specifies the name of the organization you want to manage. By default, it is the System organization to which you must connect to. The value of the Org parameter overrides the domain part of the value provided to the User parameter. | false | false |
Password | String | Specifies the password you want to use for authenticating with the server. If the Credential parameter is also specified, this parameter is ignored. For more information about the server authentication logic of PowerCLI, run "help about_server_authentication". Note: If the password contains special characters, enclose the entire string in single quotes ('). | false | false |
Port | Int32 | Specifies the port on the server you want to use for the connection. | false | false |
SaveCredentials | SwitchParameter | Indicates that you want to save the specified credentials in the local credential store. | false | false |
User | String | Specifies the user name you want to use for authenticating with the server. If the Credential parameter is also specified, this parameter is ignored. For more information about the server authentication logic of PowerCLI, run "help about_server_authentication". Note: If the user name contains special characters, enclose the entire string in single quotes ('). | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

One or more CIServer objects

Notes

Examples

-------------- Example 1 --------------

Connect-CIServer -Server cloud.example.com -User Org1Admin -Password pass -Org Organization1

Connects as an organization user to the provided organization.

-------------- Example 2 --------------

Connect-CIServer -Server cloud.example.com -User admin -Password pass

Connects as a system administrator to a system organization.

-------------- Example 3 --------------

Connect-CIServer -Server cloud.example.com -Org Organization1 -Credential $vappUserCredential

Connects to the provided organization by specifying a credential object.

-------------- Example 4 --------------

Connect-CIServer -Server cloud.example.com -SessionID $sessionID

Connects to a server by providing a server session ID.

-------------- Example 5 --------------

Connect-CIServer -Menu

Connects to a server from the list of recently connected servers.


Connect-VIServer - vSphere PowerCLI Cmdlets Reference

Connect-VIServer

Synopsis

This cmdlet establishes a connection to a vCenter Server system.

Syntax

Connect-VIServer [-Server] <String[]> [-Port <Int32>] [-Protocol <String>] [-Credential <PSCredential>] [-User <String>] [-Password <String>] [-Session <String>] [-NotDefault] [-SaveCredentials] [-AllLinked] [-Force] [<CommonParameters>]
Connect-VIServer -Menu [<CommonParameters>]

Related Commands

Online version
Disconnect-VIServer

Detailed Description

This cmdlet establishes a connection to a vCenter Server system. The cmdlet starts a new session or re-establishes a previous session with a vCenter Server system using the specified parameters.

When you attempt to connect to a server, the server checks for valid certificates. To set the default behavior of vSphere PowerCLI when no valid certificates are recognized, use the InvalidCertificateAction parameter of the Set-PowerCLIConfiguration cmdlet. For more information about invalid certificates, run 'Get-Help about_invalid_certificates'.

You can have more than one connections to the same server. To disconnect from a server, you need to close all active connections to this server.
vSphere PowerCLI supports working with multiple default servers. If you select this option, every time when you connect to a different server using Connect-VIServer, the new server connection is stored in an array variable together with the previously connected servers, unless the NotDefault parameter is set. This variable is named $DefaultVIServers and its initial value is an empty array. When you run a cmdlet and the target servers cannot be determined from the specified parameters, the cmdlet runs against all servers stored in the array variable. To remove a server from the $DefaultVIServers variable, you can either use Disconnect-Server to close all active connections to the server, or modify the value of $DefaultVIServers manually.

If you choose to work with a single default server, when you run a cmdlet and the target servers cannot be determined from the specified parameters, the cmdlet runs against the last connected server. This server is stored in the $defaultVIServer variable, which is updated every time you establish a new connection.

To switch between single and multiple default servers working mode, use DefaultServerMode parameter of the Set-PowerCLIConfiguration cmdlet. Working with multiple default servers will be enabled by default in a future release.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Server | String[] | Specifies the IP address or the DNS name of the vSphere server to which you want to connect. You can also specify a server by providing its IPv6 address enclosed in square brackets, for example [fe80::250:56ff:feb0:74bd%4]. | true | false |
AllLinked | SwitchParameter | Indicates whether you want to connect to vCenter Server in linked mode. If you specify $true for the AllLinked parameter and the server to which you want to connect is a part of a federation vCenter Server, you'll be connected to all members of the linked vCenter Server. To use this option, PowerCLI must be configured to work in multiple servers connection mode. To configure PowerCLI to support multiple servers connection, specify Multiple for the DefaultVIServerMode parameter of the Set-PowerCLI Configuration cmdlet. | false | false |
Credential | PSCredential | Specifies a PSCredential object that contains credentials for authenticating with the server. For more information about the server authentication logic of PowerCLI, run "help about_server_authentication". Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. | false | true (ByValue) |
Force | SwitchParameter | Suppresses all user interface prompts during the cmdlet execution. Currently these include 'Multiple default servers' and 'Invalid certificate action'. | false | false |
Menu | SwitchParameter | Indicates that you want to select a connection server from a list of recently connected servers. If Menu is set to $true, the cmdlet retrieves a list of the last visited servers and enters a nested command prompt, so that you can select a server from the list. | true | false |
NotDefault | SwitchParameter | Indicates that you do not want to include the server to which you connect into the $defaultVIServers variable. | false | false |
Password | String | Specifies the password you want to use for authenticating with the server. If the Credential parameter is also specified, this parameter is ignored. For more information about the server authentication logic of PowerCLI, run "help about_server_authentication". Note: If the password contains special characters, enclose the entire string in single quotes ('). | false | false |
Port | Int32 | Specifies the port on the server you want to use for the connection. | false | false |
Protocol | String | Specifies the internet protocol you want to use for the connection. It can be either http or https. | false | false |
SaveCredentials | SwitchParameter | Indicates that you want to save the specified credentials in the local credential store. | false | false |
Session | String | Specifies the ID of an existing vCenter Server session you want to reestablish. | false | false |
User | String | Specifies the user name you want to use for authenticating with the server. If the Credential parameter is also specified, this parameter is ignored. For more information about the server authentication logic of PowerCLI, run "help about_server_authentication". Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. Note: If the user name contains special characters, enclose the entire string in single quotes ('). | false | true (ByValue) |

Return Type

VIServer

Notes

When you connect to a server via Connect-ViServer you allocate resources on this server, and these resources remain opened until Disconnect-ViServer - Force is called on this connection. Closing the PowerCLI process does not c lose the server resources.

Examples

-------------- EXAMPLE 1 --------------

Connect-VIServer -Server 10.23.112.235 -Protocol https -User admin -Password pass

Connects to a vSphere server using the User and Password parameters.

-------------- EXAMPLE 2 --------------

Connect-VIServer Server -Credentials $myCredentialsObject -Port 1234

Connects to a vSphere server by using a credential object.

-------------- Example 3 --------------

Connect-VIServer "Server" -SessionId $sessionId

Connect by using a server session ID.
Once you connect to a server, you can save the session ID - $serverObject.SessionId, so that you can restore the existing server connection instead of reconnecting.

-------------- Example 4 --------------

Connect-VIServer Server

Connect by using integrated authentication. In this case, the credentials you are logged on to your machine must be the same as those for the server.

-------------- Example 5 --------------

Connect-VIServer "Server" -User user -Password pass -SaveCredentials

Connect to a server and save the credentials in the credential store. After the credentials are stored, you can connect to the server without specifying them. To get a previously saved credential store item, use the Get-VICredentialStoreItem cmdlet.

-------------- Example 6 --------------

Connect-VIServer -Menu

Connect to a server by choosing the server address from a list of previously connected servers.

-------------- Example 7 --------------

Connect-VIServer "Server" -AllLinked

Connect to a vSphere server which is a part of a federation vCenter Server. This will Connect you to all vSphere servers in the federation as well.


Copy-DatastoreItem - vSphere PowerCLI Cmdlets Reference

Copy-DatastoreItem

Synopsis

This cmdlet copies items between datastores and between a datastore and a local file system provider.

Syntax

Copy-DatastoreItem [-Item] <Object[]> [[-Destination] <Object>] [-Force] [-PassThru] [-Recurse] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet copies items between datastores and between a datastore and a local file system provider.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Item | Object[] | Specifies the datastore item you want to copy. You can use a string to provide a relative path to the item in the current provider location. | true | true (ByValue) |
Destination | Object | Specifies the destination where you want to copy the datastore item. You can use a string to specify a relative path to the destination object in the current provider location. | false | false | .
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Force | SwitchParameter | Indicates whether to overwrite all items with the same name at the provided destination. | false | false | $false
PassThru | SwitchParameter | Indicates that the cmdlet returns the copied item. | false | false | $false
Recurse | SwitchParameter | Indicates that you want to copy not only the item, but its children items as well. | false | false | $false
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more FileInfo or DatastoreItem objects

Notes

Examples

-------------- Example 1 --------------

Copy-DatastoreItem vmstore:\Datacenter\Storage1\MyVM\* c:\VMFolder\MyVM\

Copies the contents of a datastore folder in a local folder.

-------------- Example 2 --------------

Copy-DatastoreItem c:\VMFolder\MyVM\* vmstore:\Datacenter\Storage1\NewVM\ -Force

Copies the contents of a local folder into a datastore folder. If the destination folder does not exist, the Force parameter enforces its creation.

-------------- Example 3 --------------

Copy-DatastoreItem c:\VMFolder\* vmstore:\Datacenter\Storage1\VMs\ -Force -Recurse

Copies recursively the contents of a local folder into a datastore folder.

-------------- Example 4 --------------

Copy-DatastoreItem Windows.ISO vmstore:\Datacenter\Storage1\ISOFiles\WinXPSP3.iso

Copies a file into a datastore folder and changes the file name.


Copy-DeployRule - vSphere Auto Deploy Reference

Copy-DeployRule

Synopsis

Clones an existing rule.

Syntax

Copy-DeployRule [-DeployRule] <DeployRule> [-Name <String>] [-AllHosts] [-ReplaceItem <VIObjectCore[]>] [-ReplacePattern <String[]>] [-NoUpdateRuleSet] [-NoActivate] [<CommonParameters>]

Related Commands

New-DeployRule
Get-ESXImageProfile
Get-Cluster
Get-Datacenter
Get-Folder
Get-VMHostProfile

Detailed Description

Clones an existing rule. If you specify -Name, the new rule is assigned the specified name. Otherwise, the cmdlet assigns a new name to the original and gives the clone the name of the original rule.

Use the -ReplaceItem and -ReplacePattern options to replace individual items or patterns from the old rule.

If the old rule was in the working rule set, the cmdlet replaces it with the new rule unless you specify the -NoUpdateRuleSet option.

You must have the "AutoDeploy.Rule.Create" privilege on the root folder of vCenter Server to use this cmdlet.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
DeployRule | DeployRule | Rule to copy. This parameter supports object-by-name, so you can pass the name of the rule. | true | true (ByValue) |
AllHosts | SwitchParameter | If you specify AllHosts, the rule is applied to all hosts. | false | false |
Name | String | If -Name is specified, the cmdlet assigns the name to the new rule. Otherwise, the new rule keeps the old name and the old name is renamed. | false | false |
NoActivate | SwitchParameter | If specified, the cmdlet changes the rule and adds it to the working rule set, but does not activate the working rule set. | false | false |
NoUpdateRuleSet | SwitchParameter | If specified, the cmdlet changes the rule but does not add the changed rule to the working and active rule set. | false | false |
ReplaceItem | VIObjectCore[] | Allows you to make a copy and change individual items, for example the image profile the rule assigns. This parameter supports object-by-name, so you can pass the name of the item. | false | false |
ReplacePattern | String[] | Allows you to make a copy and change individual patterns, for example the set of hosts the rule applies to. | false | false |

Return Type

VMware.DeployAutomation.Types.DeployRule

Notes

Examples

-------------- Example 1 --------------

C:\PS> Copy-DeployRule defimg -ReplaceItem "My New ESXi 5.0"

Copies a rule previously retrieved with Get-DeployRule and replaces the image in that rule with the specified image.

-------------- Example 2 --------------

C:\PS> $img = Get-ESXImageProfile -Name "My New ESXi 5.0"

C:\PS> Copy-DeployRule defimg -ReplaceItem $img

Copies a rule previously retrieved with Get-DeployRule and replaces the image in that rule with the specified image.

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Copy-HardDisk - vSphere PowerCLI Cmdlets Reference

Copy-HardDisk

Synopsis

Copies a virtual hard disk to another destination.

Syntax

Copy-HardDisk [-HardDisk] <HardDisk[]> [-DestinationPath] <String> [-DestinationStorageFormat <VirtualDiskStorageFormat>] [-Force] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-HardDisk
New-HardDisk
Remove-HardDisk
Set-HardDisk
Move-HardDisk

Detailed Description

Copies a virtual hard disk to another destination specified by the DestinationPath parameter. DestinationPath must be a datastore path to the destination folder.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
DestinationPath | String | Specifies the datastore path to the folder where you want to copy the hard disk. The datastore name is included in the path in square braces. | true | false |
HardDisk | HardDisk[] | Specifies the virtual hard disk you want to copy. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
DestinationStorageFormat | VirtualDiskStorageFormat | Specifies the type of the hard disk copy. The valid values are Thin, Thick, Thick2GB, and EagerZeroedThick. This parameter is only applicable when you are connected to an ESX/ESXi host. | false | false |
Force | SwitchParameter | Indicates whether to overwrite all disks with the same name at the provided destination. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The copied HardDisk object

Notes

Supported only on ESX 4.0 and later.

Examples

-------------- Example 1 --------------

Get-HardDisk -VM $vm | Copy-HardDisk "[Storage1]/"

Retrieves the hard disks of a virtual machine and copies them into the storage1 root folder.

-------------- Example 2 --------------

Copy-HardDisk -HardDisk $hdd -DestinationPath "[Storage1] vms/disks" -DestinationStorageFormat Thick

Copies the $hdd hard disk to the "vms/disks"location on storage1 and changes the storage format of the destination disk to Thick.


Copy-VMGuestFile - vSphere PowerCLI Cmdlets Reference

Copy-VMGuestFile

Synopsis

This cmdlet copies files and folders from and to the guest OS of the specified virtual machines using VMware Tools.

Syntax

Copy-VMGuestFile [-Source] <String[]> [-Destination] <String> -GuestToLocal [-Force] [-VM] <VirtualMachine[]> [-HostCredential <PSCredential>] [-HostUser <String>] [-HostPassword <SecureString>] [-GuestCredential <PSCredential>] [-GuestUser <String>] [-GuestPassword <SecureString>] [-ToolsWaitSecs <Int32>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Copy-VMGuestFile [-Source] <String[]> [-Destination] <String> -LocalToGuest [-Force] [-VM] <VirtualMachine[]> [-HostCredential <PSCredential>] [-HostUser <String>] [-HostPassword <SecureString>] [-GuestCredential <PSCredential>] [-GuestUser <String>] [-GuestPassword <SecureString>] [-ToolsWaitSecs <Int32>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet copies files and folders from and to the guest OS of the specified virtual machines using VMware Tools. If a file with the same name exists in the destination directory, it is overwritten. Use the GuestUser and GuestPassword, or GuestCredential parameters to authenticate when connecting to the VMware Tools. To authenticate with the host, use the HostUser and HostPassword, or HostCredential parameters. SSPI is not supported. This cmdlet supports only Windows XP 32 SP3, Windows Server 2003 32bit SP2, Windows Server 2003 64bit SP2, Windows 7 64 bit, Windows Server 2008 R2 64bit and Redhat Enterprise 5 operating systems.

To run this cmdlet against vCenter Server/ESX/ESXi versions earlier than 5.0, you need to meet the following requirements:
*You must run the cmdlet on the 32-bit version of Windows PowerShell.
*You must have access to the ESX that hosts the virtual machine over TCP port 902.
*For vCenter Server/ESX/ESXi versions earlier than 4.1, you need VirtualMachine.Interact.ConsoleInteract privilege. For vCenter Server/ESX/ESXi 4.1 and later, you need VirtualMachine.Interact.GuestControl privilege.

To run this cmdlet against vCenter Server/ESXi 5.0 and later, you need VirtualMachine.GuestOperations.Modify privilege.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Source | String[] | Specifies the file you want to copy. If the file is on a virtual machine, specifies the absolute file path. Relative file paths are supported only when copying files from a local storage. Wildcards are allowed only at the end of the source path. If you are copying files from the guest operating system of a virtual machine to a local directory, the Source parameter supports wildcards only on vCenter Server 5.0 and later. | true | false |
Destination | String | Specifies the destination path where you want to copy the file. If the destination points to a virtual machine, specify the absolute file path. Relative destination paths are supported only when copying files to a local storage. | true | false |
VM | VirtualMachine[] | Specifies the virtual machine where the file is located. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Force | SwitchParameter | Indicates that the non-existing directories in the specified destination path are automatically created. | false | false |
GuestCredential | PSCredential | Specifies a PSCredential object that contains credentials for authenticating with the guest OS where the file to be copied is located. | false | false |
GuestPassword | SecureString | Specifies the password you want to use for authenticating with the guest OS where the file to be copied is located. | false | false |
GuestToLocal | SwitchParameter | Indicates that you want to copy a file from the guest operating system of the virtual machine to a local directory. | true | false |
GuestUser | String | Specifies the user name you want to use for authenticating with the guest OS where the file to be copied is located. | false | false |
HostCredential | PSCredential | Specifies a PSCredential object that contains credentials for authenticating with the host where the file is to be copied. Do not use this parameter if the HostUser and HostPassword parameters are used. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
HostPassword | SecureString | Specifies the password you want to use for authenticating with the host where the file is to be copied. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
HostUser | String | Specifies the user name you want to use for authenticating with the host where the file is to be copied. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
LocalToGuest | SwitchParameter | Indicates that you want to copy a file from a local directory to the guest operating system of the virtual machine. | true | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
ToolsWaitSecs | Int32 | Specifies the time in seconds to wait for a response from the VMware Tools. If a non-positive value is provided, the system waits infinitely long time. | false | false | 20
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Copy-VMGuestFile -Source c:\text.txt -Destination c:\temp\ -VM VM -GuestToLocal -GuestUser user -GuestPassword pass2

Copies the text.txt file from the guest OS system to the local Temp directory.

-------------- Example 2 --------------

$vm = Get-VM -Name VM

Get-Item "c:\FolderToCopy\*.*" | Copy-VMGuestFile -Destination "c:\MyFolder" -VM $vm -LocalToGuest -GuestUser -GuestPassword pass2

Copies files from a local machine to a guest operating system.


Disconnect-CIServer - vCloud Snapin Cmdlets Reference

Disconnect-CIServer

Synopsis

This cmdlet disconnects the session from the specified cloud servers.

Syntax

Disconnect-CIServer [[-Server] <CIServer[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Connect-CIServer

Detailed Description

This cmdlet disconnects the session from the specified cloud servers. If no servers are provided to the Server parameter, the cmdlet disconnects the default servers.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Server | CIServer[] | Specifies the cloud servers you want to disconnect from. | false | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Force | SwitchParameter | Specifies that you want to remove all existing connections to the specified servers. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Disconnect-CIServer

Disconnects all default servers.

-------------- Example 2 --------------

Disconnect-CIServer * -Confirm:$false

Disconnects all default servers without asking for confirmation.

-------------- Example 3 --------------

Disconnect-CIServer $server1 -Force -Confirm:$false

Disconnects all server connections stored in $server1.

-------------- Example 4 --------------

$server1,$server2 | Disconnect-CIServer -Force -Confirm:$false

Disconnects all server connections stored in the $server1 and $server2 variables.


Disconnect-VIServer - vSphere PowerCLI Cmdlets Reference

Disconnect-VIServer

Synopsis

This cmdlet closes the connection to a vCenter Server system.

Syntax

Disconnect-VIServer [[-Server] <VIServer[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Connect-VIServer

Detailed Description

This cmdlet closes the connection to a vCenter Server system. In PowerCLI, you can have multiple connections to a server. In order to disconnect from a server, you must close all active connections to it. By default, Disconnect-VIServer closes only the last connection to the specified server. To close all active connections to a server, use the Force parameter or run the cmdlet for each connection. When a server is disconnected, it is removed from the default servers list. For more information about default servers, see the description of Connect-VIServer.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Server | VIServer[] | Specifies the vCenter Server systems you want to disconnect from. | false | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Force | SwitchParameter | Indicates that you want to close all active connections to the specified server and disconnect from it. If the value is $false, the cmdlet closes only the last connection to the specified server and you must run Disconnect-VIServer for each active connection to this server in order to disconnect from it. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

$Server = Connect-VIServer 10.23.112.235

Disconnect-VIServer -Server $Server

Connects to a server with an IP address 10.23.112.235 and saves the returned VIServer object in the $Server variable. Then disconnects from the specified server.

-------------- Example 2 --------------

Disconnect-VIServer -Server $global:DefaultVIServers -Force

Closes all connections to the default servers.

-------------- Example 3 --------------

Disconnect-VIServer -Server * -Force

Disconnects all server connections.


Dismount-Tools - vSphere PowerCLI Cmdlets Reference

Dismount-Tools

Synopsis

This cmdlet dismounts the VMware Tools installer CD.

Syntax

Dismount-Tools [[-Guest] <VMGuest[]>] [<CommonParameters>]
Dismount-Tools [[-VM] <VirtualMachine[]>] [[-Server] <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Update-Tools
Mount-Tools

Detailed Description

This cmdlet dismounts the VMware Tools installer CD from one or more virtual machines operating systems specified by the VM and Guest parameters. To specify a server different from the default one, use the Server parameter. The virtual machines must be powered on.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Guest | VMGuest[] | Specifies the guest operating systems from which you want to remove the VMware Tools. | false | true (ByValue) |
VM | VirtualMachine[] | Specifies the virtual machines from which you want to remove the VMware Tools. | false | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which the search for virtual machine names passed by the VM parameter is performed. If no value is given to this parameter, the search for the virtual machine names is performed on the default server. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Dismount-Tools VM

Dismounts the VMware Tools from the VM virtual machine. The virtual machine must be powered on.

-------------- Example 2 --------------

Get-VMGuest VM | Dismount-Tools

Dismounts the VMware Tools from the virtual machine specified by its guest operating system. The virtual machine must be powered on.


Export-EsxImageProfile - vSphere Imagebuilder Reference

Export-EsxImageProfile

Synopsis

Syntax

Export-EsxImageProfile [-ImageProfile] <ImageProfile> [-FilePath] <String> -ExportToIso [-Force] [-NoSignatureCheck] [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]
Export-EsxImageProfile [-ImageProfile] <ImageProfile> [-FilePath] <String> -ExportToBundle [-Force] [-NoSignatureCheck] [-RunAsync] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Related Commands

Detailed Description

Exports an Image Profile object as either an ESXi ISO image that can be booted up and used as an ESXi installer, or an offline depot ZIP file that contains metadata plus the VIB packages. In both cases, downloads the VIB binaries and validates the VIB signatures.

You can perform the following tasks with the offline depot ZIP file:

*Import the ZIP into VMware Update Manager for patch remediation
*Download the ZIP to an ESXi host and used with esxcli for installation
*Re-import the ZIP into ImageBuilder itself using Add-EsxSoftwareDepot

You can specify either -ExportToIso or -ExportToBundle but not both.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
ImageProfile | ImageProfile | (pipeline input, prompt) Specifies the image profile to export. Takes one of the following forms: *Name of an image profile, as displayed in the Name column of Get-EsxImageProfile, or the Name property of any ImageProfile object *ImageProfile object | true | true (ByValue, ByPropertyName) |
FilePath | String | Required; specifies the destination for the ISO or the ZIP file path. Include the extension, either .iso or .zip. Offline depots must be named with .zip at the end. If the file already exists, it will not be overwritten unless -Force is specified. | true | false |
ExportToBundle | SwitchParameter |  | true | false |
ExportToIso | SwitchParameter |  | true | false |
Force | SwitchParameter | Optional. If specified, the cmdlet overwrites an existing destination file with the same name. | false | false |
NoSignatureCheck | SwitchParameter | Optional. If specified, disables VIB signature validation. The use of this option may lead to debilitating security vulnerabilities. | false | false |
RunAsync | SwitchParameter |  | false | false |
WarningAction | ActionPreference |  | false | false |
WarningVariable | String |  | false | false |

Return Type

Notes

Examples

---------- Example 1 ----------

Export-EsxImageProfile -ImageProfile "Evan's Profile" -ExportToIso -FilePath c:\isos\evans-iso.iso

Export an ISO image

---------- Example 2 ----------

New-EsxImageProfile -CloneProfile "ESXi-5.0.0-234567-standard" -Name "Evan's Profile"
Add-EsxSoftwarePackage -ImageProfile "Evan's Profile" -SoftwarePackage cisco-vem-v140
Export-EsxImageProfile -ImageProfile "Evan's Profile" -ExportToBundle -FilePath c:\isos\base-plus-vem.zip

Clone an image profile, add a software package, then export to offline bundle.

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Export-VApp - vSphere PowerCLI Cmdlets Reference

Export-VApp

Synopsis

This cmdlet exports a vApp or a single virtual machine to the specified destination.

Syntax

Export-VApp [[-Destination] <String>] [-VApp] <VApp[]> [-Name <String>] [-Force] [-Format <VAppStorageFormat>] [-CreateSeparateFolder] [-Description <String>] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]
Export-VApp [[-Destination] <String>] -VM <VirtualMachine[]> [-Name <String>] [-Force] [-Format <VAppStorageFormat>] [-CreateSeparateFolder] [-Description <String>] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VApp
Import-VApp
New-VApp
Remove-VApp
Set-VApp
Start-VApp
Stop-VApp
Move-VApp

Detailed Description

This cmdlet exports a vApp or a single virtual machine to the specified destination. If no destination is specified, the cmdlet creates a new folder in the current working directory and exports the vApp or the virtual machine to it. The name of the new folder is the same as the name of the vApp or the virtual machine as it appears in vCenter Server.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Destination | String | Specifies a destination path to the file system location where you want to export the vApp or the virtual machine. If the value of the Destination parameter is a folder, the vApp or the virtual machine is exported to a container folder (OVF). If the destination is a file, the vApp or the virtual machine is exported in OVA format. | false | false |
VApp | VApp[] | Specifies the vApp that you want to export. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
CreateSeparateFolder | SwitchParameter | Indicates that you want to create a separate folder for each vApp or virtual machine. | false | false |
Description | String | Provides a description of the exported vApp or virtual machine. | false | false |
Force | SwitchParameter | Indicates that the cmdlet overwrites the existing destination files and creates directories to complete the specified file path. | false | false |
Format | VAppStorageFormat | Specifies the file format of the specified vApp or virtual machine. The default format is OVF. The valid values are OVF and OVA. | false | false |
Name | String | Specifies a name for the exported vApp or virtual machine. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VM | VirtualMachine[] | Specifies the virtual machine that you want to export. | true | true (ByValue) |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more FileInfo objects

Notes

Examples

-------------- Example 1 --------------

Get-VApp -Name "MyVApp*" | Export-VApp -Destination "C:\vapps\"

Retrieves all vApps whose names start with "MyVApp" and exports them to the specified path.

-------------- Example 2 --------------

$myVApp = Get-VApp -Name "MyVApp1"
Export-VApp -Destination "C:\NewFolder\" -VApp $myVApp -Name "EMail_vApp" -Force

Exports the vApp in the $myVApp variable to the specified location and assigns a name to the folder.

-------------- Example 3 --------------

$myVApp = Get-VApp -Name "MyVApp1"
Export-VApp -vApp $myVApp -Destination "C:\vapps\Vapp\" -Force -CreateSeparateFolder:$false

Exports the vApp in the $myVApp variable to the specified location without creating a separate folder for each virtual appliance.

-------------- Example 4 --------------

$myVApp = Get-VApp -Name "MyVApp1"
Export-VApp -vApp $myVApp -Destination "C:\vapps\myVapp\" -Format Ova

Exports a vApp in OVA format.

-------------- Example 5 --------------

Get-VM -Name MyVM* | Export-VApp -Destination "C:\MyVMs\"

Retrieves all virtual machines whose names start with "MyVM" and exports them to the specified path.

-------------- Example 6 --------------

$myVM = New-VM -Name MyVM1 -VMHost MyVMHost1
Export-VApp -Destination "C:\MyVMs\" -VM $myVM -Format Ova

Creates a new virtual machine and exports it in OVA format.

-------------- Example 7 --------------

$myVM = New-VM -Name "MyVM1" -VMHost MyVMHost1
Get-VM -Name MyVM | Export-VApp -Destination "C:\MyVMs\"
Export-VApp -Destination "C:\MyVMs\" -VM $myVM -Force

Exports a virtual machine to the same path twice. The second time forces an override of the previously exported files.


Export-VDPortGroup - vSphere PowerCLI Cmdlets Reference

Export-VDPortGroup

Synopsis

This cmdlet exports the configuration of a specified distributed port group to a specified .zip file.

Syntax

Export-VDPortGroup [-VDPortGroup] <VDPortgroup[]> [-Description <String>] [-Destination <String>] [-Force] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-VDPortgroup
New-VDPortgroup
Remove-VDPortgroup
Set-VDPortgroup

Detailed Description

This cmdlet exports the configuration of a specified distributed port group to a specified .zip file. You can export only vSphere distributed port groups.

Note: This cmdlet is supported only on vSphere 5.1 or later.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VDPortGroup | VDPortgroup[] | Specifies the distributed port group whose configuration you want to export. | true | true (ByValue) |
Description | String | Specifies a description for the exported distributed port group configuration. | false | false |
Destination | String | Specifies an absolute or a relative file path to the location where you want to export the configuration of the distributed port group. | false | false | [file system provider location]\[port group name]-[timestamp].backup.zip
Force | SwitchParameter | Indicates that if the specified destination file already exists, the existing file will be overwritten. Any directories required to complete the specified file path will also be created. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

One FileInfo object that contains information about the exported .zip file

Notes

Examples

-------------- Example 1 --------------

Get-VDPortGroup -Name 'MyVDPortGroup' | Export-VDPortGroup -Destination 'C:\MyVDSwitchesBackup\MyVDPortGroup_21122012.zip'

Exports the configuration of the specified port group to the specified file.

-------------- Example 2 --------------

$myPortGroup = Get-VDPortGroup -Name 'MyVDPortGroup'
Export-VDPortGroup -VDPortGroup $myPortGroup -Destination 'C:\MyVDSwitchesBackup\MyVDPortGroupBackup.zip' -Force

Exports the configuration of the specified port group to the specified file. If the MyVDSwitchesBackup directory does not exist, it is created. If the MyVDPortGroupBackup.zip file already exists in the specified location, it is overwritten.


Export-VDSwitch - vSphere PowerCLI Cmdlets Reference

Export-VDSwitch

Synopsis

This cmdlet exports the configuration of a specified vSphere distributed switch to a .zip file.

Syntax

Export-VDSwitch [-VDSwitch] <VDSwitch[]> [-WithoutPortGroups] [-Description <String>] [-Destination <String>] [-Force] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-VDSwitch
New-VDSwitch
Remove-VDSwitch
Set-VDSwitch

Detailed Description

This cmdlet exports the configuration of a specified vSphere distributed switch to a .zip file.

Note: This cmdlet is supported only on vCenter Server 5.1 or later.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VDSwitch | VDSwitch[] | Specifies the vSphere distributed switch whose configuration you want to export. | true | true (ByValue) |
Description | String | Specifies a description for the exported vSphere distributed switch configuration. | false | false |
Destination | String | Specifies an absolute or a relative file path to the location where you want to export the vSphere distributed switch configuration. | false | false | [file system provider location]\[port group name]-[timestamp].backup.zip
Force | SwitchParameter | Indicates that if the specified destination file already exists, the existing file is overwritten. Any directories required to complete the specified file path are also created. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WithoutPortGroups | SwitchParameter | Indicates that the configuration of the vSphere distributed switch is exported without its port group configuration. | false | false |

Return Type

One FileInfo object that contains information about the exported .zip file

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitch -Name 'MyVDSwitch' | Export-VDSwitch -Description "My VDSwitch configuration" -Destination "c:\myVDSwitchConfig.zip"

Exports the configuration of the specified vSphere distributed switch and its port groups to the specified file.

-------------- Example 2 --------------

Get-VDSwitch -Name 'MyVDSwitch' | Export-VDSwitch -Description "My VDSwitch configuration" -Destination "c:\myVDSwitchConfig.zip" -WithoutPortGroups -Force

Exports the configuration of the specified vSphere distributed switch and its port groups to the specified file. If the myVDSwitchConfig.zip file already exists, it is overwritten.


Export-VMHostProfile - vSphere PowerCLI Cmdlets Reference

Export-VMHostProfile

Synopsis

This cmdlet exports the specified host profile to a file.

Syntax

Export-VMHostProfile [-FilePath] <String> [-Profile] <VMHostProfile> [-Force] [-Server <VIServer>] [<CommonParameters>]

Related Commands

Online version
Apply-VMHostProfile
Get-VMHostProfile
Import-VMHostProfile
Remove-VMHostProfile
Set-VMHostProfile
Test-VMHostProfileCompliance
New-VMHostProfile

Detailed Description

This cmdlet exports the specified host profile to a file that is in the VMware profile format (.vpf). If the value of the Force parameter is $false and the destination file exists or the target parent directory does not exist, a terminating error is generated. If the value of the Force parameter is $true, the existing destination file is overwritten and directories are created to complete the specified file path.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
FilePath | String | Specifies the path to the file where you want to export the host profile. | true | false |
Profile | VMHostProfile | Specifies the host profile you want to export. | true | true (ByValue) |
Force | SwitchParameter | Indicates that the cmdlet overwrites the existing destination files and creates directories to complete the specified file path. | false | false |
Server | VIServer | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more FileInfo objects

Notes

Examples

-------------- Example 1 --------------

$profile = (Get-VMHostProfile -Name Profile )[0]

Export-VMHostProfile -FilePath export.prf -Profile $profile -Force

Exports the selected host profile to the export.prf file.


Format-VMHostDiskPartition - vSphere PowerCLI Cmdlets Reference

Format-VMHostDiskPartition

Synopsis

This cmdlet formats a new VMFS (Virtual Machine File System) on each of the specified host disk partitions.

Syntax

Format-VMHostDiskPartition [-VolumeName] <String> -VMHostDiskPartition <VMHostDiskPartition[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostDiskPartition

Detailed Description

This cmdlet formats a new VMFS (Virtual Machine File System) on each of the specified host disk partitions.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VolumeName | String | Specifies a name for the new VMFS. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
VMHostDiskPartition | VMHostDiskPartition[] | Specifies the disk partitions on which you want to format a new VMFS. | true | true (ByValue) |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more formatted VMHostDiskPartition objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHost Host | Get-VMHostDisk | Get-VMHostDiskPartition | ? {.Type -eq "Ntfs"} | Format-VMHostDiskPartition -VolumeName "NewStorage"

Formats the NTFS disk partitions of a host.


Get-AdvancedSetting - vSphere PowerCLI Cmdlets Reference

Get-AdvancedSetting

Synopsis

This cmdlet retrieves the advanced settings for the specified entity.

Syntax

Get-AdvancedSetting [-Entity] <VIObject[]> [[-Name] <String[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-AdvancedSetting
Remove-AdvancedSetting
Set-AdvancedSetting

Detailed Description

This cmdlet retrieves the advanced settings for the specified entity.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the advanced settings you want to retrieve. | false | false |
Entity | VIObject[] | Specifies the entities for which you want to retrieve the advanced settings. This parameter accepts VIServer, VirtualMachine, VMHost, DatastoreCluster, and Cluster objects. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more AdvancedSetting objects

Notes

Examples

-------------- Example 1 --------------

Get-AdvancedSetting -Entity (Get-Cluster -Name Cluster)

Retrieves the advanced settings of the cluster named Cluster.

-------------- Example 2 --------------

Get-AdvancedSetting -Entity (Get-Cluster -Name Cluster) -Name SettingName

Retrieves the advanced setting named SettingName of the Cluster cluster.

-------------- Example 3 --------------

Get-AdvancedSetting -Entity Server -Name '*smtp*'

Retrieve all smtp settings for the specified server.


Get-AlarmAction - vSphere PowerCLI Cmdlets Reference

Get-AlarmAction

Synopsis

This cmdlet retrieves the actions of the specified alarm definitions.

Syntax

Get-AlarmAction [[-AlarmDefinition] <AlarmDefinition[]>] [-ActionType <ActionType[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-AlarmActionTrigger
Get-AlarmDefinition
New-AlarmAction
New-AlarmActionTrigger
Remove-AlarmAction

Detailed Description

This cmdlet retrieves the actions of the specified alarm definitions.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
AlarmDefinition | AlarmDefinition[] | Specifies the alarm definitions for which you want to retrieve the configured actions. | false | true (ByValue) |
ActionType | ActionType[] | Specifies the type of the alarm actions you want to retrieve. The valid values are SendEmail, ExecuteScript, and Send SNMP. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more AlarmAction objects

Notes

Examples

-------------- Example 1 --------------

Get-AlarmDefinition -Name "Host processor status" | Get-AlarmAction -ActionType "ExecuteScript", "SendSNMP", "SendEmail"

Extract all PowerCLI supported alarm actions for the default alarm "Host processor status".

-------------- Example 2 --------------

Get-AlarmAction -AlarmDefinition "Host processor status" -ActionType "SendSNMP" -Server 'server IP'

Extract the alarm actions for the default alarm "Host processor status" by specifying the alarm by name.


Get-AlarmActionTrigger - vSphere PowerCLI Cmdlets Reference

Get-AlarmActionTrigger

Synopsis

This cmdlet retrieves the actions that trigger the specified alarm actions.

Syntax

Get-AlarmActionTrigger [[-AlarmAction] <AlarmAction[]>] [<CommonParameters>]

Related Commands

Online version
Get-AlarmAction
Get-AlarmDefinition
New-AlarmAction
New-AlarmActionTrigger
Remove-AlarmAction
Remove-AlarmActionTrigger

Detailed Description

This cmdlet retrieves the actions that trigger the specified alarm actions.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
AlarmAction | AlarmAction[] | Filters the trigger actions by the alarm actions they trigger. | false | true (ByValue) |

Return Type

Zero or more AlarmActionTrigger objects

Notes

Examples

-------------- Example 1 --------------

Get-AlarmAction -AlarmDefinition (Get-AlarmDefinition | select -First 1) | Get-AlarmActionTrigger

Retrieves the action triggers for the actions of the first returned alarm.


Get-AlarmDefinition - vSphere PowerCLI Cmdlets Reference

Get-AlarmDefinition

Synopsis

This cmdlet retrieves the available alarm definitions.

Syntax

Get-AlarmDefinition [-Id <String[]>] [[-Name] <String[]>] [[-Entity] <VIObject[]>] [-Enabled [<Boolean>]] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-AlarmAction
Get-AlarmActionTrigger
New-AlarmAction
New-AlarmActionTrigger
Remove-AlarmAction
Remove-AlarmActionTrigger
Set-AlarmDefinition
New-AlarmActionTrigger

Detailed Description

This cmdlet retrieves the available alarm definitions.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the alarms you want to retrieve. | false | false |
Entity | VIObject[] | Filters the alarm definitions by the entities to which they are defined. This parameter accepts InventoryItem, Datastore, and DatastoreCluster objects. | false | true (ByValue) |
Enabled | Boolean | Indicates that you want to retrieve only the enabled alarm definitions. | false | false |
Id | String[] | Specifies the IDs of the alarms you want to retrieve. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more AlarmDefinition objects

Notes

Examples

-------------- Example 1 --------------

Get-AlarmDefinition -Entity (Get-Folder -NoRecursion) -Name "Host connection and power state" -Enabled:$true

Retrieve the enabled alarms named "Host connection and power state" for the available folders.

-------------- Example 2 --------------

Get-AlarmDefinition -Server Server1, Server2

Retrieves the alarms for the specified servers.


Get-Annotation - vSphere PowerCLI Cmdlets Reference

Get-Annotation

Synopsis

This cmdlet retrieves annotations.

Syntax

Get-Annotation [[-CustomAttribute] <CustomAttribute[]>] [-Entity] <InventoryItem> [-Server <VIServer[]>] [<CommonParameters>]
Get-Annotation [-Entity] <InventoryItem> [-Name <String[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Set-Annotation
Get-CustomAttribute
New-CustomAttribute
Remove-CustomAttribute
Set-CustomAttribute

Detailed Description

This cmdlet retrieves annotations. An annotation is a user-defined description field of one or more vSphere objects.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Entity | InventoryItem | Specifies the entities whose annotations you want to retrieve. | true | true (ByValue) |
CustomAttribute | CustomAttribute[] | Specifies the custom attributes whose annotations you want to retrieve. | false | false |
Name | String[] | Specifies the names of the annotations you want to retrieve. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more Annotation objects

Notes

Examples

-------------- Example 1 --------------

Get-Cluster Cluster | Get-Annotation -CustomAttribute PhysicalLocation

Retrieves the annotation of the PhysicalLocation custom attribute for Cluster.


Get-Catalog - vCloud Snapin Cmdlets Reference

Get-Catalog

Synopsis

This cmdlet retrieves the specified cloud catalogs.

Syntax

Get-Catalog [[-Name] <String[]>] [-Org <Org[]>] [-MyOrgOnly] [-Server <CIServer[]>] [<CommonParameters>]
Get-Catalog -Id <String[]> [-Server <CIServer[]>] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet retrieves the specified cloud catalogs.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the cloud catalogs you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the cloud catalogs you want to retrieve. | true | false |
MyOrgOnly | SwitchParameter | Indicates that you want to retrieve catalogs only from the organization which is currently connected. | false | false |
Org | Org[] | Specifies the organizations from which you want to retrieve catalogs. | false | true (ByValue) |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |

Return Type

Zero or more Catalog objects

Notes

Examples

-------------- Example 1 --------------

Get-Catalog

Gets all visible catalogs for the current user.

-------------- Example 2 --------------

Get-Catalog -Name "MyCatalog1"

Gets an existing catalog named "MyCatalog".

-------------- Example 3 --------------

Get-Catalog -ID $catalogId

Gets a catalog with a given ID.

-------------- Example 4 --------------

Get-Org -Name "Organization1" | Get-Catalog

Gets all visible catalogs for an organization.

-------------- Example 5 --------------

Connect-CIServer $ip -Name $nonSysAdminUser -Pass $pass
Get-Catalog -MyOrgOnly

Gets all catalogs from my organization.


Get-CDDrive - vSphere PowerCLI Cmdlets Reference

Get-CDDrive

Synopsis

This cmdlet retrieves virtual CD drives.

Syntax

Get-CDDrive [-Id <String[]>] [-Server <VIServer[]>] [[-VM] <VirtualMachine[]>] [[-Template] <Template[]>] [[-Snapshot] <Snapshot[]>] [-Name <String[]>] [<CommonParameters>]

Related Commands

Online version
New-CDDrive
Remove-CDDrive
Set-CDDrive

Detailed Description

This cmdlet returns a set of virtual CD drives that belong to the virtual machines, templates, and snapshots specified by the VirtualMachine, Template, and Snapshot parameters. At least one of these parameters must be provided. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines from which you want to retrieve virtual CD drives. | false | true (ByValue) |
Template | Template[] | Specifies the virtual machine templates from which you want to retrieve virtual CD drives. | false | true (ByValue) |
Snapshot | Snapshot[] | Specifies the snapshots from which you want to retrieve virtual CD drives. | false | true (ByValue) |
Id | String[] | Specifies the IDs of the CD drives you want to retrieve. | false | false |
Name | String[] | Specifies the names of the CD drives you want to retrieve. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more CDDrive objects

Notes

Examples

-------------- Example 1 --------------

Get-VM -Name VM | Get-CDDrive

Connects to a vSphere server and retrieves the CD drive of the virtual machine named VM.


Get-CIAccessControlRule - vCloud Snapin Cmdlets Reference

Get-CIAccessControlRule

Synopsis

This cmdlet retrieves access control rules.

Syntax

Get-CIAccessControlRule [[-Entity] <AccessControlledEntity[]>] [-AccessLevelAtLeast <AccessLevel>] [-User <CIObject[]>] [-Server <CIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-CIAccessControlRule
Set-CIAccessControlRule
Remove-CIAccessControlRule

Detailed Description

This cmdlet retrieves access control rules.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Entity | AccessControlledEntity[] | Specifies the entities for which you want to retrieve access control rules. This parameter accepts vApp and Catalog objects. | false | true (ByValue) |
AccessLevelAtLeast | AccessLevel | Specifies the lowest access level for the access control rules that you want to retrieve. The cmdlet returns all objects with the specified access level and higher access levels, if any. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
User | CIObject[] | Specifies cloud users to retrieve the access control rules that apply for them. This parameter accepts CIUser and Org objects. When you pass an Org object to the parameter, the operation retrieves only access control rules that are set to apply for everyone in the organization. | false | false |

Return Type

Zero or more CIAccessControlRule objects

Notes

Examples

-------------- Example 1 --------------

Get-CIAccessControlRule -Entity 'MyVApp', 'MyCatalog'

Retrieve all access control rules for the specified entities.

-------------- Example 2 --------------

Get-CIAccessControlRule -User 'MyUser1', 'MyUser2'

Retrieve all access control rules that apply for the specified users.

-------------- Example 3 --------------

Get-CIAccessControlRule -Entity 'MyCatalog' -User 'MyUser'

Retrieve all access control rules set for the specified catalog and applying only for the specified user.

-------------- Example 4 --------------

Get-CIAccessControlRule -AccessLevelAtLeast ReadWrite

Retrieve all access control rules with "Read/Write" or "Full Control" access levels that apply for everyone in the MyOrg organization.


Get-CIDatastore - vCloud Snapin Cmdlets Reference

Get-CIDatastore

Synopsis

This cmdlet retrieves the datastores available on a cloud server.

Syntax

Get-CIDatastore [-Server <CIServer[]>] [[-Name] <String[]>] [-ProviderVdc <ProviderVdc[]>] [<CommonParameters>]
Get-CIDatastore -Id <String[]> [-Server <CIServer[]>] [<CommonParameters>]

Related Commands

Add-CIDatastore
Online version

Detailed Description

This cmdlet retrieves the datastores available on a cloud server. To specify a server different from the default one, use the Server parameter. Note: This cmdlet is only available to Provider Administrators.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names for the datastores that you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the datastores that you want to retrieve. | true | false |
ProviderVdc | ProviderVdc[] | Specifies the provider vDC for which you want to retrieve datastores. | false | true (ByValue) |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |

Return Type

Zero or more CIDatastore objects

Notes

Examples

-------------- Example 1 --------------

Get-CIDatastore -Name "MyDatastore*"

Retrieves all datastores with names that start with "MyDatastore" from all available provider vDCs.

-------------- Example 2 --------------

Get-CIDatastore -Name *datastore* -ProviderVDC "MyProviderVDC1", "MyProviderVDC2"

Retrieves all datastores with names that contain "datastore" from multiple provider vDCs.


Get-CINetworkAdapter - vCloud Snapin Cmdlets Reference

Get-CINetworkAdapter

Synopsis

This cmdlet retrieves the virtual network adapters available on a vCloud Director server.

Syntax

Get-CINetworkAdapter [-Primary [<Boolean>]] [-Server <CIServer[]>] [-VM <CIVM[]>] [<CommonParameters>]
Get-CINetworkAdapter [-Primary [<Boolean>]] [-Server <CIServer[]>] -VAppNetwork <CIVAppNetwork[]> [<CommonParameters>]

Related Commands

Online version
Set-CINetworkAdapter

Detailed Description

This cmdlet retrieves the virtual network adapters available on a vCloud Director server.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Primary | Boolean | Indicates that you want to retrieve only primary virtual network adapters. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
VAppNetwork | CIVAppNetwork[] | Specifies vApp networks to retrieve the virtual network adapters that are connected to them. | true | true (ByValue) |
VM | CIVM[] | Specifies the virtual machines whose virtual network adapters you want to retrieve. | false | true (ByValue) |

Return Type

Zero or more CINetworkAdapter objects

Notes

Examples

-------------- Example 1 --------------

Get-CIVM -Name 'MyVM1' | Get-CINetworkAdapter

Retrieves all virtual network adapters for the MyVM1 virtual machine.

-------------- Example 2 --------------

Get-CIVappNetwork -Name 'MyVAppNetwork1' -VApp 'MyVapp1' | Get-CINetworkAdapter

Retrieves all virtual network adapters for the specified vApp network.

-------------- Example 3 --------------

Get-VApp -Name 'MyVapp1' | Get-CIVM | Get-CINetworkAdapter -Primary

Retrieves the primary virtual network adapters for all virtual machines in the specified vApp.


Get-CIRole - vCloud Snapin Cmdlets Reference

Get-CIRole

Synopsis

This cmdlet retrieves roles in the cloud.

Syntax

Get-CIRole [[-Name] <String[]>] [-User <CIUser[]>] [-Server <CIServer[]>] [<CommonParameters>]
Get-CIRole -Id <String[]> [-Server <CIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-CIUser

Detailed Description

This cmdlet retrieves roles in the cloud. You can filter the output by using the cmdlet parameters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the cloud roles you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the cloud roles you want to retrieve. | true | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
User | CIUser[] | Specifies cloud users to view their roles. | false | true (ByValue) |

Return Type

Zero or more CIRole objects

Notes

Examples

-------------- Example 1 --------------

Get-CIRole

Retrieves all roles that are visible to the current user.

-------------- Example 2 --------------

Get-CIUser -Name User | Get-CIRole

Get the roles assigned to a cloud user.

-------------- Example 3 --------------

Get-CIRole -Name Role

Gets a role by name.

-------------- Example 4 --------------

Get-CIRole -Id roleId

Gets a role by Id.


Get-CIUser - vCloud Snapin Cmdlets Reference

Get-CIUser

Synopsis

This cmdlet retrieves cloud users.

Syntax

Get-CIUser [[-Name] <String[]>] [-Org <Org[]>] [-Role <CIRole[]>] [-Server <CIServer[]>] [<CommonParameters>]
Get-CIUser -Id <String[]> [-Server <CIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-CIRole

Detailed Description

This cmdlet retrieves cloud users.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the cloud users you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the cloud users you want to retrieve. | true | false |
Org | Org[] | Specifies the organizations to which the users you want to retrieve belong. | false | true (ByValue) |
Role | CIRole[] | Specifies the roles of the users you want to retrieve. | false | true (ByValue) |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |

Return Type

Zero or more CIUser objects

Notes

Retrieving a user's Org property returns $null if the user is a member of t he System organization. To ensure compatibility with future versions, all s cripts checking if a user is a member of the System organization must use t he following syntax: $user.Org -eq $null -or $user.Org.Name -like 'System'

Examples

-------------- Example 1 --------------

Get-CIUser -Org Org

Gets a list of the users in the specified organization.

-------------- Example 2 --------------

Get-CIUser -Org Organization -Role "Catalog Author"

Gets a list of the organization users that have the "Catalog Author" role.

-------------- Example 3 --------------

Get-CIRole | Get-CIUser

Gets the users with the provided roles.

-------------- Example 4 --------------

Get-CIUser User*

Gets a list of users with names that start with "User".


Get-CIVApp - vCloud Snapin Cmdlets Reference

Get-CIVApp

Synopsis

This cmdlet retrieves virtual appliances in the cloud.

Syntax

Get-CIVApp [[-Name] <String[]>] [-Server <CIServer[]>] [-Org <Org[]>] [-OrgNetwork <OrgNetwork[]>] [-OrgVdc <OrgVdc[]>] [-Owner <CIUser[]>] [-Status <CIVAppStatus[]>] [<CommonParameters>]
Get-CIVApp -Id <String[]> [-Server <CIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-CIVAppTemplate
Import-CIVApp
Import-CIVAppTempate

Detailed Description

This cmdlet retrieves virtual appliances in the cloud. You cannot use the ID parameter with the other cmdlet parameters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the vApps you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the vApps you want to retrieve. | true | false |
Org | Org[] | Specifies the organizations for which you want to retrieve vApps. | false | true (ByValue) |
OrgNetwork | OrgNetwork[] | Specifies the organization networks for which you want to retrieve vApps. | false | true (ByValue) |
OrgVdc | OrgVdc[] | Specifies the organization VDCs for which you want to retrieve vApps. | false | true (ByValue) |
Owner | CIUser[] | Specifies the owners of the cloud vApps you want to retrieve. | false | true (ByValue) |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
Status | CIVAppStatus[] | Specifies the status of the vApps you want to retrieve. | false | false |

Return Type

Zero or more CIVApp objects

Notes

Examples

-------------- Example 1 --------------

Get-CIVApp

Gets all visible VApps for the current user.

-------------- Example 2 --------------

Get-CIVApp -Name "MyVApp1"

Gets a single VApp named "MyVApp1".

-------------- Example 3 --------------

Get-CIVApp -ID $CloudVAppId

Gets a VApp with a given ID.

-------------- Example 4 --------------

$myOrg = Get-Org -Name "Organization1"
Get-CIVApp -Org $myOrg

Gets all visible VApps within an organization.

-------------- Example 5 --------------

Get-OrgNetwork -Name "OrgNetwork1" | Get-CIVApp

Gets all visible VApps within an organization's network.

-------------- Example 6 --------------

Get-OrgVdc -Name "OrgVdc1" | Get-CIVApp

Gets all visible VApps within an organization virtual datacenter using a pipeline syntax.

-------------- Example 7 --------------

Get-CIUser -Name "CloudUserOrg1Admin1" | Get-CIVApp

Gets VApp by its owner using a pipeline syntax.

-------------- Example 8 --------------

Get-CIVApp -Status "PoweredOn"

Gets all VApps by their state.


Get-CIVAppNetwork - vCloud Snapin Cmdlets Reference

Get-CIVAppNetwork

Synopsis

This cmdlet retrieves the vApp networks available on a vCloud Director server.

Syntax

Get-CIVAppNetwork [[-Name] <String[]>] [-ConnectionType <CIVAppNetworkConnectionType[]>] [-Server <CIServer[]>] [<CommonParameters>]
Get-CIVAppNetwork -Id <String[]> [-Server <CIServer[]>] [<CommonParameters>]
Get-CIVAppNetwork [[-Name] <String[]>] [-ConnectionType <CIVAppNetworkConnectionType[]>] -VApp <CIVApp[]> [-Server <CIServer[]>] [<CommonParameters>]
Get-CIVAppNetwork [[-Name] <String[]>] [-ConnectionType <CIVAppNetworkConnectionType[]>] -ParentOrgNetwork <OrgNetwork[]> [-Server <CIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-CIVAppNetwork
Remove-CIVAppNetwork
Set-CIVAppNetwork

Detailed Description

This cmdlet retrieves the vApp networks available on a vCloud Director server.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the vApp networks you want to retrieve. | false | false |
ConnectionType | CIVAppNetworkConnectionType[] | Specifies the type of connectivity between the vApp networks you want to retrieve and their parent organization networks. This parameter accepts Direct, Fenced, Routed, and Isolated values. | false | false |
Id | String[] | Specifies the IDs of the vApp networks that you want to retrieve. | true | false |
ParentOrgNetwork | OrgNetwork[] | Specifies the parent organization networks of the vApp networks you want to retrieve. | true | true (ByValue) |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
VApp | CIVApp[] | Specifies the vApps for which you want to retrieve vApp networks. | true | true (ByValue) |

Return Type

Zero or more CIVAppNetwork objects

Notes

Examples

-------------- Example 1 --------------

Get-CIVAppNetwork -ConnectionType Direct

Retrieves all vApp networks that are directly connected to a parent organization network and are available to the user.

-------------- Example 2 --------------

$myVApp = Get-CIVApp -Name 'MyVApp'
Get-CIVAppNetwork -VApp $myVApp

Retrieves all vApp networks for the specified vApp.

-------------- Example 3 --------------

$parentOrgNetwork = Get-OrgNetwork -Name 'MyOrgNetwork'
Get-CIVAppNetwork -ParentOrgNetwork 'MyOrgNetwork'

Retrieves all vApp networks that are connected to the specified parent organization network.


Get-CIVAppStartRule - vCloud Snapin Cmdlets Reference

Get-CIVAppStartRule

Synopsis

This cmdlet retrieves the start rules for virtual machines in a specified vApp.

Syntax

Get-CIVAppStartRule [-VApp] <CIVApp[]> [-VM <CIVM[]>] [-Server <CIServer[]>] [<CommonParameters>]

Related Commands

Online version
Set-CIVAppStartRule

Detailed Description

This cmdlet retrieves the start rules for virtual machines in a specified vApp.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VApp | CIVApp[] | Specifies the vApps whose start rules you want to retrieve. | true | true (ByValue) |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
VM | CIVM[] | Specifies the virtual machines for which to retrieve start rules. | false | false |

Return Type

Zero or more CIVAppStartRule objects

Notes

Examples

-------------- Example 1 --------------

$myVApp = Get-CIVApp -Name 'MyVApp'
Get-CIVAppStartRule -VApp $myVApp

Retrieves all start rules for the specified vApp.

-------------- Example 2 --------------

$myVApp = Get-CIVApp -Name 'MyVApp'
$VMinVApp = Get-CIVM 'MyVM' -VApp $myVApp
$myVApp | Get-CIVAppStartRule -VM $VMinVApp

Retrieves start rules for the specified virtual machine.


Get-CIVAppTemplate - vCloud Snapin Cmdlets Reference

Get-CIVAppTemplate

Synopsis

This cmdlet retrieves vApp templates.

Syntax

Get-CIVAppTemplate [[-Name] <String[]>] [-Catalog <Catalog[]>] [-Owner <CIUser[]>] [-Server <CIServer[]>] [<CommonParameters>]
Get-CIVAppTemplate -Id <String[]> [-Server <CIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-CIVApp
Import-CIVApp
Import-CIVAppTempate

Detailed Description

This cmdlet retrieves vApp templates. You can filter the list of the returned templates by name, ID, catalog, and owner.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the vApp templates you want to retrieve. | false | false |
Catalog | Catalog[] | Specifies the catalog from which you want to retrieve vApp templates. | false | true (ByValue) |
Id | String[] | Specifies the IDs of the virtual appliance templates you want to retrieve. | true | false |
Owner | CIUser[] | Specifies the owners of the vApp templates you want to retrieve. | false | true (ByValue) |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |

Return Type

Zero or more CIVAppTemplate objects

Notes

Examples

-------------- Example 1 --------------

Get-CIVAppTemplate

Gets a list of all virtual appliance templates visible to you.

-------------- Example 2 --------------

Get-CIVAppTemplate -Name VAppTemplate

Gets the virtual appliance template named VAppTemplate.

-------------- Example 3 --------------

Get-CIVAppTemplate -ID vAppTempalteId

Get a vAppTemplate by Id.

-------------- Example 4 --------------

Get-Catalog Catalog1 | Get-CIVAppTemplate

Gets all virtual appliance templates in the catalog named Catalog1.


Get-CIView - vCloud Snapin Cmdlets Reference

Get-CIView

Synopsis

This cmdlet retrieves cloud views by ID.

Syntax

Get-CIView [-CIObject] <CIObject[]> [-Server <CIServer[]>] [<CommonParameters>]
Get-CIView -Id <String[]> [-ViewLevel <CIViewLevel>] [-Server <CIServer[]>] [<CommonParameters>]
Get-CIView [-ViewLevel <CIViewLevel>] -SearchResult <CISearchResult[]> [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet retrieves cloud views objects. The cmdlet converts CIObject to Cloud view object.
Supports getting views from CISearchResult objects returned by the Search-Cloud cmdlet. An Id property must be present in the CISearchResult objects.
If an Id is specified, the result view is determined by the ViewType parameter. If ViewType is not passed, the cmdlet returns the most complete representation of the object visible to the user by using the following priority: Extension, Admin, User.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
CIObject | CIObject[] | Specifies cloud objects to retrieve their views. | true | true (ByValue) |
Id | String[] | Specifies the IDs of the view object you want to retrieve. | true | false |
SearchResult | CISearchResult[] | Specifies a CISearchResult object to get the corresponding view. | true | true (ByValue) |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
ViewLevel | CIViewLevel | Specifies a Cloud object representation to be retrieved by object ID. Cloud objects may have an Extension, Admin or User representation that can be retrieved when passing an object ID. Providing a ViewLevel parameter explicitly requests the exact abstraction you want to retrieve. | false | false |

Return Type

Zero or more View objects

Notes

Examples

-------------- Example 1 --------------

$catalog = Search-Cloud -QueryType Catalog -Name Catalog1 | Get-CIView -ViewLevel Admin

Gets a cloud catalog Admin view using the search result returned by the Search-Cloud cmdlet.

-------------- Example 2 --------------

$catalogItem = Get-CIView -Id $catalog.CatalogItems.CatalogItem[0].Href

Gets the first catalog item view using the Href property from an already retrieved catalog items collection.

-------------- Example 3 --------------

$Org = Get-Org -Name Organization1 | Get-CIView

Gets a cloud organization view from the result returned by the Get-Org cmdlet.

-------------- Example 4 --------------

$userCatalog = Get-CIView -Id $catalog.Id -ViewLevel User

Gets the User cloud representation of the catalog.


Get-CIVM - vCloud Snapin Cmdlets Reference

Get-CIVM

Synopsis

This cmdlet retrieves virtual machines in the cloud.

Syntax

Get-CIVM [[-Name] <String[]>] [-Org <Org[]>] [-OrgNetwork <OrgNetwork[]>] [-OrgVdc <OrgVdc[]>] [-VApp <CIVApp[]>] [-Status <CIVAppStatus[]>] [-Server <CIServer[]>] [<CommonParameters>]
Get-CIVM -Id <String[]> [-Server <CIServer[]>] [<CommonParameters>]

Related Commands

Online version
Start-CIVM
Stop-CIVM
Suspend-CIVM
Start-CIVMGuest
Stop-CIVMGuest

Detailed Description

This cmdlet retrieves virtual machines in the cloud and filters them by the provided parameters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the name of the cloud virtual machines you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the cloud virtual machines you want to retrieve. | true | false |
Org | Org[] | Specifies from which organizations you want to retrieve virtual machines. | false | true (ByValue) |
OrgNetwork | OrgNetwork[] | Specifies the organization networks to which the virtual machines are connected. | false | true (ByValue) |
OrgVdc | OrgVdc[] | Specifies the organization vDCs for which you want to retrieve virtual machines. | false | true (ByValue) |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
Status | CIVAppStatus[] | Specifies the status of the virtual machines you want to retrieve. | false | false |
VApp | CIVApp[] | Specifies the vApps to which the virtual machines you want to retrieve belong. | false | true (ByValue) |

Return Type

Zero or more CIVM objects

Notes

Examples

-------------- Example 1 --------------

Get-CIVM

Gets all visible virtual machines for the current user.

-------------- Example 2 --------------

Get-CIVM -Name "MyVM"

Gets a single virtual machine by its name.

-------------- Example 3 --------------

Get-CIVApp -Name "*DB*"

Gets all virtual machines that match a defined string by name.

-------------- Example 4 --------------

Get-CIVM -ID $myVMId

Gets a virtual machine with a given ID.

-------------- Example 5 --------------

Get-CIVM -Org "MyOrganization"

Gets all visible virtual machines within an organization.

-------------- Example 6 --------------

Get-CIVM -OrgNetwork "OrgNetwork1"

Gets all visible virtual machines within an organization network.

-------------- Example 7 --------------

Get-OrgNetwork -Name "OrgNetwork1" | Get-CIVM

Gets all visible virtual machines within an organization network (pipeline).

-------------- Example 8 --------------

Get-CIVM -OrgVdc "MyOrgVDC1"

Gets all visible virtual machines within an organization's virtual datacenter.

-------------- Example 9 --------------

Get-OrgVdc -Name "OrgVdc1" | Get-CIVM

Get all visible virtual machines within an organization's virtual datacenter by using a pipeline syntax.

-------------- Example 10 --------------

Get-CIVM -VApp "MyVApp"

Gets virtual machines running a particular VApp.

-------------- Example 11 --------------

Get-CIVApp "MyVApp" | Get-CIVM

Gets virtual machines running a particular VApp (pipeline).

-------------- Example 12 --------------

Get-CIVM -Status "PoweredOn", "Suspended"

Gets virtual machines by status (all powered on and suspended VMs).


Get-Cluster - vSphere PowerCLI Cmdlets Reference

Get-Cluster

Synopsis

This cmdlet retrieves the clusters available on a vCenter Server system.

Syntax

Get-Cluster [-VM <VirtualMachine[]>] [-VMHost <VMHost[]>] [-Location <VIContainer[]>] [[-Name] <String[]>] [-NoRecursion] [-Server <VIServer[]>] [<CommonParameters>]
Get-Cluster -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Move-Cluster
New-Cluster
Remove-Cluster
Set-Cluster

Detailed Description

This cmdlet retrieves the clusters available on a vCenter Server system. Returns a set of clusters that correspond to the filter criteria defined by the cmdlet parameters. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the clusters you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the clusters you want to retrieve. | true | false |
Location | VIContainer[] | Specifies vSphere container objects (such as folders, datacenters, and clusters) you want to search for clusters. | false | true (ByValue) |
NoRecursion | SwitchParameter | Indicates that you want to disable the recursive behavior of the command. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VM | VirtualMachine[] | Specifies virtual machines to filter the clusters that contain at least one of them. | false | true (ByValue) |
VMHost | VMHost[] | Specifies hosts to filter the clusters that contain at least one of them. | false | true (ByValue) |

Return Type

Zero or more Cluster objects

Notes

Examples

-------------- Example 1 --------------

Get-Cluster -Location Folder

Get a list of the available clusters in the Folder folder.


Get-CustomAttribute - vSphere PowerCLI Cmdlets Reference

Get-CustomAttribute

Synopsis

This cmdlet retrieves custom attributes.

Syntax

Get-CustomAttribute [-Id <String[]>] [[-Name] <String[]>] [[-TargetType] <CustomAttributeTargetType[]>] [-Global] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-CustomAttribute
Remove-CustomAttribute
Set-CustomAttribute
Get-Annotation
Set-Annotation

Detailed Description

This cmdlet retrieves custom attributes. A custom attribute is a user-defined description field of one or more vSphere objects.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the custom attributes you want to retrieve. | false | false |
TargetType | CustomAttributeTargetType[] | Specifies a target type to filter the custom attributes by the type of objects to which they can be applied. The valid values are VirtualMachine, ResourcePool, Folder, VMHost, Cluster, Datacenter, and $null. If the value is $null, the custom attribute is global and applies to all target types. | false | false |
Global | SwitchParameter | Indicates that only global custom attributes are retrieved. A global custom attribute can be applied both to hosts and virtual machines. | false | false |
Id | String[] | Specifies the IDs of the custom attributes you want to retrieve. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more CustomAttribute objects

Notes

Examples

-------------- Example 1 --------------

Get-CustomAttribute -Global

Retrieves all global custom attributes.

-------------- Example 2 --------------

Get-CustomAttribute -TargetType "VirtualMachine", "VMHost"

Retrieves all custom attributes of type VirtualMachine and VMHost.

-------------- Example 3 --------------

Get-CustomAttribute -Name "Creation*" -Global

Retrieves only global custom attributes that match the specified name pattern.


Get-Datacenter - vSphere PowerCLI Cmdlets Reference

Get-Datacenter

Synopsis

This cmdlet retrieves the datacenters available on a vCenter Server system.

Syntax

Get-Datacenter [-VM <VirtualMachine[]>] [-Cluster <Cluster[]>] [-VMHost <VMHost[]>] [-Location <VIContainer[]>] [[-Name] <String[]>] [-NoRecursion] [-Server <VIServer[]>] [<CommonParameters>]
Get-Datacenter -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Move-Datacenter
New-Datacenter
Remove-Datacenter
Set-Datacenter

Detailed Description

This cmdlet retrieves the datacenters available on a vCenter Server system. Returns a set of datacenters that correspond to the filter criteria defined by the cmdlet parameters. By default, the cmdlet searches recursively from any provided starting point. In this case, if the location is not explicitly specified, the search includes the root folder and all other inventory items on the root folder level. If the command runs with the NoRecursion parameter set to $true, and the location is not specified, only the root folder is searched and no datacenters are returned. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the datacenters you want to retrieve. | false | false |
Cluster | Cluster[] | Specifies clusters to filter the datacenters that contain at least one of them. | false | false |
Id | String[] | Specifies the IDs of the datacenters you want to retrieve. | true | false |
Location | VIContainer[] | Specifies vSphere container objects (such as folders) you want to search for datacenters. | false | true (ByValue) |
NoRecursion | SwitchParameter | Indicates that you want to disable the recursive behavior of the command. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VM | VirtualMachine[] | Specifies virtual machines to filter the datacenters that contain at least one of them. | false | true (ByValue) |
VMHost | VMHost[] | Specifies hosts to filter the datacenters that contain at least one of them. | false | false |

Return Type

Zero or more Datacenter objects

Notes

Examples

-------------- Example 1 --------------

Get-Datacenter -Name Datacenter*

Retrieves a list of all datacenters on the server, whose names begin with "Datacenter".


Get-Datastore - vSphere PowerCLI Cmdlets Reference

Get-Datastore

Synopsis

This cmdlet retrieves the datastores available on a vCenter Server system.

Syntax

Get-Datastore [-Server <VIServer[]>] [[-Name] <String[]>] [-Location <VIObject[]>] [-RelatedObject <DatastoreRelatedObjectBase[]>] [-Refresh] [-Tag <Tag[]>] [<CommonParameters>]
Get-Datastore [-Server <VIServer[]>] -Id <String[]> [-Refresh] [<CommonParameters>]

Related Commands

Online version
New-Datastore
Remove-Datastore
Set-Datastore
Move-Datastore

Detailed Description

This cmdlet retrieves the datastores available on a vCenter Server system. Returns a set of datastores that correspond to the filter criteria defined by the cmdlet parameters. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the datastores you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the datastores you want to retrieve. | true | false |
Location | VIObject[] | Specifies vSphere container objects that you want to search for datastores. This parameter accepts Datacenter, Folder, and DatastoreCluster objects. | false | false |
Refresh | SwitchParameter | Indicates that the cmdlet first refreshes the storage system information and then retrieves the specified datastores. | false | false |
RelatedObject | DatastoreRelatedObjectBase[] | Specifies objects to retrieve one or more Datastore objects that are related to them. This parameter accepts vSphere VirtualMachine, VMHost, Datacenter, DatastoreCluster, and Folder objects, and vCloud Datastore objects. | false | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Tag | Tag[] | Returns only the datastores that are associated with any of the specified tags. | false | false |

Return Type

Zero or more Datastore objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHost -Name VMHost1, VMHost2 | Get-Datastore

Retrieves datastores from the VMHost1 and VMHost2 hosts.

-------------- Example 2 --------------

Get-Datastore MainDatastore* -Datacenter Datacenter1

Retrieves the datastores from the Datacenter1 datacenter that have names starting with MainDatastore.

-------------- Example 3 --------------

Get-Datastore -VM $vm1, $vm2

Gets the datastores for a specified array of virtual machines.

-------------- Example 4 --------------

Get-Datastore -VMHost $script:vmhost

Refreshes the host storage system and get its datastores.


Get-DatastoreCluster - vSphere PowerCLI Cmdlets Reference

Get-DatastoreCluster

Synopsis

This cmdlet retrieves datastore clusters.

Syntax

Get-DatastoreCluster [-Id <String[]>] [[-Name] <String[]>] [-Location <VIContainer[]>] [-VM <VirtualMachine[]>] [-Template <Template[]>] [-Datastore <Datastore[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-DatastoreCluster
Remove-DatastoreCluster
Set-DatastoreCluster

Detailed Description

This cmdlet retrieves datastore clusters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the datastore clusters you want to retrieve. | false | false |
Datastore | Datastore[] | Filters the datastore clusters by the datastores located in them. | false | true (ByValue) |
Id | String[] | Specifies the IDs of the datastore clusters you want to retrieve. | false | false |
Location | VIContainer[] | Specifies the datacenters and folders from which you want to retrieve datastore clusters. | false | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Template | Template[] | Filters the datastore clusters by the virtual machine templates located in them. | false | true (ByValue) |
VM | VirtualMachine[] | Filters the datastore clusters by the virtual machines located in them. | false | true (ByValue) |

Return Type

Zero or more DatastoreCluster objects

Notes

Examples

-------------- Example 1 --------------

Get-DatastoreCluster

Retrieves all datastore clusters.

-------------- Example 2 --------------

Get-DatastoreCluster -Name DatastoreCluster1

Retrieves a datastore cluster by name.

-------------- Example 3 --------------

Get-VM -Name WebServerVM | Get-DatastoreCluster

Retrieves datastore clusters through filtering by virtual machine.


Get-DeployRule - vSphere Auto Deploy Reference

Get-DeployRule

Synopsis

Gets a DeployRule object.

Syntax

Get-DeployRule [[-Name] <String[]>] [<CommonParameters>]

Related Commands

New-DeployRule

Detailed Description

Gets the DeployRule object with the specified name from the VMware Auto Deploy server. If no rule names are given, all visible rules are returned. Hidden rules start with a dot and can be retrieved by using a wildcard pattern that starts with a dot (e.g. '.example*').

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Name of the deploy rule to retrieve. Wildcard patterns can be used here to retrieve multiple rules at a time. | false | false |

Return Type

VMware.DeployAutomation.Types.DeployRule

Notes

Examples

-------------- Example 1 --------------

C:\PS> $rule = Get-DeployRule "testrule"

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Get-DeployRuleSet - vSphere Auto Deploy Reference

Get-DeployRuleSet

Synopsis

Gets the current working rule set or the current active rule set.

Syntax

Get-DeployRuleSet [-Active] [-Working] [<CommonParameters>]

Related Commands

Add-DeployRule
Remove-DeployRule

Detailed Description

Gets the current working rule set or the current active rule set. The active rule set governs how new hosts are to be deployed. The working set can be used to test out changes before making them active. By default, any cmdlets that change the rule set will immediately activate the change. However, you can pass the NoActivate parameter to the cmdlet to delay activation until Switch-ActiveDeployRuleSet is called on the working rule set.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Active | SwitchParameter | Retrieve the active rule set. | false | false |
Working | SwitchParameter | Retrieve the working rule set. | false | false |

Return Type

VMware.DeployAutomation.Types.DeployRuleSet

Notes

Examples

-------------- Example 1 --------------

C:\PS> Get-DeployRuleSet

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Get-DrsRecommendation - vSphere PowerCLI Cmdlets Reference

Get-DrsRecommendation

Synopsis

This cmdlet retrieves the available DRS recommendations from the provided clusters.

Syntax

Get-DrsRecommendation [[-Cluster] <Cluster[]>] [-Refresh] [-Priority <Int32[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Apply-DrsRecommendation

Detailed Description

This cmdlet retrieves the available DRS recommendations from the provided clusters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Cluster | Cluster[] | Specifies the clusters whose DRS recommendations you want to retrieve. | false | true (ByValue) |
Priority | Int32[] | Specifies the priority of the DRS recommendations you want to retrieve. The valid values range from 1 to 5. | false | false |
Refresh | SwitchParameter | Indicates that you want the cmdlet to refresh the information about the DRS recommendations before retrieving it. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more DrsRecommendation objects

Notes

Examples

-------------- Example 1 --------------

Get-Cluster Cluster | Get-DrsRecommendation -Priority 4,5

Retrieves the DRS recommendations with priorities 4 and 5 from the Cluster cluster.

-------------- Example 2 --------------

Get-DrsRecommendation -Cluster Cluster -Refresh

Refreshes and retrieves information about the DRS recommendations from the Cluster cluster.


Get-DrsRule - vSphere PowerCLI Cmdlets Reference

Get-DrsRule

Synopsis

This cmdlet retrieves the list of DRS rules for the specified clusters.

Syntax

Get-DrsRule [[-Name] <String[]>] [-Cluster] <Cluster[]> [[-VM] <VirtualMachine[]>] [-Type <ResourceSchedulingRuleType[]>] [-Server <VIServer[]>] [<CommonParameters>]
Get-DrsRule [[-Name] <String[]>] [-Cluster] <Cluster[]> [[-VM] <VirtualMachine[]>] [-VMHost <VMHost[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-DrsRule
Remove-DrsRule
Set-DrsRule

Detailed Description

This cmdlet retrieves the list of DRS rules for the specified clusters. Each rule defines the virtual machines that can run on the same host (affinity rule) or must run on different hosts (anti-affinity).

Note: To retrieve VMHostAffinity rules, you need to state this explicitly by using the Type or the VMHost parameter. Otherwise, this cmdlet returns VMAffinity and VMAntiAffinity rules.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the name of the DRS rule you want to retrieve. | false | false |
Cluster | Cluster[] | Specifies the clusters for which you want to retrieve the DRS rules. | true | true (ByValue) |
VM | VirtualMachine[] | Specifies virtual machines to filter the DRS rules that reference them. Passing values to this parameter through a pipeline is deprecated and will be removed in a future release. | false | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Type | ResourceSchedulingRuleType[] | Specifies the type of DRS rules you want to retrieve. This parameter accepts VMAntiAffinity, VMAffinity, and VMHostAffinity values. You cannot set this parameter, when the VMHost parameter is specified. | false | false |
VMHost | VMHost[] | Specifies VM hosts to filter the DRS rules that reference them. When this parameter is specified, the cmdlet returns only VMHostAffinity rules. You cannot set this parameter, when the Type parameter is specified. | false | true (ByValue) |

Return Type

Zero or more DrsRule objects

Notes

Examples

-------------- Example 1 --------------

$myCluster = Get-Cluster -Name "MyCluster1"
Get-DrsRule -Cluster $myCluster -Name "*Rule1*"

Retrieves the DRS rules for the cluster stored in the $myCluster variable, whose names contain "Rule1".

-------------- Example 2 --------------

Get-Cluster -Name 'MyCluster1' | Get-DrsRule

Retrieves the virtual machine affinity and anti-affinity rules for the specified cluster by pipeline.

-------------- Example 3 --------------

$myVm1 = Get-VM -Name 'MyVm1'
$myCluster1 = Get-Cluster 'MyCluster1'
Get-DrsRule -Cluster $myCluster1 -VM $myVm1

Retrieves the virtual machine affinity and anti-affinity rules for the specified virtual machine in the specified cluster.

-------------- Example 4 --------------

Get-Cluster 'MyCluster1' | Get-DrsRule -Type VMHostAffinity

Retrieves virtual machine to host affinity rules for the specified cluster by pipeline.

-------------- Example 5 --------------

$myVMHost1 = Get-VMHost -Name 'MyVMHost1'
$myCluster1 = Get-Cluster -Name 'MyCluster1'
Get-DrsRule -Cluster $myCluster1 -VMHost $myVMHost1

Retrieves virtual machine to host affinity rules for the specified host and cluster.


Get-ErrorReport - vSphere PowerCLI Cmdlets Reference

Get-ErrorReport

Synopsis

This cmdlet collects debugging information in order to identify a problem in the work environment.

Syntax

Get-ErrorReport [-ProblemDescription] <String> [-ProblemScriptTimeoutSeconds] <Double> [[-Destination] <DirectoryInfo>] [-ProblemScript] <ScriptBlock> [-DontIncludeServerLogs] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet collects debugging information in order to identify a problem in the work environment. The cmdlet runs a script that reproduces the problem and captures any relevant information in a single .zip file. Then, you can send the .zip file to the PowerCLI support for analysis.
To generate an error report:
1. Isolate the problem into a simple script.
2. (Optional) Set the vCenter Server logging level to "Trivia".
3. Run Get-ErrorReport to generate the support bundle.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
ProblemDescription | String | Provides a description of the problem you want to capture in the error report bundle. | true | false |
ProblemScriptTimeoutSeconds | Double | Specifies a time period in seconds for which you want to wait for the script to run before considering it non-responding. | true | false |
Destination | DirectoryInfo | Specifies the directory where you want to save the error report. If no value is specified for this parameter, the error report is saved in the current file system location. | false | false |
ProblemScript | ScriptBlock | Specifies the script that reproduces the error that you want to report. | true | true (ByValue) |
DontIncludeServerLogs | SwitchParameter | Indicates that you want no logs from vCenter Server to be included in the error report. Setting this option to $false might slow down the operation. | false | false |

Return Type

Zero or more FileInfo objects

Notes

Examples

-------------- Example 1 --------------

$script = {
Connect-VIServer 10.23.34.36
$vapp = Get-VApp
Get-VM VM -Location $vapp
}

$script | Get-ErrorReport -ProblemScriptTimeoutSeconds 10 -ProblemDescription "No VM is returned. There are several VMs in this vApp. The vApp is in a DRS-enabled cluster. All VMs part of the vApp are expected to be returned." -Destination 'D:\bug reports'

Saves the script that reproduces the error into a variable and passes the script to Get-ErrorReport. The command provides a problem description, a destination for storing the error report, and a time period after which the script is considered non-responding.


Get-EsxCli - vSphere PowerCLI Cmdlets Reference

Get-EsxCli

Synopsis

This cmdlet exposes the ESXCLI functionality.

Syntax

Get-EsxCli -VMHost <VMHost[]> [[-Server] <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-EsxTop

Detailed Description

This cmdlet xposes the ESXCLI functionality.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | true (ByValue) |
VMHost | VMHost[] | Specifies hosts on which you want to expose the ESXCLI functionality. | true | true (ByValue) |

Return Type

One EsxCli object per host

Notes

Supported on ESX 4.0/vCenter Server 5.0 and later.

Examples

-------------- Example 1 --------------

$esxcli = Get-EsxCli -Server $global:DefaultVIServer

Retrieves ESXCLI from the default ESX connection. This example works only on vCenter Server 5.0/ESXi 5.0.

-------------- Example 2 --------------

$esxcli.storage.nmp

Gets a list of all available applications in the specified namespace. This example works only on vCenter Server 5.0/ESXi 5.0.

-------------- Example 3 --------------

$esxcli.storage.nmp.device

Gets a list of all available commands of the specified application. This example works only on vCenter Server 5.0/ESXi 5.0.

-------------- Example 4 --------------

$esxcli.storage.nmp.device.list($null)

Runs a command of an ESXCLI application by using the ESXCLI wrapper of PowerCLI. This example works only on vCenter Server 5.0/ESXi 5.0.

-------------- Example 5 --------------

$esxcli.storage.nmp.device.set($null, "naa.60060160b0402000f03655712a12de11", "VMW_PSP_MRU")

Runs a command of an ESXCLI application by using the ESXCLI wrapper of PowerCli. This example works only on vCenter Server 5.0/ESXi 5.0.

-------------- Example 6 --------------

$esxcli.TypeManager.QueryMoInstances($null)

Gets a list of all available managed object instance descriptors. This example works only on vCenter Server 5.0/ESXi 5.0.

-------------- Example 7 --------------

$moTypeInfo = $esxcli.TypeManager.QueryTypeInfo("vim.EsxCLI.storage.nmp.device")

$moTypeInfo.managedTypeInfo[0].method

Gets information about the specified managed object type (vim.EsxCLI.storage.nmp.device) and methods.

-------------- Example 8 --------------

$moInstance = $esxcli.TypeManager.CreateDynamicManagedObject("ha-cli-handler-storage-nmp-device")

Creates a dynamic managed object for the specified managed object instance descriptor. This example works only on vCenter Server 5.0/ESXi 5.0.

-------------- Example 9 --------------

$moInstance.InvokeOperation("list", $null)

Calls a method without specifying parameters on a dynamic managed object. This example works only on vCenter Server 5.0/ESXi 5.0.

-------------- Example 10 --------------

$moInstance.InvokeOperation("set", @{"device" = "naa.60060160b0402000f03655712a12de11"; "psp" = "VMW_PSP_MRU"})

Calls a method with parameters on a dynamic managed object. The parameters of the method are specified as a hash table. This example works only on vCenter Server 5.0/ESXi 5.0.


Get-EsxImageProfile - vSphere Imagebuilder Reference

Get-EsxImageProfile

Synopsis

Syntax

Get-EsxImageProfile [[-Name] <String[]>] [[-Vendor] <String[]>] [[-AcceptanceLevel] <AcceptanceLevels[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Detailed Description

Lists the image profiles from software depots as well as image profiles created by the user. The output is in table form by default. Pass the image profile in the -ImageProfile parameter to the New-EsxImageProfile, Export-EsxImageProfile, Set-EsxImageProfile, Add-EsxSoftwarePackage, Remove-EsxSoftwarePackage, and Compare-EsxImageProfile cmdlets in one of these ways:

*Use the name of the image profile
*Pipe the output of this cmdlet into the cmdlets See each cmdlet's examples for details.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Filters the output to list only image profiles whose Name field matches one of the strings supplied. Wildcard characters are supported. | false | false |
Vendor | String[] | Filters the output to list only image profiles whose Vendor field matches one of the strings supplied. Wildcard characters are supported. | false | false |
AcceptanceLevel | AcceptanceLevels[] | Filters the output to list only image profiles whose AcceptanceLevel field matches one of the strings supplied. Must be one of the following values: *VMwareCertified *VMwareAccepted *PartnerSupported *CommunitySupported | false | false |
Confirm | SwitchParameter |  | false | false |
WarningAction | ActionPreference |  | false | false |
WarningVariable | String |  | false | false |
WhatIf | SwitchParameter |  | false | false |

Return Type

Notes

Examples

---------- Example 1 ----------

Get-EsxImageProfile

Display all image profiles from depots and all image profiles the user created during this PowerCLI session:

---------- Example 2 ----------

Get-EsxImageProfile -Name "ESX-5.0*"

Display all ESX 5.0 profiles:

---------- Example 3 ----------

Get-EsxImageProfile | ? {$_.Vendor -ne "VMware"}

Display all image profiles from vendors other than VMware:

---------- Example 4 ----------

(Get-EsxImageProfile -Name "Profile A").VibList

List all the VIB packages from a particular image profile:

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Get-EsxSoftwarePackage - vSphere Imagebuilder Reference

Get-EsxSoftwarePackage

Synopsis

Syntax

Get-EsxSoftwarePackage [[-Name] <String[]>] [[-Version] <String[]>] [-Vendor <String[]>] [-AcceptanceLevel <AcceptanceLevels[]>] [-CreatedBefore <DateTime>] [-CreatedAfter <DateTime>] [-Newest] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Detailed Description

Returns a list of SoftwarePackage (VIB) objects from all the connected depots, filtered by one or more options. The output is in table form by default. You can pass VIB package names and versions to the New-EsxImageProfile, Set-EsxImageProfile, Add-EsxSoftwarePackage, and Remove-EsxSoftwarePackage cmdlets via the -SoftwarePackage parameter.

The output of this cmdlet can also be piped into Add-EsxSoftwarePackage and Remove-EsxSoftwarePackage. See the examples under those cmdlets.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Filters the output to list only VIBs whose Name field matches one of the strings supplied. Wildcard characters are supported. | false | false |
Version | String[] | Filters the output to list only VIBs whose Version field matches one of the strings supplied. Wildcard characters are supported. | false | false |
AcceptanceLevel | AcceptanceLevels[] | Filters the output to list only VIBs whose acceptance level matches one of the strings supplied. Must be one of the following values: * VMwareCertified * VMwareAccepted * PartnerSupported * CommunitySupported | false | false |
Confirm | SwitchParameter |  | false | false |
Newest | SwitchParameter | Filters the output to list only the newest versions of all VIBs. For example, if there are two versions of the "Base-ESX" VIB, "5.0.0-10", and "5.0.0-456", returns only Base-ESX version "5.0.0-456". | false | false |
CreatedAfter | DateTime | Filters the output to list only VIBs whose CreationDate is at the earliest the DateTime value supplied. Can be a string of the form MM/DD/YY. | false | false |
CreatedBefore | DateTime | Filters the output list to only VIBs whose CreationDate is at the latest the DateTime value supplied. Can be a string of the form MM/DD/YY. | false | false |
Vendor | String[] | Filters the output to list only VIBs whose Vendor field matches one of the strings supplied. Wildcard characters are supported. | false | false |
WarningAction | ActionPreference |  | false | false |
WarningVariable | String |  | false | false |
WhatIf | SwitchParameter |  | false | false |

Return Type

Notes

Examples

---------- Example 1 ----------

Get-EsxSoftwarePackage

List all the VIBs from all depots in table form:

---------- Example 2 ----------

Get-EsxSoftwarePackage | Sort-Object CreationDate | Format-Table -Property Name,Version,Vendor

List all the VIBs, sorted by date:

---------- Example 3 ----------

Get-EsxSoftwarePackage -Vendor "VMware","Cisco" -CreatedAfter 1/1/2010

List all the VIBs from VMware and Cisco created after Jan 1, 2010:

---------- Example 4 ----------

Get-EsxSoftwarePackage | ? {$_.Vendor -ne "VMware"}

List all the VIBs from vendors other than VMware

---------- Example 5 ----------

Get-EsxSoftwarePackage -Name "esx-base" -Version "5.0.0-*"

List all the base VIBs for the 5.0.0 release:

---------- Example 6 ----------

$vibs = Get-EsxSoftwarePackage -Name "esx-base" -Version "5.0.0-*"

Save the results of a VIB query for later:

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Get-EsxTop - vSphere PowerCLI Cmdlets Reference

Get-EsxTop

Synopsis

This cmdlet exposes the esxtop functionality.

Syntax

Get-EsxTop [[-CounterName] <String[]>] [-Server <VIServer[]>] [<CommonParameters>]
Get-EsxTop [[-CounterName] <String[]>] -Counter [-Server <VIServer[]>] [<CommonParameters>]
Get-EsxTop -TopologyInfo [[-Topology] <String[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-EsxCli

Detailed Description

This cmdlet exposes the esxtop functionality. The default parameter set is CounterValues. The Counter parameter filters the specified statistics. To retrieve all available counters, use the CounterInfo parameter set. The properties of each counter are returned through the Fields property (an array) of the CounterInfo output object. You can also retrieve stats topologies using the TopogyInfo parameter set. This information contains either inventory data that does not change or a counter instance structure describing the relationship between different counter instances.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
CounterName | String[] | Specifies the name of the counter for which you want to retrieve information. | false | false |
Topology | String[] | Specifies the topologies for which you want to retrieve information. | false | false |
Counter | SwitchParameter | Indicates that you want to retrieve counters information. | true | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | true (ByValue) |
TopologyInfo | SwitchParameter | Indicates that you want to retrieve topologies of the statistics. | true | false |

Return Type

Zero or more Counter, TopologyInfo, or CounterValue objects

Notes

Works only against ESX 4.0 or later.

Examples

-------------- Example 1 --------------

Get-EsxTop -TopologyInfo

Retrieves the available topologies.

-------------- Example 2 --------------

Get-EsxTop -Counter

Retrieves the available counters.

-------------- Example 3 --------------

$vm = Get-VM VM

$group = Get-EsxTop -CounterName SchedGroup | where {$_.VMName -eq $vm.Name}

$gr = Get-EsxTop -TopologyInfo -Topology SchedGroup | %{$_.Entries} | where {$_.GroupId -eq $group.GroupID}

$cpuIds = @()

$gr.CpuClient | %{$cpuIds += $_.CPUClientID}

$cpuStats = Get-EsxTop -CounterName 'VCPU' | where {$cpuIds -contains $_.VCPUID}

$cpuStats | fl *

Retrieves statistics for the virtual CPUs of the specified virtual machine.


Get-ExternalNetwork - vCloud Snapin Cmdlets Reference

Get-ExternalNetwork

Synopsis

This cmdlet retrieves cloud external networks.

Syntax

Get-ExternalNetwork [[-Name] <String[]>] [-VlanId <String[]>] [-ProviderVdc <ProviderVdc[]>] [-Server <CIServer[]>] [<CommonParameters>]
Get-ExternalNetwork -Id <String[]> [-Server <CIServer[]>] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet retrieves cloud external networks. You can filter the returned networks by name, ID, virtual LAN ID, and provider vDC. Note: This cmdlet is only available to Provider Administrators.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the cloud external networks you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the cloud external networks you want to retrieve. | true | false |
ProviderVdc | ProviderVdc[] | Retrieves only the external networks accessible by the specified provider Vdc. | false | true (ByValue) |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
VlanId | String[] | Specifies the vLAnIDs of the cloud external networks you want to retrieve. | false | false |

Return Type

Zero or more ExternalNetwork objects

Notes

Examples

-------------- Example 1 --------------

Get-ExternalNetwork

Gets all available cloud external networks. You must be connected as a system administrator.

-------------- Example 2 --------------

Get-ExternalNetwork -Name ExtNetwork -Server $CIServer

Gets an external network named ExtNetwork from provided server. You must be connected as a system administrator.

-------------- Example 3 --------------

Get-ProviderVdc "myProviderVDC" | Get-ExternalNetwork

Gets the external networks from the specified provider Vdc. You must be connected as a system administrator.


Get-FloppyDrive - vSphere PowerCLI Cmdlets Reference

Get-FloppyDrive

Synopsis

This cmdlet retrieves the virtual floppy drives available on a vCenter Server system.

Syntax

Get-FloppyDrive [-Id <String[]>] [-Server <VIServer[]>] [[-VM] <VirtualMachine[]>] [[-Template] <Template[]>] [[-Snapshot] <Snapshot[]>] [-Name <String[]>] [<CommonParameters>]

Related Commands

Online version
New-FloppyDrive
Remove-FloppyDrive
Set-FloppyDrive

Detailed Description

This cmdlet retrieves the virtual floppy drives available on a vCenter Server system. Returns a set of virtual floppy drives that belong to the virtual machines, templates, and snapshots specified by the VirtualMachine, Template, and Snapshot parameters. At least one of these parameters must be provided. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines from which you want to retrieve virtual floppy drives. | false | true (ByValue) |
Template | Template[] | Specifies the templates from which you want to retrieve virtual CD drives. | false | true (ByValue) |
Snapshot | Snapshot[] | Specifies the snapshots from which you want to retrieve virtual CD drives. | false | true (ByValue) |
Id | String[] | Specifies the IDs of the floppy drives you want to retrieve. | false | false |
Name | String[] | Specifies the names of the floppy drives you want to retrieve. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more FloppyDrive objects

Notes

Examples

-------------- Example 1 --------------

Get-FloppyDrive -VM VM

Retrieves the floppy drive of the virtual machine named VM.


Get-Folder - vSphere PowerCLI Cmdlets Reference

Get-Folder

Synopsis

This cmdlet retrieves the folders available on a vCenter Server system.

Syntax

Get-Folder [-Location <VIContainer[]>] [-Type <FolderType[]>] [[-Name] <String[]>] [-NoRecursion] [-Server <VIServer[]>] [<CommonParameters>]
Get-Folder -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-Folder
Remove-Folder
Set-Folder
Move-Folder

Detailed Description

This cmdlet retrieves the folders available on a vCenter Server system. The cmdlet returns a set of folders that correspond to the filter criteria provided by the cmdlet parameters. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the folders you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the folders you want to retrieve. | true | false |
Location | VIContainer[] | Specifies vSphere container objects (folders, datacenters, or clusters) you want to search for folders. | false | true (ByValue) |
NoRecursion | SwitchParameter | Indicates that you want to disable the recursive behavior of the command. | false | false |
Server | VIServer[] | Specifies the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Type | FolderType[] | Specifies the type of the folders you want to retrieve. The valid values are VM, HostAndCluster, Datastore, Network, and Datacenter. | false | false |

Return Type

Zero or more Folder objects

Notes

Examples

-------------- Example 1 --------------

$server = Connect-VIServer -Server 10.23.112.235

Get-Folder -Server $server -Name Folder

Retrieves the folder named Folder on the server with IP address 10.23.112.235.

-------------- Example 2 --------------

Get-Folder -NoRecursion

Retrieves the root folder.

-------------- Example 3 --------------

Get-Folder -Location $folder

Gets all folders in the specified location.

-------------- Example 4 --------------

$folder = Get-Folder | Select -first 1

Get-Folder -ID $folder.ID

Gets a folder by ID.

-------------- Example 5 --------------

Get-Folder -Type Network

Gets all network folders.


Get-HAPrimaryVMHost - vSphere PowerCLI Cmdlets Reference

Get-HAPrimaryVMHost

Synopsis

On vCenter Server 5.0 and later, this cmdlet retrieves the master host of the specified HA cluster. On vCenter Server versions earlier than 5.0, this cmdlet retrieves the primary HA (High-Availability) hosts for the specified clusters.

Syntax

Get-HAPrimaryVMHost [[-Cluster] <Cluster[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version

Detailed Description

On vCenter Server 5.0 and later, the cmdlet retrieves the master host of the specified HA cluster.
On vCenter Server versions earlier than 5.0, the cmdlet retrieves the primary HA (High-Availability) hosts for the specified clusters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Cluster | Cluster[] | Specifies the clusters for which you want to retrieve the HA primary hosts. | false | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VMHost objects

Notes

Examples

-------------- Example 1 --------------

Get-Cluster | Get-HAPrimaryVMHost

Retrieves the HA primary hosts of the available cluster.

-------------- Example 2 --------------

Get-HAPrimaryVMHost Cluster

Retrieves the HA primary host of the cluster named Cluster.


Get-HardDisk - vSphere PowerCLI Cmdlets Reference

Get-HardDisk

Synopsis

This cmdlet retrieves the virtual hard disks available on a vCenter Server system.

Syntax

Get-HardDisk [-Id <String[]>] [-Path <DatastoreItem[]>] [-DiskType <DiskType[]>] [-Server <VIServer[]>] [<CommonParameters>]
Get-HardDisk [-Id <String[]>] -Datastore <Datastore[]> [-DatastorePath <String[]>] [-DiskType <DiskType[]>] [-Server <VIServer[]>] [<CommonParameters>]
Get-HardDisk [-Id <String[]>] [-DiskType <DiskType[]>] [-Server <VIServer[]>] [[-VM] <VirtualMachine[]>] [[-Template] <Template[]>] [[-Snapshot] <Snapshot[]>] [-Name <String[]>] [<CommonParameters>]

Related Commands

Online version
Copy-HardDisk
New-HardDisk
Remove-HardDisk
Set-HardDisk
Move-HardDisk

Detailed Description

This cmdlet returns the virtual hard disks available on a vCenter Server system. You can retrieve a hard disk by specifying the virtual machines, templates, or snapshots to which it belongs. If the hard disk is not attached to any virtual machines, templates, or snapshots, you can search for it in datastores or retrieve it by providing a datastore path to the file where the virtual hard disk is stored. In this case, you might not be able to derive disk type info, and the value of the DiskType property of the hard disk is Unknown.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines from which you want to retrieve the hard disks. | false | true (ByValue) |
Template | Template[] | Specifies the virtual machine templates from which you want to retrieve the hard disks. | false | true (ByValue) |
Snapshot | Snapshot[] | Specifies the snapshots from which you want to retrieve the hard disks. | false | true (ByValue) |
Datastore | Datastore[] | Specifies the datastores or datastore clusters you want to search for hard disks. This parameter is required when retrieving a hard disk that is attached to no virtual machines, templates, or snapshots. | true | true (ByValue) |
DatastorePath | String[] | Specifies datastore paths to the hard disks you want to retrieve. The paths must be in the following format: [datastore_name] <file_path>, where [datastore_name] is the name of the datastore in square brackets and <file_path> is a slash-delimited path from the root of the datastore to the virtual hard disk file. The cmdlet searches recursively the specified locations. To learn more about the Datastore Provider, in the vSphere PowerCLI service console, type: help about_vimdatastore | false | false | If working in the datastore provider - the current path, else - &null.
DiskType | DiskType[] | Specifies the type of the hard disks you want to retrieve. The valid values are rawVirtual, rawPhysical, flat, and unknown. If the hard disk is not attached to any virtual machines, templates, or snapshots, you can retrieve it by providing a datastore path to the file where the virtual hard disk is stored. In this case, you might not be able to derive disk type info, and the value of the DiskType property of the hard disk is Unknown. | false | false |
Id | String[] | Specifies the IDs of the hard disks you want to retrieve. | false | false |
Name | String[] | Specifies the names of the SCSI hard disks you want to retrieve. | false | false |
Path | DatastoreItem[] | Specifies the file paths to the virtual hard disks you want to retrieve. The cmdlet searches recursively the specified locations. | false | false | If in a datastore provider - the current path, else - null.
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more HardDisk objects

Notes

Examples

-------------- Example 1 --------------

Get-HardDisk -VM VM

Retrieves the hard disks of the virtual machine named VM.

-------------- Example 2 --------------

Get-HardDisk -VM $vm -DiskType flat

Retrieves the flat hard disks from the specified virtual machines.

-------------- Example 3 --------------

Get-HardDisk -Datastore "Storage1" -DatastorePath "[Storage1] myVM/"

Retrieves the hard disks from the specified datastore and from the specified datastore path.


Get-Inventory - vSphere PowerCLI Cmdlets Reference

Get-Inventory

Synopsis

This cmdlet retrieves the inventory items available on a vCenter Server system.

Syntax

Get-Inventory [-Location <VIContainer[]>] [[-Name] <String[]>] [-NoRecursion] [-Server <VIServer[]>] [<CommonParameters>]
Get-Inventory -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Move-Inventory
Remove-Inventory

Detailed Description

This cmdlet retrieves the inventory items available on a vCenter Server system. The cmdlet returns a set of inventory items that correspond to the filter criteria specified by the provided parameters. To specify a server different from the default one, use the -Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the inventory objects you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the inventory objects you want to retrieve. | true | false |
Location | VIContainer[] | Specifies vSphere container objects (such as folders, datacenters, and clusters) you want to search for inventory items. | false | true (ByValue) |
NoRecursion | SwitchParameter | Indicates that you want to disable the recursive behavior of the command. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VIObject objects

Notes

Examples

-------------- Example 1 --------------

Get-Inventory -Location Datacenter -Name *Pool

Retrieves all inventory items in the Datacenter datacenter, whose names end with "Pool".


Get-IScsiHbaTarget - vSphere PowerCLI Cmdlets Reference

Get-IScsiHbaTarget

Synopsis

This cmdlet retrieves the available iSCSI HBA targets.

Syntax

Get-IScsiHbaTarget [[-IScsiHba] <IScsiHba[]>] [-Type <IScsiHbaTargetType[]>] [[-IPEndPoint] <String[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-IScsiHbaTarget
Remove-IScsiHbaTarget
Set-IScsiHbaTarget
Get-VMHostHba
Set-VMHostHba

Detailed Description

This cmdlet retrieves the available iSCSI HBA targets. The cmdlet retrieves the configured targets (send and static) on the specified iSCSI storage adapters. If IPEndPoint is specified, filters the result by <Address>:<Port>. If no IScsiHba is provided - retrieves all targets from the entire inventory.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
IPEndPoint | String[] | Specifies <Address>:<Port> to filter the available iSCSI HBA targets. | false | false |
IScsiHba | IScsiHba[] | Specifies the iSCSI HBA whose targets you want to retrieve. | false | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Type | IScsiHbaTargetType[] | Specifies the type of the iSCSI HBA targets you want to retrieve. The valid values are Send and Static. | false | false |

Return Type

Zero or more IScsiHbaSendTarget or IScsiHbaStaticTarget objects

Notes

Examples

-------------- Example 1 --------------

Get-IScsiHbaTarget -Address "10.23.84.73" -Type Send

Retrieves the targets of type Send on the specified address.


Get-LicenseDataManager - VMware.VimAutomation.License Cmdlets Reference

Get-LicenseDataManager

Synopsis

Returns the vSphere LicenseDataManager objects for the specified vSphere servers.

Syntax

Get-LicenseDataManager [[-Server] <VIServer[]>] [<CommonParameters>]

Related Commands

Online version

Detailed Description

Returns the vSphere LicenseDataManager objects for the specified vSphere servers.

LicenseDataManager allows for extending the vCenter Server inventory with license data associated with inventory nodes. The license data consists of VMware licensing material and takes the form of a list of {license type id, license key} pairs. The inventory nodes which can be associated with license data are individual hosts or host containers, such as clusters, datacenters and datacenter folders. Presence of such license data makes it possible to support automatic licensing when hosts are added to a particular host container entity.

LicenseDataManager provides methods for retrieving, creating, modifying and removing associations between license data and inventory nodes.

For more information about LicenseDataManager type: Get-Help about_licensedatamanager

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Server | VIServer[] | Specifies the vCenter servers on which to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | true (ByValue) |

Return Type

LicenseDataManager

Notes

Get-LicenseDataManager is supported only on servers that are vCenter Server 5.0 or higher.

Examples

-------------- Example 1 --------------

Connect-VIServer -Server 10.23.112.235

$licenseDataManager = Get-LicenseDataManager

$licenseDataManager.QueryEntityLicenseData()

Retrieves all entity<->license data associations.

-------------- Example 2 --------------

$viServer = Connect-VIServer -Server 10.23.112.235

$licenseDataManager = Get-LicenseDataManager -Server $viServer

$hostContainer = Get-Datacenter -Name Datacenter1

$licenseDataManager.QueryAssociatedLicenseData($hostContainer.Uid)

Retrieves the license data associated with Datacenter1.

-------------- Example 3 --------------

$viServer = Connect-VIServer -Server 10.23.112.235

$licenseDataManager = Get-LicenseDataManager -Server $viServer

$licenseData = New-Object Vmware.VimAutomation.License.Types.LicenseData

$licenseKeyEntry = New-Object Vmware.VimAutomation.License.Types.LicenseKeyEntry

$licenseKeyEntry.TypeId = "vmware-vsphere"

$licenseKeyEntry.LicenseKey = "00000-11111-11111-11111-11111"

$licenseData.LicenseKeys += $licenseKeyEntry

$hostContainer = Get-Datacenter -Name Datacenter1

$licenseDataManager.UpdateAssociatedLicenseData($hostContainer.Uid, $licenseData)

Associates new license data with Datacenter1. The license data holds single license key entry suitable for licensing vSphere hosts.

-------------- Example 4 --------------

$viServer = Connect-VIServer -Server 10.23.112.235

$licenseDataManager = Get-LicenseDataManager -Server $viServer

$hostContainer = Get-Datacenter -Name Datacenter1

$licenseDataManager.UpdateAssociatedLicenseData($hostContainer.Uid, $null)

Removes the license data (if any) associated with Datacenter1.

-------------- Example 5 --------------

$viServer = Connect-VIServer -Server 10.23.112.235

$licenseDataManager = Get-LicenseDataManager -Server $viServer

$hostContainer = Get-Datacenter -Name Datacenter1

$licenseDataManager.QueryEffectiveLicenseData($hostContainer.Uid)

Retrieves the merged license data associated with Datacaneter1 and its host container predecessors (in the context of the inventory) (if such predecessors exist and if they are associated some license data). The data is merged in bottom-up fashion such that there is only one license key entry per type id (e.g. child license key entry for a license type id is with higher priority). The resulting merged license data is the effective data used for automatic licensing when vSphere host is added to Datacenter1.

-------------- Example 6 --------------

$viServer = Connect-VIServer -Server 10.23.112.235

$licenseDataManager = Get-LicenseDataManager -Server $viServer

$host = Get-VMHost -Name Host1

$licenseDataManager.ApplyAssociatedLicenseData($host.Uid)

Applies the merged license data associated with Host1 and its host container predecessors (using the same rules as in QueryEffectiveLicenseData($host.Uid)) to Host1.


Get-Log - vSphere PowerCLI Cmdlets Reference

Get-Log

Synopsis

This cmdlet retrieves entries from vSphere logs.

Syntax

Get-Log [-Key] <String[]> [[-VMHost] <VMHost[]>] [[-StartLineNum] <Int32>] [[-NumLines] <Int32>] [-Server <VIServer[]>] [<CommonParameters>]
Get-Log [[-VMHost] <VMHost[]>] [-Bundle] [-DestinationPath] <String> [-Server <VIServer[]>] [-RunAsync] [<CommonParameters>]

Related Commands

Online version
Get-LogType

Detailed Description

This cmdlet retrieves entries from vSphere logs. Returns portions of the log files according to the criteria provided by the cmdlet parameters.
To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Key | String[] | Specifies the key identifier of the log file you want to retrieve. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. | true | true (ByValue) |
DestinationPath | String | Specifies a local file path where you want to save the log bundle. | true | false |
VMHost | VMHost[] | Specifies the hosts for which you want to retrieve logs. If no value is given to this parameter, the command returns logs only for the default vCenter Server system. | false | true (ByValue) |
StartLineNum | Int32 | Specifies the start line number for reading from the logs. | false | false |
NumLines | Int32 | Specifies the number of the lines you want to retrieve from the logs. | false | false |
Bundle | SwitchParameter | Indicates whether to retrieve a diagnostic bundle of logs from vCenter Server. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more Log or LogBundle objects

Notes

Examples

-------------- Example 1 --------------

$keys = Get-LogType

Get-Log -Key $keys[0]

Obtain the available keys. Obtains the first log file from the currently connected vCenter Server system.

-------------- Example 2 --------------

$vmhost = Get-VMHost Host

$keyList = Get-LogType -VMHost $vmhost

$vmhost | Get-Log -Key $keyList[0] -StartLineNum 1 -NumLines 100

Retrieve the first one hundred log lines for the specified host and key.

-------------- Example 3 --------------

Get-VMost Host | Get-Log -Bundle -DestinationPath "D:\VMHostBundeLog"

Retrieve a bundle log for the specified host.


Get-LogType - vSphere PowerCLI Cmdlets Reference

Get-LogType

Synopsis

This cmdlet retrieves information about the log types available on a virtual machine host.

Syntax

Get-LogType [[-VMHost] <VMHost[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-Log

Detailed Description

This cmdlet retrieves information about the log types available on a virtual machine host. If no virtual machine host is specified, the cmdlet retrieves the log types for the default vCenter Server system. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts you want to search for log types. If no value is given to this parameter, the command searches for logs only on the default vCenter Server system. | false | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more LogDescriptor objects

Notes

Examples

-------------- Example 1 --------------

$vmhost = Get-VMHost -State "Connected"

Get-Logtype -VMHost $vmhost

Gets information about the available logs on the virtual machine hosts whose state is Connected.


Get-Media - vCloud Snapin Cmdlets Reference

Get-Media

Synopsis

This cmdlet retrieves cloud media.

Syntax

Get-Media [[-Name] <String[]>] [-Catalog <Catalog[]>] [-Server <CIServer[]>] [-Owner <CIUser[]>] [<CommonParameters>]
Get-Media -Id <String[]> [-Server <CIServer[]>] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet retrieves cloud media. You can filter the returned media by name, ID, catalog, and user.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the media devices you want to retrieve. | false | false |
Catalog | Catalog[] | Specifies the catalogs from which you want to retrieve media devices. | false | true (ByValue) |
Id | String[] | Specifies the IDs of the media devices you want to retrieve. | true | false |
Owner | CIUser[] | Specifies the owners of the cloud media you want to retrieve. | false | true (ByValue) |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |

Return Type

Zero or more Media objects

Notes

Examples

-------------- Example 1 --------------

Get-Media -ID $cloudMediaId

Retrieves the cloud media devices with the provided IDs.

-------------- Example 2 --------------

Get-Media -Name windows7*

Retrieves the cloud media devices with the provided names.

-------------- Example 3 --------------

Get-Catalog -Name Catalog1 | Get-Media

Retrieves media from the cloud catalog named Catalog1.


Get-NetworkAdapter - vSphere PowerCLI Cmdlets Reference

Get-NetworkAdapter

Synopsis

This cmdlet retrieves the virtual network adapters available on a vCenter Server system.

Syntax

Get-NetworkAdapter [-Id <String[]>] [-Server <VIServer[]>] [[-VM] <VirtualMachine[]>] [[-Template] <Template[]>] [[-Snapshot] <Snapshot[]>] [-Name <String[]>] [<CommonParameters>]
Get-NetworkAdapter -RelatedObject <NetworkAdapterRelatedObjectBase[]> [<CommonParameters>]

Related Commands

Online version
New-NetworkAdapter
Remove-NetworkAdapter
Set-NetworkAdapter

Detailed Description

This cmdlet retrieves the virtual network adapters available on a vCenter Server system. The cmdlet returns a set of virtual network adapters assigned to the virtual machines, templates, and snapshots specified by the VirtualMachine, Template, and Snapshot parameters. At least one of these parameters must be provided. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines from which you want to retrieve virtual network adapters. | false | true (ByValue) |
Template | Template[] | Specifies the templates from which you want to retrieve virtual network adapters. | false | true (ByValue) |
Snapshot | Snapshot[] | Specifies the snapshots from which you want to retrieve virtual network adapters. | false | true (ByValue) |
Id | String[] | Specifies the IDs of the network adapters you want to retrieve. | false | false |
Name | String[] | Specifies the names of the network adapters you want to retrieve. | false | false |
RelatedObject | NetworkAdapterRelatedObjectBase[] | Specify an object to retrieve one or more network adapters that are related to the object. This parameter accepts standard and distributed port groups. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more NetworkAdapter objects

Notes

Examples

-------------- Example 1 --------------

Get-NetworkAdapter -VM MyVM

Retrieves the network adapters added to the the MyVM virtual machine.

-------------- Example 2 --------------

$myVDPortgroup = Get-VDPortGroup -Name "MyVDPortGroup"
$myNetworkAdapters = Get-NetworkAdapter -RelatedObject $myVDPortgroup

Retrieves all network adapters connected to the specified port group and stores them in the myNetworkAdapters variable.


Get-NetworkPool - vCloud Snapin Cmdlets Reference

Get-NetworkPool

Synopsis

This cmdlet retrieves the network pools available on a vCloud Director server.

Syntax

Get-NetworkPool [[-Name] <String[]>] [-ProviderVdc <ProviderVdc[]>] [-OrgVdc <OrgVdc[]>] [-Server <CIServer[]>] [<CommonParameters>]
Get-NetworkPool -Id <String[]> [-Server <CIServer[]>] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet retrieves the network pools available on a vCloud Director server.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the network pools you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the network pools you want to retrieve. | true | false |
OrgVdc | OrgVdc[] | Specifies organization virtual datacenters (vDCs) to retrieve the network pools assigned to the organization vDCs. | false | true (ByValue) |
ProviderVdc | ProviderVdc[] | Specifies provider virtual datacenters (vDCs) to filter network pools by. The operation retrieves only network pools that are available to the specified provider vDC. | false | true (ByValue) |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | true (ByValue) |

Return Type

Zero or more NetworkPool objects

Notes

Examples

-------------- Example 1 --------------

Get-NetworkPool -Name 'MyNetworkPool' -OrgVdc 'MyOrgVdc' -ProviderVdc 'MyProviderVdc'

Retrieve a network pool by specifying the Name, OrgVdc, and ProviderVdc filters.

-------------- Example 2 --------------

Get-NetworkPool -Id 'MyNetworkPoolId'

Retrieve a network pool by specifying its ID.

-------------- Example 3 --------------

Get-OrgVdc "MyOrgVdc*" | Get-NetworkPool

Retrieve all network pools that provide network resources for all organization virtual datacenters with names starting with MyOrgVdc.

-------------- Example 4 --------------

Get-OrgVdc "MyProviderVdc*" | Get-NetworkPool

Retrieve all network pools in all provider virtual datacenters (vDCs) with names starting with MyProviderVdc.


Get-NicTeamingPolicy - vSphere PowerCLI Cmdlets Reference

Get-NicTeamingPolicy

Synopsis

This cmdlet retrieves the NIC teaming policies of the specified virtual switches and virtual port groups.

Syntax

Get-NicTeamingPolicy [-VirtualSwitch] <VirtualSwitch[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-NicTeamingPolicy [-VirtualPortGroup] <VirtualPortGroup[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Set-NicTeamingPolicy

Detailed Description

This cmdlet retrieves the NIC teaming policies of the specified virtual switches and virtual port groups. The NIC teaming policy determines how network traffic is distributed between adapters and how traffic is reorganized in case of adapter failure.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VirtualPortGroup | VirtualPortGroup[] | Specifies the port groups whose NIC teaming policy you want to retrieve. | true | true (ByValue) |
VirtualSwitch | VirtualSwitch[] | Specifies the virtual switches whose NIC teaming policy you want to retrieve. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more NicTeamingVirtualSwitchPolicy or NicTeamingVirtualPortGroupPolicy objects

Notes

Examples

-------------- Example 1 --------------

Get-VirtualPortGroup -VMHost (Get-VMHost *.128) -Name Virtual* | Get-NicTeamingPolicy | fl is*

For the specified virtual port groups, retrieves the Nic teaming policy settings whose names start with "is".

-------------- Example 2 --------------

Get-VirtualSwitch -VMHost (Get-VMHost *.128) -Name vswitch | Get-NicTeamingPolicy

Retrieves the Nic teaming policy of the specified virtual switch.


Get-Org - vCloud Snapin Cmdlets Reference

Get-Org

Synopsis

This cmdlet retrieves cloud organizations.

Syntax

Get-Org [[-Name] <String[]>] [-Server <CIServer[]>] [<CommonParameters>]
Get-Org -Id <String[]> [-Server <CIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-OrgVdc
Get-OrgNetwork

Detailed Description

This cmdlet retrieves cloud organizations. If you are connected as a cloud administrator, the cmdlet retrieves all organizations in the cloud. If you are connected as an organization user, the cmdlet retrieves your organization.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the cloud organizations you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the cloud organization you want to retrieve. | true | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |

Return Type

Zero or more Organization objects

Notes

Examples

-------------- Example 1 --------------

Get-Org -Name Organization1

Gets an organization by name. You must be connected as a cloud administrator.

-------------- Example 2 --------------

Get-Org -ID $organizationId

Gets an organization by ID. You must be connected as a cloud administrator.


Get-OrgNetwork - vCloud Snapin Cmdlets Reference

Get-OrgNetwork

Synopsis

This cmdlet retrieves cloud organization networks.

Syntax

Get-OrgNetwork [[-Name] <String[]>] [-ExternalNetwork <ExternalNetwork[]>] [-Org <Org[]>] [-VM <CIVM[]>] [-NetworkPool <NetworkPool[]>] [-Server <CIServer[]>] [<CommonParameters>]
Get-OrgNetwork -Id <String[]> [-Server <CIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-Org
Get-OrgVdc

Detailed Description

This cmdlet retrieves cloud organization networks. You can filter the output by using the cmdlet parameters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the cloud organization networks you want to retrieve. | false | false |
ExternalNetwork | ExternalNetwork[] | Retrieves only the organization networks connected to the specified external networks. Note: This parameter is only available to Provider Administrators. | false | true (ByValue) |
Id | String[] | Specifies the IDs of the cloud organization networks you want to retrieve. | true | false |
NetworkPool | NetworkPool[] | Retrieves only the organization networks that have been created from the specified pools. Note: This parameter is only available to Provider Administrators. | false | true (ByValue) |
Org | Org[] | Specifies the organizations for which you want to retrieve networks. | false | true (ByValue) |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
VM | CIVM[] | Retrieves only the networks to which the specified virtual machines are connected. | false | true (ByValue) |

Return Type

Zero or more OrgNetwork objects

Notes

Examples

-------------- Example 1 --------------

Get-OrgNetwork

Gets all visible organization networks for the current user.

-------------- Example 2 --------------

Get-OrgNetwork -Name "OrgNetwork1"

Gets an existing organization network named "OrgNetwork1".

-------------- Example 3 --------------

Get-OrgNetwork -ID $orgNetwork1Id

Gets an organization network with given ID.

-------------- Example 4 --------------

$myOrg = Get-Org -Name "Organization1"
Get-OrgNetwork -Org $myOrg

Gets all visible networks within an organization.

-------------- Example 5 --------------

$myExternalNetwork = Get-ExternalNetwork -Name "ExternalNetwork1"
Get-OrgNetwork -ExternalNetwork $myExternalNetwork

Gets all visible organization networks for an external network.

-------------- Example 6 --------------

$myNetworkPool = Get-NetworkPool -Name 'MyNetworkPool'
Get-OrgNetwork -NetworkPool $myNetworkPool

Gets all visible organization networks for a network pool.

-------------- Example 7 --------------

Get-CIVM -Name "CloudVM1" | Get-OrgNetwork

Gets an organization network for a CIVM.


Get-OrgVdc - vCloud Snapin Cmdlets Reference

Get-OrgVdc

Synopsis

This cmdlet retrieves organization vDCs.

Syntax

Get-OrgVdc [[-Name] <String[]>] [-Org <Org[]>] [-ProviderVdc <ProviderVdc[]>] [-Server <CIServer[]>] [<CommonParameters>]
Get-OrgVdc -Id <String[]> [-Server <CIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-Org
Get-OrgNetwork

Detailed Description

This cmdlet retrieves organization virtual datacenters (vDCs). You can filter the returned objects by using the cmdlet parameters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the organization vDCs you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the organization vDCs you want to retrieve. | true | false |
Org | Org[] | Specifies the organizations for which you want to retrieve vDCs. | false | true (ByValue) |
ProviderVdc | ProviderVdc[] | Retrieves the organization vDCs which are part of the specified provider vDC. Note: This parameter is only available to Provider Administrators. | false | true (ByValue) |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |

Return Type

Zero or more OrgVdc objects

Notes

Examples

-------------- Example 1 --------------

Get-OrgVdc

Gets the cloud organization VDCs available to you.

-------------- Example 2 --------------

Get-OrgVdc -Name Organization1*

Gets the organization VDCs with names starting with the specified string.

-------------- Example 3 --------------

Get-OrgVdc -ID OrganizationVdcId

Gets the cloud organization VDC with the provided Id.

-------------- Example 4 --------------

$myProviderVdc = Get-ProviderVdc -Name 'MyProvider1Vdc'
Get-OrgVdc -ProviderVdc $myProviderVdc

Gets all organization VDCs which are part of the specified provider VDC.

-------------- Example 5 --------------

Get-OrgVdc -Org Organization1

Retrieves all organization VDCs for the specified organizations.

-------------- Example 6 --------------

Get-Org Organization1 | Get-OrgVdc -ProviderVdc Provider1Vdc

Retrieves the organization VDCs for an organization which is a part of the provider VDC named Provider1Vdc.


Get-OSCustomizationNicMapping - vSphere PowerCLI Cmdlets Reference

Get-OSCustomizationNicMapping

Synopsis

This cmdlet retrieves the configured NIC setting mappings for the specified OS customization specification.

Syntax

Get-OSCustomizationNicMapping [-OSCustomizationSpec] <OSCustomizationSpec[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-OSCustomizationNicMapping
Set-OSCustomizationNicMapping

Detailed Description

This cmdlet retrieves the configured NIC setting mappings for the specified OS customization specification.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
OSCustomizationSpec | OSCustomizationSpec[] | Specifies the OS customization specification for which you want to retrieve the NIC settings mapping. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more OSCustomizationNicMapping objects

Notes

Examples

-------------- Example 1 --------------

$spec1 = Get-OSCustomizationSpec "test"

$spec2 = Get-OSCustomizationSpec "test_old"

Get-OSCustomizationNicMapping -OSCustomizationSpec $spec1,$spec2

Retrieves the NIC mappings of the "test" and "test_old" OS customization specifications.


Get-OSCustomizationSpec - vSphere PowerCLI Cmdlets Reference

Get-OSCustomizationSpec

Synopsis

This cmdlet retrieves the OS customization specifications available on a vCenter Server system.

Syntax

Get-OSCustomizationSpec [[-Server] <VIServer[]>] [[-Name] <String[]>] [-Id <String[]>] [-Type <OSCustomizationSpecType>] [<CommonParameters>]

Related Commands

Online version
New-OSCustomizationSpec
Remove-OSCustomizationSpec
Set-OSCustomizationSpec

Detailed Description

This cmdlet retrieves the OS customization specifications available on a vCenter Server system. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the OS customization specifications you want to retrieve. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Id | String[] | Specifies the IDs of the OS customization specifications you want to retrieve. | false | false |
Type | OSCustomizationSpecType | Specifis the type of the OS customization specifications you want to retrieve. The valid values are Persistent and NonPersistent. | false | false |

Return Type

Zero or more OSCustomizationSpec objects

Notes

Examples

-------------- Example 1 --------------

Get-OSCustomizationSpec "test"

Retrieves from the server the OS customization specification named 'test'.

-------------- Example 2 --------------

New-VM -Name VM -VMHost Host -Template Template -OSCustomizationSpec $spec

Creates a new virtual machine from a template and configures it using a customization specification.


Get-PassthroughDevice - vSphere PowerCLI Cmdlets Reference

Get-PassthroughDevice

Synopsis

This cmdlet retrieves the pass-through devices available on the specified hosts, virtual machines, and templates.

Syntax

Get-PassthroughDevice [-VM <VirtualMachine[]>] [-VMHost <VMHost[]>] [-Template <Template[]>] [[-Type] <PassthroughDeviceType>] [[-Name] <String[]>] [-Id <String[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Add-PassthroughDevice
Remove-PassthroughDevice

Detailed Description

This cmdlet retrieves the pass-through devices available on the specified hosts, virtual machines, and templates.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the pass-through devices you want to retrieve. | false | false |
Type | PassthroughDeviceType | Specifies the type of the pass-through devices you want to retrieve. The valid values are SCSI and PCI. PCI is supported only on vCenter Server 4.0 and ESX 4.0 and later. | false | false |
Id | String[] | Specifies the IDs of the pass-through devices you want to retrieve. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Template | Template[] | Specifies the virtual machine templates for which you want to retrieve the pass-through devices. | false | true (ByValue) |
VM | VirtualMachine[] | Specifies the virtual machines for which you want to retrieve the pass-through devices. | false | true (ByValue) |
VMHost | VMHost[] | Specifies the hosts for which you want to retrieve the pass-through devices. | false | true (ByValue) |

Return Type

Zero or more PassthroughDevice objects

Notes

Examples

-------------- Example 1 --------------

Get-PassthroughDevice -VMHost Host -Type Scsi

Retrieves the SCSI passthrough devices of the Host host.


Get-PowerCLIConfiguration - vSphere PowerCLI Cmdlets Reference

Get-PowerCLIConfiguration

Synopsis

This cmdlet retrieves the vSphere PowerCLI proxy configuration and default servers policy.

Syntax

Get-PowerCLIConfiguration [-Scope <ConfigurationScope>] [<CommonParameters>]

Related Commands

Online version
Set-PowerCLIConfiguration

Detailed Description

This cmdlet retrieves the vSphere PowerCLI proxy configuration and default servers policy.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Scope | ConfigurationScope | Specifies a scope to filter vSphere PowerCLI settings by. The parameter accepts Session, User, and All Users values. | false | false |

Return Type

One or more PowerCLIConfiguration objects

Notes

Examples

-------------- Example 1 --------------

Get-PowerCLIConfiguration

Retrieves information about the vSphere PowerCLI configuration for every scope.

-------------- Example 2 --------------

Get-PowerCLIConfiguration -Scope User

Retrieves information about the vSphere PowerCLI configuration for the User scope.

-------------- Example 3 --------------

Get-PowerCLIConfiguration -Scope ([VMware.VimAutomation.ViCore.Types.V1.ConfigurationScope]::Session -bor [VMware.VimAutomation.ViCore.Types.V1.ConfigurationScope]::User)

Retrieves information about the vSphere PowerCLI configuration for the User and Session scopes.


Get-PowerCLIVersion - vSphere PowerCLI Cmdlets Reference

Get-PowerCLIVersion

Synopsis

This cmdlet retrieves the versions of the installed PowerCLI snapins.

Syntax

Get-PowerCLIVersion [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet retrieves the versions of the installed PowerCLI snapins.

Parameters

Name Type Description Required? Pipeline Input Default Value

Return Type

One or more PowerCLIVersion objects

Notes

Examples

-------------- Example 1 --------------

Get-PowerCLIVersion

Retrieves the version of vSphere PowerCLI.

-------------- Example 2 --------------

Get-PowerCLIVersion | select -expand SnapinVersions

Lists the versions of additional PowerCLI snapins.


Get-ProviderVdc - vCloud Snapin Cmdlets Reference

Get-ProviderVdc

Synopsis

This cmdlet retrieves the specified cloud provider vDCs.

Syntax

Get-ProviderVdc [[-Name] <String[]>] [-ExternalNetwork <ExternalNetwork[]>] [-OrgVdc <OrgVdc[]>] [-Server <CIServer[]>] [<CommonParameters>]
Get-ProviderVdc -Id <String[]> [-Server <CIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-OrgVdc

Detailed Description

This cmdlet retrieves cloud provider virtual datacenters (vDCs). Note: This cmdlet is only available to Provider Administrators.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the provider vDCs you want to retrieve. | false | false |
ExternalNetwork | ExternalNetwork[] | Specifies that you want to retrieve only the vDCs accessible by the provided external networks. | false | true (ByValue) |
Id | String[] | Specifies the IDs of the provider vDCs you want to retrieve. | true | false |
OrgVdc | OrgVdc[] | Retrieves the provider vDCs to which the specified organization vDCs belong. | false | true (ByValue) |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |

Return Type

Zero or more ProviderVdc objects

Notes

Examples

-------------- Example 1 --------------

Get-OrgVdc OrgVdc | Get-ProviderVdc

Gets the provider VDC for the specified organization VDC.

-------------- Example 2 --------------

Get-ProviderVdc -Name ProviderVDC -Server CIServer

Gets the provider VDC named ProviderVDC from the specified server.

-------------- Example 3 --------------

Get-ProviderVdc -ID "urn:vcloud:providervdc:e87ed46d-9044-4d31-b4f6-1bc9695fd01c", "urn:vcloud:providervdc:6143818e-9a44-49c5-87ed-ab0dac8d9746"

Gets provider VDCs by their IDs.


Get-ResourcePool - vSphere PowerCLI Cmdlets Reference

Get-ResourcePool

Synopsis

This cmdlet retrieves the resource pools available on a vCenter Server system.

Syntax

Get-ResourcePool [-VM <VirtualMachine[]>] [-Location <VIContainer[]>] [[-Name] <String[]>] [-NoRecursion] [-Server <VIServer[]>] [<CommonParameters>]
Get-ResourcePool -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-ResourcePool -RelatedObject <ResourcePoolRelatedObjectBase[]> [<CommonParameters>]

Related Commands

Online version
New-ResourcePool
Remove-ResourcePool
Set-ResourcePool
Move-ResourcePool

Detailed Description

Retrieves the resource pools available on a vCenter Server system. The cmdlet returns a set of resource pools that correspond to the filter criteria provided by the cmdlet parameters. Virtual machine hosts have a hidden resource pool named Resources, which is a parent of all resource pools of the host. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the resource pools you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the resource pools you want to retrieve. | true | false |
Location | VIContainer[] | Specifies vSphere container objects (such as folders, datacenters, and clusters) you want to search for resource pools. | false | true (ByValue) |
NoRecursion | SwitchParameter | Indicates that you want to disable the recursive behavior of the command. | false | false |
RelatedObject | ResourcePoolRelatedObjectBase[] | Specifies objects to retrieve one or more ResourcePool objects that are related to them. This parameter accepts ProviderVdc objects. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VM | VirtualMachine[] | Specifies virtual machines to filter the resource pools that contain at least one of them. | false | true (ByValue) |

Return Type

Zero or more ResourcePool objects

Notes

Examples

-------------- Example 1 --------------

$server = Connect-VIServer -Server 10.23.112.235

Get-ResourcePool -Server $server -VM VM

Retrieves information of the resource pool to which the virtual machine MS Win belongs.


Get-ScsiController - vSphere PowerCLI Cmdlets Reference

Get-ScsiController

Synopsis

This cmdlet retrieves the virtual SCSI controllers assigned to the specified HardDisk, VirtualMachine, Template, and Snapshot objects.

Syntax

Get-ScsiController [-Id <String[]>] [-HardDisk <HardDisk[]>] [-Server <VIServer[]>] [[-VM] <VirtualMachine[]>] [[-Template] <Template[]>] [[-Snapshot] <Snapshot[]>] [-Name <String[]>] [<CommonParameters>]

Related Commands

Online version
New-ScsiController
Set-ScsiController

Detailed Description

This cmdlet retrieves the virtual SCSI controllers assigned to the specified HardDisk, VirtualMachine, Template, and Snapshot objects.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Filters the SCSI controllers by the virtual machines they belong to. | false | true (ByValue) |
Template | Template[] | Filters the SCSI controllers by the virtual machine templates they belong to. | false | true (ByValue) |
Snapshot | Snapshot[] | Filters the SCSI controllers by the snapshots they belong to. | false | true (ByValue) |
HardDisk | HardDisk[] | Filters the SCSI controllers by the hard disks they belong to. | false | true (ByValue) |
Id | String[] | Specifies the IDs of the SCSI controllers you want to retrieve. | false | false |
Name | String[] | Specifies the names of the SCSI controllers you want to retrieve. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more ScsiController objects

Notes

Examples

-------------- Example 1 --------------

Get-VM VM1, VM2 | Get-ScsiController

Retrieves the SCSI controllers of the VM1 and VM2 virtual machines.

-------------- Example 2 --------------

Get-VM VM | Get-Snapshot Snapshot | Get-ScsiController

Retrieves the SCSI controllers of a virtual machine snapshot.

-------------- Example 3 --------------

$disk = Get-VM VM | Get-HardDisk | Select -First 2

Get-ScsiController -HardDisk $disk

Retrieves the SCSI controllers of the first two hard disks of a virtual machine.


Get-ScsiLun - vSphere PowerCLI Cmdlets Reference

Get-ScsiLun

Synopsis

This cmdlet retrieves the SCSI devices available on the vCenter Server system.

Syntax

Get-ScsiLun [[-CanonicalName] <String[]>] [-VmHost] <VMHost[]> [-Key <String[]>] [-LunType <String[]>] [-Server <VIServer[]>] [<CommonParameters>]
Get-ScsiLun -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-ScsiLun [[-CanonicalName] <String[]>] [-Datastore] <Datastore[]> [-Key <String[]>] [-LunType <String[]>] [-Server <VIServer[]>] [<CommonParameters>]
Get-ScsiLun [[-CanonicalName] <String[]>] [-Hba] <Hba[]> [-Key <String[]>] [-LunType <String[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-ScsiLunPath
Set-ScsiLun
Set-ScsiLunPath

Detailed Description

This cmdlet retrieves the SCSI devices available on the vCenter Server system. Examples of SCSI logical unit objects include disks which may contain file system volumes or parts of volumes for the host or might serve as raw disks to a virtual machine. Other examples include SCSI passthrough devices that can be used by virtual machines. When retrieving ScsiLun objects by Datastore, the cmdlet returns a ScsiLun object for each host connected to the specified datastore. ScsiLun objects can be differed by their VMHost property.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
CanonicalName | String[] | Specifies the canonical name of the SCSI devices you want to retrieve. An example of a SCSI canonical name for Windows is "vmhba0:0:0:0". | false | false |
Datastore | Datastore[] | Specifies the datastores for which you want to retrieve the SCSI devices. This parameter is supported only for VMFS volumes. | true | true (ByValue) |
Hba | Hba[] | Specifies the storage adapters for which you want to retrieve the SCSI devices. | true | true (ByValue) |
VmHost | VMHost[] | Specifies the hosts from which you want to retrieve the virtual SCSI devices. | true | true (ByValue) |
Id | String[] | Specifies the IDs of the SCSI devices that you want to retrieve. | true | false |
Key | String[] | Specifies the linkable identifiers of the SCSI devices you want to retrieve. | false | false |
LunType | String[] | Specifies the type of the SCSI devices you want to retrieve. The following types are valid: cdrom communications disk enclosure mediaChanger opticalDevice printer processor scanner storageArrayController tape unknown worm | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more ScsiLun objects

Notes

Examples

-------------- Example 1 --------------

Get-ScsiLun -VMHost 10.23.123.100 -LunType disk

Retrieves the SCSI devices of "disk" type for the virtual machine host with an IP address 10.23.123.100.

-------------- Example 2 --------------

Get-VMHost | Get-ScsiLun -CanonicalName "naa.*"

Retrieves the SCSI devices with canonical names that starts with "naa." on the provided host.

-------------- Example 3 --------------

$hba = Get-VMHost | Get-VMHostHba -Type ParallelScsi

Get-ScsiLun -Hba $hba -LunType disk

Retrieves the SCSI devices of "disk" type for the specified HBA devices.

-------------- Example 4 --------------

Get-ScsiLun -Datastore Datastore -Key "key-vim.host.ScsiDisk-*"

For the Datastore datastore, retrieves the SCSI devices that have the specified linkable identifiers.


Get-ScsiLunPath - vSphere PowerCLI Cmdlets Reference

Get-ScsiLunPath

Synopsis

This cmdlet retrieves the list of vmhba paths to a specified SCSI device.

Syntax

Get-ScsiLunPath [[-Name] <String[]>] [-ScsiLun] <ScsiLun[]> [<CommonParameters>]

Related Commands

Online version
Get-ScsiLun
Set-ScsiLunPath
Set-ScsiLun

Detailed Description

This cmdlet retrieves the list of vmhba paths to a specified SCSI device.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the name of the SCSI device whose vmhba paths you want to retrieve. | false | false |
ScsiLun | ScsiLun[] | Specifies the SCSI device whose vmhba paths you want to retrieve. | true | true (ByValue) |

Return Type

Zero or more ScsiLunPath objects

Notes

Examples

-------------- Example 1 --------------

$scsilun = Get-ScsiLun -VMHost 10.23.123.100 -LunType disk

Get-ScsiLunPath $scsilun

Retrieves the vmhba path to the specified SCSI device.


Get-Snapshot - vSphere PowerCLI Cmdlets Reference

Get-Snapshot

Synopsis

This cmdlet retrieves the virtual machine snapshots available on a vCenter Server system.

Syntax

Get-Snapshot [[-Name] <String[]>] [-Id <String[]>] [-VM] <VirtualMachine[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-Snapshot
Remove-Snapshot
Set-Snapshot

Detailed Description

This cmdlet returns information about the snapshots that correspond to the filter criteria provided by the Name and VM parameters. The disk size of the snapshots is retrieved only if you have the "Datastore/Browse datastore" privilege to the datastore where the shapshot is located. Otherwise, the following message is displayed: "Unable to populate snapshot size due to unsufficient permissions."

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines whose snapshots you want to retrieve. The position of this parameter is deprecated and will be changed in a future release. To avoid errors when you run existing scripts on future PowerCLI versions, specify the parameter by name. | true | true (ByValue) |
Name | String[] | Specifies the names of the snapshots you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the snapshots you want to retrieve. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more Snapshot objects

Notes

Examples

-------------- Example 1 --------------

Get-Snapshot -VM VM -Name 'Before ServicePack 2'

Retrieves the snapshot named "Before ServicePack2" of the VM virtual machine.


Get-Stat - vSphere PowerCLI Cmdlets Reference

Get-Stat

Synopsis

This cmdlet retrieves the statistical information available on a vCenter Server system.

Syntax

Get-Stat [-Entity] <VIObject[]> [-Common] [-Memory] [-Cpu] [-Disk] [-Network] [-Stat <String[]>] [-Start <DateTime>] [-Finish <DateTime>] [-MaxSamples <Int32>] [-IntervalMins <Int32[]>] [-IntervalSecs <Int32[]>] [-Instance <String[]>] [-Realtime] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-StatType
Get-StatInterval
New-StatInterval
Remove-StatInterval
Set-StatInterval

Detailed Description

This cmdlet retrieves the statistical information available on a vCenter Server system for each provided entity. For example, if the CPU parameter is set to $true, collects the average CPU usage and the average CPU usagemhz counters as appropriate for each entity. If the Stat parameter is specified, collects all provided named stats counters. Counters are provided using a dotted notation of the form "counter group"."counter name"."rollup type". For example: "cpu.usage.min". The cmdlet uses the Start time, if provided, and the Finish time, if provided, along with the MaxSamples, if provided, to bound the data collection. If intervalSecs is provided, the closest matching available interval is used. For each statistics sample on the server, the cmdlet returns a Sample object. The Instance property of the Sample object shows the serial number of the device for which a statistics value is taken. If the Instance property is empty ("), this indicates that the statistics sample contains an average statistic value for all specified devices. If you are connected to a vCenter Server and Get-Stat is run for a host entity, the cmdlet returns only the statistics available on the vCenter Server.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Entity | VIObject[] | Specifies the objects (such as virtual machine, virtual machine host, resource pool, and so on) whose statistics you want to retrieve. | true | true (ByValue) |
Common | SwitchParameter | Indicates whether the command collects common CPU, disk, memory and network statistics. | false | false |
Cpu | SwitchParameter | Indicates whether the command collects common CPU statistics, such as the average CPU usage and average CPU usagemhz counters as appropriate for each entity. | false | false |
Disk | SwitchParameter | Indicates whether the command collects common disk statistics, such as the average disk usage, average disk read and average disk write counters as appropriate for each entity. | false | false |
Finish | DateTime | Specifies the end of the time range for which you want to collect statistics. The valid format is dd/mm/yyyy. | false | false |
Instance | String[] | Specifies the Instance property of the statistics you want to retrieve. | false | false |
IntervalMins | Int32[] | Specifies one or more intervals in minutes of the statistics samples you want to retrieve. The closest available statistics interval is taken. To retrieve statistics samples for all available intervals, pass *. If the IntervalMins parameter is not specified, the samples with the best sample rate are retrieved. A best sample rate is the highest sample rate, whose relevant period contains the relevant periods for all other sample rates. A relevant period is the period that starts no earlier than the oldest sample still retained, and is a subset of a query period specified by the user. | false | false |
IntervalSecs | Int32[] | Specifies one or more intervals in seconds of the statistics samples you want to retrieve. The closest available statistics interval is taken. To retrieve statistics samples for all available intervals, pass *. | false | false |
MaxSamples | Int32 | Specifies the maximum number of samples for each statistic. | false | false |
Memory | SwitchParameter | Indicates whether the command collects common memory statistics, such as the mem usage, mem vmmemctl, mem active and mem granted counters as appropriate for each entity. | false | false |
Network | SwitchParameter | Indicates whether the command collects common network statistics, such as the average network usage, average network transmitted and average network received counters as appropriate for each entity. | false | false |
Realtime | SwitchParameter | Indicates whether the command collects real time statistics. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Start | DateTime | Specifies the beginning of the time range for which you want to collect statistics. The valid format is dd/mm/yyyy. | false | false |
Stat | String[] | Specifies the identifiers of the statistics you want to retrieve. Counters are provided using a dotted notation of the form "counter group"."counter name"."rollup type". For example, "cpu.usage.min". | false | false |

Return Type

Zero or more LongSample or FloatSample objects

Notes

Samples are not generated for a virtual machine while it is powered off.

Examples

-------------- Example 1 --------------

Get-Stat -Entity VM -Start 5/5/2008 -Finish 7/10/2008 -Disk -IntervalSecs 300

Prints the disk statistics for the specified time interval for the first virtual machine, retrieved by the Get-VM cmdlet.

-------------- Example 2 --------------

Get-Stat -Entity Host -Cpu -Instance 0, "

Retrieves the cumulative statistics for a multiprocessor host and the CPU statistics for the first processor.

-------------- Example 3 --------------

Get-VMHost -Name "MyVMHost" | Get-Stat -Network -IntervalSecs 20

Retrieves the network usage statistics for the specified host for the specified time interval.

-------------- Example 4 --------------

Get-VM -Name "MyVM" | Get-Stat -Stat "mem.usage.average" -Start MyStartDateTime -Finish MyFinishDateTime -MaxSamples 10

Retrieves the average memory usage statistics for the specified virtual machine between the specified start and finish date and time. The maximum number of retrieved samples is limited to 10.

-------------- Example 5 --------------

Get-VM -Name "MyVM" | Get-Stat -CPU -Memory -Realtime

Retrieves the real-time CPU and memory usage statistics for the specified virtual machine.

-------------- Example 6 --------------

Get-VMHost -Name "MyVMHost" | Get-Stat -Common

Retrieves the common statistics for the specified host.

-------------- Example 7 --------------

Get-Stat -Entity "MyVMHost" -Disk

Retrieves the disk usage statistics for the specified host.


Get-StatInterval - vSphere PowerCLI Cmdlets Reference

Get-StatInterval

Synopsis

This cmdlet retrieves the available statistics intervals and filters them using the provided parameters.

Syntax

Get-StatInterval [[-Name] <String[]>] [[-SamplingPeriodSecs] <Int32[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-Stat
Get-StatType
New-StatInterval
Remove-StatInterval
Set-StatInterval

Detailed Description

This cmdlet retrieves the available statistics intervals and filters them using the provided parameters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the statistics intervals you want to retrieve. | false | false |
SamplingPeriodSecs | Int32[] | Specifies the sampling period of the statistics intervals you want to retrieve. The sampling period is an integer that defines (in seconds) the interval of the statistics sample. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | true (ByValue) |

Return Type

Zero or more StatInterval objects

Notes

Examples

-------------- Example 1 --------------

Get-StatInterval

Retrieves the available statistics intervals.


Get-StatType - vSphere PowerCLI Cmdlets Reference

Get-StatType

Synopsis

This cmdlet retrieves the available statistics types for a inventory object.

Syntax

Get-StatType [[-Name] <String[]>] [-Entity] <InventoryItem[]> [-Start <DateTime>] [-Finish <DateTime>] [-Interval <StatInterval[]>] [-Realtime] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-Stat
Get-StatInterval
New-StatInterval
Remove-StatInterval
Set-StatInterval

Detailed Description

This cmdlet retrieves the available statistics types for a virtual machine, virtual machine host, cluster, or resource pool. Performance statistics types can be filtered by their names, start and finish times, and collection intervals. If the Realtime parameter is set, the Start and Finish parameters are ignored.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the statistics types you want to retrieve. | false | false |
Entity | InventoryItem[] | Specifies clusters, virtual machine hosts, resource pools, or virtual machines, for which you want to retrieve the available statistics types. | true | true (ByValue) |
Finish | DateTime | Specifies the end of the time range for which the statistics types you want to retrieve are collected. The valid format is dd/mm/yyyy. This value corresponds to the server time. When the finish time is omitted, the returned result includes up to the most recent statistics type. | false | false |
Interval | StatInterval[] | Specifies the interval at which the statistics types you want to retrieve are gathered. The interval can be specified by its name or by its sampling period in seconds. | false | false |
Realtime | SwitchParameter | Indicates that you want to retrieve realtime statistics type as well. If this parameter is set, the Start and Finish parameters are ignored. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Start | DateTime | Specifies the beginning of the time range for which the statistics types you want to retrieve are collected. The valid format is dd/mm/yyyy. This value corresponds to the server time. When the start time is omitted, the returned statistics types start from the first available statistics type in the system. | false | false |

Return Type

Zero or more System.String objects

Notes

Zero or more strings representing statistics types.

Examples

-------------- Example 1 --------------

Get-StatType -Entity VM

Retrieves the statistics types collected for the VM virtual machine.


Get-Tag - vSphere PowerCLI Cmdlets Reference

Get-Tag

Synopsis

This cmdlet retrieves the tags available on a vCenter Server system.

Syntax

Get-Tag [[-Name] <String[]>] [-Category <TagCategory[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-TagAssignment
New-TagAssignment
Remove-TagAssignment

Detailed Description

This cmdlet retrieves the tags available on a vCenter Server system. This cmdlet filters tags by name and category to which tags belong.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Filters the tags by name. | false | false |
Category | TagCategory[] | Filters the tags by category. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more Tag objects

Notes

Works only with vCenter Server 5.1 or later.

Examples

-------------- Example 1 --------------

Get-Tag -Name MyTag

Returns all tags named "MyTag".

-------------- Example 2 --------------

Get-Tag -Category MyCategory1, MyCategory2 -Name MyTag

Returns all tags from the "MyCategory1" and "MyCategory2" categories, named "MyTag".


Get-TagAssignment - vSphere PowerCLI Cmdlets Reference

Get-TagAssignment

Synopsis

This cmdlet retrieves the tag assignments of objects.

Syntax

Get-TagAssignment [[-Entity] <VIObjectCore[]>] [-Category <TagCategory[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-Tag
New-TagAssignment
Remove-TagAssignment

Detailed Description

This cmdlet retrieves the tag assignments of objects. If the Entity parameter is specified, the cmdlet returns only the tag assignments for the corresponding items. If the Category parameter is specified, the cmdlet returns only the tag assignments of tags that belong to the specified category.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Entity | VIObjectCore[] | Retrieves the tags associated with the specified items. | false | true (ByValue) |
Category | TagCategory[] | Returns the tags that belong to the specified categories. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more TagAssignment objects

Notes

Works only with vCenter Server 5.1 or later.

Examples

-------------- Example 1 --------------

$myDatastore = Get-DataStore MyDatastore
Get-TagAssignment -Entity $datastore -Category MyCategory

Retrieves all tag assignments for the $datastore entity that have tags from the "MyCategory" category.


Get-Task - vSphere PowerCLI Cmdlets Reference

Get-Task

Synopsis

This cmdlet retrieves the tasks on a vCenter Server system.

Syntax

Get-Task [[-Status] <TaskState>] [-Server <VIConnection[]>] [<CommonParameters>]
Get-Task -Id <String[]> [-Server <VIConnection[]>] [<CommonParameters>]

Related Commands

Online version
Stop-Task
Wait-Task

Detailed Description

This cmdlet retrieves the tasks on a vCenter Server system. The cmdlet retrieves information about the current or recent tasks. Use the Status parameter to filter tasks by their current status. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Status | TaskState | Specifies the status of the tasks you want to retrieve. The valid values are Error, Queued, Running, and Success. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. | false | true (ByValue) |
Id | String[] | Specifies the IDs of the tasks that you want to retrieve. | true | false |
Server | VIConnection[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more Task objects

Notes

Examples

-------------- Example 1 --------------

$serv = Connect-VIServer -Server 10.23.112.235

$task = Get-Task -Server $serv -Status Error

$task

Retrieves information on all tasks on the server with IP address 10.23.112.235, whose state is "Error".


Get-Template - vSphere PowerCLI Cmdlets Reference

Get-Template

Synopsis

This cmdlet retrieves the virtual machine templates available on a vCenter Server system.

Syntax

Get-Template [-Location <VIContainer[]>] [-Datastore <StorageResource[]>] [[-Name] <String[]>] [-NoRecursion] [-Server <VIServer[]>] [<CommonParameters>]
Get-Template -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-Template
Remove-Template
Set-Template

Detailed Description

This cmdlet retrieves the virtual machine templates available on a vCenter Server system. The cmdlet returns a set of templates that correspond to the filter criteria defined by the cmdlet parameters. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the virtual machine templates you want to retrieve. | false | false |
Datastore | StorageResource[] | Filters templates by the datastores or datastore clusters that they are stored on. | false | true (ByValue) |
Id | String[] | Specifies the IDs of the virtual machine templates you want to retrieve. | true | false |
Location | VIContainer[] | Specifies the vSphere container objects (such as folders, datacenters, and clusters) you want to search for templates. | false | true (ByValue) |
NoRecursion | SwitchParameter | Indicates that you want to disable the recursive behavior of the command. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more Template objects

Notes

Examples

-------------- Example 1 --------------

Get-Template -Name Web* -Location Datacenter

Retrieves all virtual machine templates in the Datacenter datacenter, whose names start with "Web".


Get-UsbDevice - vSphere PowerCLI Cmdlets Reference

Get-UsbDevice

Synopsis

This cmdlet retrieves the USB devices available on a vCenter Server system.

Syntax

Get-UsbDevice [-Id <String[]>] [-Server <VIServer[]>] [[-VM] <VirtualMachine[]>] [[-Template] <Template[]>] [[-Snapshot] <Snapshot[]>] [-Name <String[]>] [<CommonParameters>]

Related Commands

Online version
Remove-UsbDevice

Detailed Description

This cmdlet retrieves the USB devices available on a vCenter Server system. The cmdlet returns a set of virtual USB devices assigned to the virtual machines, templates, and snapshots specified by the VirtualMachine, Template, and Snapshot parameters. At least one of these parameters must be provided. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines whose virtual USB drives you want to retrieve. | false | true (ByValue) |
Template | Template[] | Specifies the virtual machine templates whose virtual USB drives you want to retrieve. | false | true (ByValue) |
Snapshot | Snapshot[] | Specifies the virtual machine snapshots whose virtual USB you want to retrieve. Supported only on vCenter Server 4.0 and ESX 4.0 and later. | false | true (ByValue) |
Id | String[] | Specifies the IDs of the USB devices you want to retrieve. | false | false |
Name | String[] | Specifies the names of the USB devices you want to retrieve. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more UsbDevice objects

Notes

The -Snapshot parameter is supported only on vCenter Server 4.0 and ESX 4.0 and later.

Examples

-------------- Example 1 --------------

Get-UsbDevice -VM (Get-VM -Location Host)

Retrieves the USB devices attached to the virtual machines on the Host host.


Get-VApp - vSphere PowerCLI Cmdlets Reference

Get-VApp

Synopsis

This cmdlet retrieves vApps.

Syntax

Get-VApp [-Location <VIContainer[]>] [[-Name] <String[]>] [-NoRecursion] [-Server <VIServer[]>] [<CommonParameters>]
Get-VApp -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Export-VApp
Import-VApp
New-VApp
Remove-VApp
Set-VApp
Start-VApp
Stop-VApp
Move-VApp

Detailed Description

This cmdlet retrieves vApps.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the vApps that you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the vApps that you want to retrieve. | true | false |
Location | VIContainer[] | Specifies Folder, Cluster, Datacenter, VMHost, and ResourcePool objects you want to search for vApps. | false | true (ByValue) |
NoRecursion | SwitchParameter | Indicates that you want to disable the recursive behavior of the command. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VApp objects

Notes

Examples

-------------- Example 1 --------------

Get-ResourcePool MyResourcePool1 | Get-VApp -NoRecursion

Retrieves all the vApps in the ResourcePool resource pool with no recursion.


Get-VDBlockedPolicy - vSphere PowerCLI Cmdlets Reference

Get-VDBlockedPolicy

Synopsis

This cmdlet retrieves the blocking policy for distributed ports.

Syntax

Get-VDBlockedPolicy -VDPortgroup <VDPortgroup[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-VDBlockedPolicy -VDSwitch <VDSwitch[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-VDBlockedPolicy -VDPort <VDPort[]> [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet retrieves the blocking policy for distributed ports. For distributed port group and vSphere distributed switch parameter sets, the default port policy at the distributed port group or switch level is retrieved.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VDPort | VDPort[] | Specifies the distributed ports for which you want to retrieve the blocking policy. | true | true (ByValue) |
VDPortgroup | VDPortgroup[] | Specifies a distributed port group for which you want to retrieve the default blocking policy. | true | true (ByValue) |
VDSwitch | VDSwitch[] | Specifies a vSphere distributed switch for which you want to retrieve the default blocking policy. | true | true (ByValue) |

Return Type

One or more BlockedPolicy objects

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitch "MyVDSwitch" | Get-VDBlockedPolicy

Retrieves the blocking policy of a vSphere distributed switch named "MyVDSwitch".

-------------- Example 2 --------------

Get-VDPortgroup "MyVDPortgroup" | Get-VDPort | Get-VDBlockedPolicy

Retrieves the blocking policies of all ports inside a distributed port group named "MyVDPortgroup".


Get-VDPort - vSphere PowerCLI Cmdlets Reference

Get-VDPort

Synopsis

This cmdlet retrieves virtual distributed ports.

Syntax

Get-VDPort [-VDPortgroup <VDPortgroup[]>] [-VDSwitch <VDSwitch[]>] [[-Key] <String[]>] [-ActiveOnly] [-ConnectedOnly] [-Uplink] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet retrieves virtual distributed ports. At least one of the VDSwitch or VDPortgroup parameters must be specified.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Key | String[] | Specifies the key of the port which you want to retrieve. | false | false |
ActiveOnly | SwitchParameter | If set, only the active ports are returned. | false | false |
ConnectedOnly | SwitchParameter | If set, only the connected ports are returned. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Uplink | SwitchParameter | If set, only uplink ports are returned. If not set, both uplink and non-uplink ports are returned. This parameter, like every SwitchParameter, can also be set to false (-Uplink:$false), in which case only non-uplink ports are returned. | false | false |
VDPortgroup | VDPortgroup[] | Specifies the distributed virtual port group whose ports you want to retrieve. | false | true (ByValue) |
VDSwitch | VDSwitch[] | Specifies the vSphere distributed switch whose ports you want to retrieve. | false | true (ByValue) |

Return Type

Zero or more VDPort objects

Notes

Requires vSphere API 4.0 or later.

Examples

-------------- Example 1 --------------

Get-VDPortGroup "MyVDPortgroup" | Get-VDPort -Key "MyPortgroupKey"

Retrieves a virtual distributed port assigned with a key named "MyPortgroupKey" from a virtual distributed port group named ?MyVDPortgroup?.

-------------- Example 2 --------------

Get-VDSwitch "MyVDSwitch" | Get-VDPort -Uplink

Retrieves all uplink virtual distributed ports of a vSphere distributed switch named "MyVDSwitch".

-------------- Example 3 --------------

Get-VDSwitch "MyVDSwitch" | Get-VDPort -ConnectedOnly

Retrieves all connected virtual distributed ports of a vSphere distributed switch named "MyVDSwitch".


Get-VDPortgroup - vSphere PowerCLI Cmdlets Reference

Get-VDPortgroup

Synopsis

This cmdlet retrieves distributed port groups.

Syntax

Get-VDPortgroup [[-Name] <String[]>] [-NetworkAdapter <NetworkAdapter[]>] [-VDSwitch <VDSwitch[]>] [-VMHostNetworkAdapter <HostVirtualNic[]>] [-Server <VIServer[]>] [-Tag <Tag[]>] [<CommonParameters>]
Get-VDPortgroup -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-VDPortgroup -RelatedObject <VDPortgroupRelatedObjectBase[]> [<CommonParameters>]

Related Commands

Online version
New-VDPortgroup
Remove-VDPortgroup
Set-VDPortgroup
Export-VDPortgroup

Detailed Description

This cmdlet retrieves distributed port groups.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the distributed port groups that you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the distributed port groups that you want to retrieve. | true | false |
NetworkAdapter | NetworkAdapter[] | Specifies a virtual machine network adapter to retrieve the distributed port group to which the network adapter is connected. | false | true (ByValue) |
RelatedObject | VDPortgroupRelatedObjectBase[] | Specifies an object to retrieve one or more distributed port groups that are related to the object. This parameter accepts ExternalNetwork, OrgNetwork, and NetworkPool objects. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Tag | Tag[] | Returns only the distributed port groups that are associated with any of the specified tags. | false | false |
VDSwitch | VDSwitch[] | Specifies a vSphere distributed switch to retrieve the distributed port groups that belong to the switch. | false | true (ByValue) |
VMHostNetworkAdapter | HostVirtualNic[] | Specifies a host virtual network adapter to retrieve the distributed port groups to which the network adapter is connected. | false | true (ByValue) |

Return Type

Zero or more VDPortgroup objects

Notes

Examples

-------------- Example 1 --------------

Get-VDPortGroup -Name "MyVDPortGroup" -VDSwitch "MyVDSwitch"

Retrieves the distributed port group named "MyVDPortGroup" on the specified vSphere distributed switch.

-------------- Example 2 --------------

Get-OrgNetwork -Name "MyOrgNetwork" | Get-VDPortGroup

Retrieves the distributed port groups that are related to the specified organization network in the cloud.

-------------- Example 3 --------------

Get-NetworkAdapter -Name "MyVMNetworkAdapter" | Get-VDPortGroup

Retrieves the distributed port group to which the specified virtual machine network adapter is connected.


Get-VDPortgroupOverridePolicy - vSphere PowerCLI Cmdlets Reference

Get-VDPortgroupOverridePolicy

Synopsis

This cmdlet retrieves the policy for overriding port group settings at port level.

Syntax

Get-VDPortgroupOverridePolicy [-VDPortgroup] <VDPortgroup[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet retrieves the policy for overriding port group settings at port level.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VDPortgroup | VDPortgroup[] | Specifies a distributed port group for which you want to retrieve the default port group overriding policy. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

One or more VDPortgroupOverridePolicy objects

Notes

Examples

-------------- Example 1 --------------

Get-VDPortgroup "MyVDPortgroup" | Get-VDPortgroupOverridePolicy

Retrieves the overriding policy settings of a distributed port group named "MyVDPortgroup".


Get-VDSecurityPolicy - vSphere PowerCLI Cmdlets Reference

Get-VDSecurityPolicy

Synopsis

This cmdlet retrieves the security policy for distributed ports.

Syntax

Get-VDSecurityPolicy -VDPortgroup <VDPortgroup[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-VDSecurityPolicy -VDSwitch <VDSwitch[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-VDSecurityPolicy -VDPort <VDPort[]> [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet retrieves the security policy for distributed ports. For distributed port group and vSphere distributed switch parameter sets, the default port policy at the distributed port group or switch level is retrieved.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VDPort | VDPort[] | Specifies the distributed ports for which you want to retrieve the security policy. | true | true (ByValue) |
VDPortgroup | VDPortgroup[] | Specifies a distributed port group for which you want to retrieve the default security policy. | true | true (ByValue) |
VDSwitch | VDSwitch[] | Specifies a vSphere distributed switch for which you want to retrieve the default security policy. | true | true (ByValue) |

Return Type

One or more SecurityPolicy objects

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitch "MyVDSwitch" | Get-VDSecurityPolicy

Retrieves the security policy of a vSphere distributed switch named "MyVDSwitch".

-------------- Example 2 --------------

Get-VDPortgroup "MyVDPortgroup" | Get-VDPort ?Key 4 | Get-VDSecurityPolicy

Retrieves the security policies of a specific port inside a distributed port group named "MyVDPortgroup".


Get-VDSwitch - vSphere PowerCLI Cmdlets Reference

Get-VDSwitch

Synopsis

This cmdlet retrieves vSphere distributed switches.

Syntax

Get-VDSwitch [[-Name] <String[]>] [-Location <FolderContainer[]>] [-VMHost <VMHost[]>] [-VM <VirtualMachine[]>] [-Server <VIServer[]>] [<CommonParameters>]
Get-VDSwitch -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-VDSwitch -RelatedObject <VDSwitchRelatedObjectBase[]> [<CommonParameters>]

Related Commands

Online version
Remove-VDSwitch
New-VDSwitch
Set-VDSwitch
Export-VDSwitch

Detailed Description

This cmdlet retrieves vSphere distributed switches.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the vSphere distributed switches that you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the vSphere distributed switches that you want to retrieve. | true | false |
Location | FolderContainer[] | Specifies vCenter Server container objects that you want to search for vSphere distributed switches. This parameter accepts Datacenter and Folder objects. | false | true (ByValue) |
RelatedObject | VDSwitchRelatedObjectBase[] | Specifies an object to retrieve one or more vSphere distributed switches that are related to the object. This parameter accepts NetworkPool objects. | true | true (ByValue) |
Server | VIServer[] | Specify the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
VM | VirtualMachine[] | Specifies virtual machines to retrieve vSphere distributed switches they are connected to. | false | true (ByValue) |
VMHost | VMHost[] | Specifies hosts to retrieve vSphere distributed switches to which the hosts are added. | false | true (ByValue) |

Return Type

Zero or more VDSwitch objects

Notes

Examples

-------------- Example 1 --------------

Get-Datacenter -Name MyDatacenter | Get-VDSwitch

Retrieves all vSphere distributed switches in the specified datacenter.

-------------- Example 2 --------------

Get-VMHost -Name MyVMHost | Get-VDSwitch

Retrieves all vSphere distributed switches to which the specified host is added.

-------------- Example 3 --------------

Get-VM -Name MyVM | Get-VDSwitch

Retrieves all vSphere distributed switches to which the specified virtual machine is connected.


Get-VDSwitchPrivateVlan - vSphere PowerCLI Cmdlets Reference

Get-VDSwitchPrivateVlan

Synopsis

This cmdlet retrieves the private VLAN configuration entries of a vSphere distributed switch.

Syntax

Get-VDSwitchPrivateVlan [-VDSwitch] <VDSwitch[]> [-PrimaryVlanId <Int32[]>] [-SecondaryVlanId <Int32[]>] [-PrivateVlanType <PrivateVlanType[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet retrieves the private VLAN configuration entries of a vSphere distributed switch.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VDSwitch | VDSwitch[] | Specifies the vSphere distributed switch whose private VLAN configuration entries to retrieve. | true | true (ByValue) |
PrimaryVlanId | Int32[] | Specifies the primary VLAN ID of the private VLAN configuration entries that you want to retrieve. | false | false |
PrivateVlanType | PrivateVlanType[] | Specifies the private VLAN type of the VLAN configuration entries that you want to retrieve. | false | false |
SecondaryVlanId | Int32[] | Specifies the secondary VLAN ID of the private VLAN configuration entries that you want to retrieve. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VDSwitchPrivateVlan objects

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitch "MyVDSwitch" | Get-VDSwitchPrivateVlan -PrivateVlanType Isolated

Retrieves all private VLAN entries of a vSphere distributed switch named "MyVDSwitch" with specified 'isolated' VLAN port type.

-------------- Example 2 --------------

Get-VDSwitch "MyVDSwitch" | Get-VDSwitchPrivateVlan -PrimaryVlanId 1,3

Retrieves the private VLAN entries of a vSphere distributed switch named "MyVDSwitch" with primary VLAN identifiers 1 and 3.


Get-VDTrafficShapingPolicy - vSphere PowerCLI Cmdlets Reference

Get-VDTrafficShapingPolicy

Synopsis

This cmdlet retrieves the traffic shaping policy for distributed ports.

Syntax

Get-VDTrafficShapingPolicy -Direction <TrafficDirection> -VDPortgroup <VDPortgroup[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-VDTrafficShapingPolicy -Direction <TrafficDirection> -VDSwitch <VDSwitch[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-VDTrafficShapingPolicy -Direction <TrafficDirection> -VDPort <VDPort[]> [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet retrieves the traffic shaping policy for distributed ports. For distributed port group and vSphere distributed switch parameter sets, the default port policy at the distributed port group or switch level is retrieved.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Direction | TrafficDirection | Specifies the direction of the traffic shaping policy. | true | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VDPort | VDPort[] | Specifies the distributed ports for which you want to retrieve the traffic shaping policy. | true | true (ByValue) |
VDPortgroup | VDPortgroup[] | Specifies a distributed port group for which you want to retrieve the default traffic shaping policy. | true | true (ByValue) |
VDSwitch | VDSwitch[] | Specifies a vSphere distributed switch for which you want to retrieve the default traffic shaping policy. | true | true (ByValue) |

Return Type

One or more TrafficShapingPolicy objects

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitch "MyVDSwitch" | Get-VDTrafficShapingPolicy -Direction In

Retrieves the ingress traffic shaping policy of a vSphere distributed switch named "MyVDSwitch".

-------------- Example 2 --------------

Get-VDPortgroup "MyVDPortgroup" | Get-VDPort | Get-VDTrafficShapingPolicy -Direction Out

Retrieves the engress traffic shaping policies of all ports inside a distributed port group named "MyVDPortgroup".


Get-VDUplinkLacpPolicy - vSphere PowerCLI Cmdlets Reference

Get-VDUplinkLacpPolicy

Synopsis

This cmdlet retrieves the Link Aggregation Control Protocol policy for uplink ports.

Syntax

Get-VDUplinkLacpPolicy -VDPortgroup <VDPortgroup[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-VDUplinkLacpPolicy -VDSwitch <VDSwitch[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-VDUplinkLacpPolicy -VDPort <VDPort[]> [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet retrieves the Link Aggregation Control Protocol policy for uplink ports. For uplink port group and vSphere distributed switch parameter sets, the default port policy at the uplink port group or switch level is retrieved.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VDPort | VDPort[] | Specifies the uplink port for which you want to retrieve the Link Aggregation Control Protocol policy. | true | true (ByValue) |
VDPortgroup | VDPortgroup[] | Specifies an uplink port group for which you want to retrieve the default Link Aggregation Control Protocol policy. | true | true (ByValue) |
VDSwitch | VDSwitch[] | Specifies a vSphere distributed switch for which you want to retrieve the default Link Aggregation Control Protocol policy. | true | true (ByValue) |

Return Type

One or more UplinkLacpPolicy objects

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitch "MyVDSwitch" | Get-VDUplinkLacpPolicy

Retrieves the Link Aggregation Control Protocol policy of a vSphere distributed switch named "MyVDSwitch".

-------------- Example 2 --------------

Get-VDSwitch "MyVDSwitch" | Get-UplinkPortgroup "MyVDPortgroup" | Get-VDUplinkLacpPolicy

Retrieves the Link Aggregation Control Protocol policy of an uplink port group named "MyUplinkPortgroup" inside a vSphere distributed switch named "MyVDSwitch".


Get-VDUplinkTeamingPolicy - vSphere PowerCLI Cmdlets Reference

Get-VDUplinkTeamingPolicy

Synopsis

This cmdlet retrieves the uplink teaming policy for distributed ports.

Syntax

Get-VDUplinkTeamingPolicy -VDPortgroup <VDPortgroup[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-VDUplinkTeamingPolicy -VDSwitch <VDSwitch[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-VDUplinkTeamingPolicy -VDPort <VDPort[]> [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet retrieves the uplink teaming policy for distributed ports. For distributed port group and vSphere distributed switch parameter sets, the default port policy at the distributed port group or switch level is retrieved.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VDPort | VDPort[] | Specifies the distributed port for which you want to retrieve the uplink teaming policy. | true | true (ByValue) |
VDPortgroup | VDPortgroup[] | Specifies a distributed port group for which you want to retrieve the default uplink teaming policy. | true | true (ByValue) |
VDSwitch | VDSwitch[] | Specifies a vSphere distributed switch for which you want to retrieve the default uplink teaming policy. | true | true (ByValue) |

Return Type

One or more UplinkTeamingPolicy objects

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitch "MyVDSwitch" | Get-VDUplinkTeamingPolicy

Retrieves the uplink teaming policy of a vSphere distributed switch named "MyVDSwitch".

-------------- Example 2 --------------

Get-VDPortgroup "MyVDPortgroup" | Get-VDPort | Get-VDUplinkTeamingPolicy

Retrieves the uplink teaming policy of all ports inside a distributed port group named ?MyVDPortgroup?.


Get-VIAccount - vSphere PowerCLI Cmdlets Reference

Get-VIAccount

Synopsis

This cmdlet retrieves the accounts from the ESX/ESXi or vCenter Server.

Syntax

Get-VIAccount [-Group] [-User] [[-Name] <String[]>] [-Server <VIServer[]>] [<CommonParameters>]
Get-VIAccount [-Group] [-User] [[-Id] <String[]>] [-Domain <String>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-VMHostAccount
Set-VMHostAccount
Remove-VMHostAccount

Detailed Description

This cmdlet retrieves the accounts from the ESX/ESXi or vCenter Server. The Group and User switch parameters let you retrieve group and user accounts. By default, the cmdlet lists only user accounts. If the Domain parameter is specified, the cmdlet retrieves only the accounts on the specified AD domain. Otherwise, only local accounts are listed.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Id | String[] | Specifies the IDs of the accounts you want to retrieve. | false | false |
Name | String[] | Specifies the names of the accounts you want to retrieve. | false | false |
Domain | String | Specifies AD domains to search for accounts. | false | false |
Group | SwitchParameter | Specifies that you want to retrieve only group accounts. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | true (ByValue) |
User | SwitchParameter | Specifies that you want to retrieve only user accounts. | false | false |

Return Type

Zero or more VIAccount objects

Notes

Examples

-------------- Example 1 --------------

Get-VIAccount -Id Administrator

Retrieve accounts by Id.

-------------- Example 2 --------------

Get-VIAccount -Group

Retrieve all group accounts.

-------------- Example 3 --------------

Get-VIAccount -Id Administrator -Domain "MSDomain"

Get all VIAccounts for specified ID and Domain.

-------------- Example 4 --------------

Get-VIAccount -Domain "MSDomain"

Retrieve all accounts for the specified domain.


Get-VICredentialStoreItem - vSphere PowerCLI Cmdlets Reference

Get-VICredentialStoreItem

Synopsis

This cmdlet retrieves the credential store items available on a vCenter Server system.

Syntax

Get-VICredentialStoreItem [[-Host] <String>] [[-User] <String>] [[-File] <String>] [<CommonParameters>]

Related Commands

Online version
New-VICredentialStoreItem
Remove-VICredentialStoreItem

Detailed Description

This cmdlet retrieves the credential store items that correspond to the filter criteria defined by the Host and User parameters. Both the Host and User parameters support wildcards. If none of the Host and User parameters are specified, all available credential store items are returned. If the Host and User parameters are specified without using wildcards, and no item is found, non-terminating errors are reported for the Host and User parameters. If no file is specified, items are retrieved from the default credential store file %APPDATA%\VMware\credstore\vicredentials.xml.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Host | String | Specifies hosts for which you want to retrieve credential store items. | false | false |
User | String | Specifies users for which you want to retrieve credential store items. | false | false |
File | String | Specifies a path to a file where the credential store items that you want to retrieve are saved. | false | false |

Return Type

Zero or more VICredentialStoreItem objects

Notes

Examples

-------------- Example 1 --------------

Get-VICredentialStoreItem -User admin -Host 192.168.1.10 -File 'credentials.xml'

Retrieves the credentials for the 'admin' user on the specified host from a credential store file.


Get-VIEvent - vSphere PowerCLI Cmdlets Reference

Get-VIEvent

Synopsis

This cmdlet retrieves information about the events on a vCenter Server system.

Syntax

Get-VIEvent [[-Entity] <VIObject[]>] [-Start <DateTime>] [-Finish <DateTime>] [-Username <String>] [-MaxSamples <Int32>] [-Types <EventCategory[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet retrieves information about the events on a vCenter Server system. An event is any action in the vCenter Server system or ESX/ESXi host. You can filter retrieved events by specifying arguments for the cmdlet parameters. Filters are additive. For example, when you specify the Entity, Start, and Finish parameters, Get-VIEvent filters events both by the entity and the timestamp properties. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Entity | VIObject[] | Specifies objects (such as virtual machine, virtual machine host, resource pool, and so on) for which you want to collect events. | false | true (ByValue) |
Finish | DateTime | Specifies the end date of the events you want to retrieve. The valid formats are dd/mm/yyyy and mm/dd/yyyy, depending on the local machine regional settings. | false | false |
MaxSamples | Int32 | Specifies the maximum number of retrieved events. When you do not filter events by time period, the maximum number of retrieved events is set to 100 by default. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Start | DateTime | Specifies the start date of the events you want to retrieve. The valid formats are dd/mm/yyyy and mm/dd/yyyy, depending on the local machine regional settings. | false | false |
Types | EventCategory[] | Specifies the type of the events you want to collect. The valid values are Error, Info, and Warning. | false | false |
Username | String | Specifies the user that has initiated the events you want to retrieve. | false | false |

Return Type

Zero or more VimApi.Event objects

Notes

Calling Get-VIEvent without any parameters might result in significant dela ys depending on the total number of events on the server. Get-VIEvent might return duplicates in the output. For example, if a virtua l machine is the child of both a parent and a child resource pools, it will be returned twice. This issue will be fixed in future releases of vSphere PowerCLI.

Examples

-------------- Example 1 --------------

Get-VIEvent -Entity MyVM1 -Username admin -Type error -MaxSamples 15

Retrieves a list of the last fifteen error events on the VM virtual machine for the user admin.

-------------- Example 2 --------------

Connect-VIServer -Server 10.23.113.41

$events = Get-VIEvent -MaxSamples 100

foreach ($event in $events) {if  ($event.fullFormattedMessage -match "User (.*)@\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b logged in") {Write-Host ("User " + $matches[1] + " logged in at:" + $event.createdTime)} }

Gathers information for the users that have logged in.


Get-View - vSphere PowerCLI Cmdlets Reference

Get-View

Synopsis

This cmdlet returns the vSphere View objects that correspond to the specified search criteria.

Syntax

Get-View [-VIObject] <VIObject[]> [-Property <String[]>] [<CommonParameters>]
Get-View [-Server <VIServer[]>] [-SearchRoot <ManagedObjectReference>] -ViewType <Type> [-Filter <Hashtable>] [-Property <String[]>] [<CommonParameters>]
Get-View [-Server <VIServer[]>] [-Id] <ManagedObjectReference[]> [-Property <String[]>] [<CommonParameters>]
Get-View [-Property <String[]>] -RelatedObject <ViewBaseMirroredObject[]> [<CommonParameters>]

Related Commands

Online version
Get-VIObjectByVIView

Detailed Description

This cmdlet returns the vSphere View objects that correspond to the specified search criteria. The cmdlet retrieves the vSphere View objects specified by their IDs or by their corresponding vSphere inventory objects (VIObject). A View object ID is a <type>-<value> string. For objects with constant names such as AlarmManager and ServiceInstance, the ID format is <type> (see the examples).

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Id | ManagedObjectReference[] | Specifies the IDs of the View objects you want to retrieve. A view object ID is a <type>-<value> string. For objects with constant names such as AlarmManager and ServiceInstance, the ID format is <type> (see the examples). | true | false |
VIObject | VIObject[] | Specifies the vSphere managed object that corresponds to the View object you want to retrieve. When you pass VIServer, Get-View returns ServiceInstance. When the retrieved View object is a ServiceInstance, you cannot convert it to a VIObject with Get-VIObjectByVIView. | true | true (ByValue) |
Filter | Hashtable | Specifies a hash of <name>-<value> pairs, where <name> represents the property value to test, and <value> represents a regex pattern the property must match. If more than one pair is present, all the patterns must match. | false | false |
Property | String[] | Specifies the properties of the view object you want to retrieve. If no value is given, all properties are shown. | false | false |
RelatedObject | ViewBaseMirroredObject[] | Specifies view-related objects to retrieve their views. | true | true (ByValue) |
SearchRoot | ManagedObjectReference | Specifies a starting point for the search (in the context of the inventory). | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
ViewType | Type | Specifies the type of the View objects you want to retrieve. | true | false |

Return Type

Zero or more ViewBase objects

Notes

Examples

-------------- Example 1 --------------

$vm = Get-View -ViewType VirtualMachine -Filter @{"Name" = "VM"}

$vmhostView = Get-View -ID $vm.Runtime.Host

$vmhostView.Summary.Runtime

Gets the VM virtual machine using a filter by name, populates the view object and retrieves the runtime information.

-------------- Example 2 --------------

$folder = Get-Folder Folder | Get-View

Get-View -SearchRoot $folder.MoRef -ViewType "VirtualMachine"

Gets the view objects of virtual machines by specifying the root folder - MoRef.

-------------- Example 3 --------------

$folder = Get-Folder VM

$folderView = Get-View $folder -Property "[VirtualMachine]ChildEntity.Network.*"

$folderView.LinkedView.ChildEntity[0].LinkedView.Network

Gets the view of a folder by specifying for the Property parameter a property path, which leads to the networks of the virtual machines in the specified folder. Retrieves the first of the returned networks.

-------------- Example 4 --------------

Connect-CIServer CloudServer1

Connect-VIServer VIServer1

$cloudExternalNetworkView = Get-ExternalNetwork ExternalNetwork1 | Get-CIView

Get-View -RelatedObject $cloudExternalNetworkView

Gets the view of a vSphere object related to the specified Cloud object. In this case, gets the vSphere port group for the cloud external network.


Get-VIObjectByVIView - vSphere PowerCLI Cmdlets Reference

Get-VIObjectByVIView

Synopsis

This cmdlet converts a vSphere View object to a VIObject.

Syntax

Get-VIObjectByVIView [-VIView] <ViewBase[]> [<CommonParameters>]
Get-VIObjectByVIView [-Server <VIServer[]>] [-MORef] <ManagedObjectReference[]> [<CommonParameters>]

Related Commands

Online version
Get-View

Detailed Description

This cmdlet converts a vSphere View object to a VIObject using the object ID provided by the MoRef parameter. If the View object is a ServiceInstance, you cannot convert it to a VIObject.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
MORef | ManagedObjectReference[] | Specifies the managed object ID, obtained from a property of another managed object or a view. | true | true (ByValue) |
VIView | ViewBase[] | Specifies the vSphere .NET View object you want to convert to a vSphere PowerCLI object. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VIObject objects

Notes

Examples

-------------- Example 1 --------------

$view = Get-VM VM | Stop-VM | Get-View

$vm = Get-VIObjectByVIView $view | Start-VM

Gets the VM virtual machine, stops it, and gets its view object. Then, the command gets the virtual machine object using the Get-VIObjectByVIView cmdlet and starts the VM virtual machine.


Get-VIPermission - vSphere PowerCLI Cmdlets Reference

Get-VIPermission

Synopsis

This cmdlet retrieves the permissions defined on the specified inventory objects.

Syntax

Get-VIPermission [[-Entity] <VIObject[]>] [-Principal <VIAccount[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-VIPermission
Remove-VIPermission
Set-VIPermission
Get-VIPrivilege
Get-VIRole
New-VIRole
Remove-VIRole
Set-VIRole

Detailed Description

This cmdlet retrieves the permissions defined on the specified inventory objects. If no inventory objects are specified, the cmdlet retrieves all permissions available on the server.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Entity | VIObject[] | Specifies the inventory items for which you want to retrieve permissions. | false | true (ByValue) |
Principal | VIAccount[] | Specifies the users and groups for which you want to retrieve permissions. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more Permission objects

Notes

You can specify permissions to a datastore only on vSphere 4.0 and later.

Examples

-------------- Example 1 --------------

Get-VIPermission -Entity (Get-Datacenter) -Principal Administrator

Retrieves the permissions of the Administrator user on the provided datacenters.


Get-VIPrivilege - vSphere PowerCLI Cmdlets Reference

Get-VIPrivilege

Synopsis

This cmdlet retrieves the privilege groups and items for the provided servers.

Syntax

Get-VIPrivilege [-PrivilegeGroup] [-PrivilegeItem] [[-Name] <String[]>] [-Id <String[]>] [-Server <VIServer[]>] [<CommonParameters>]
Get-VIPrivilege [[-Name] <String[]>] [-Role] <Role[]> [-Id <String[]>] [<CommonParameters>]
Get-VIPrivilege [[-Name] <String[]>] [-Group] <PrivilegeGroup[]> [-Id <String[]>] [<CommonParameters>]

Related Commands

Online version
Get-VIRole
New-VIRole
Remove-VIRole
Set-VIRole

Detailed Description

This cmdlet retrieves the privilege groups and items for the provided servers.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the privileges you want to retrieve. | false | false |
Group | PrivilegeGroup[] | Specifies the privilege group whose items you want to retrieve. | true | true (ByValue) |
Role | Role[] | Specifies the roles whose privileges you want to retrieve. | true | true (ByValue) |
Id | String[] | Specifies the IDs of the privileges you want to retrieve. | false | false |
PrivilegeGroup | SwitchParameter | Indicates that you want to retrieve only the privilege groups and not the privilege items in them. | false | false |
PrivilegeItem | SwitchParameter | Indicates that you want to retrieve only the privilege items and not the privilege groups. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more Privilege objects

Notes

Examples

-------------- Example 1 --------------

Get-VIPrivilege -Name "Host*"

Retrieves all privileges with names that start with "Host".

-------------- Example 2 --------------

Get-VIPrivilege -PrivilegeGroup

Retrieves all privilege groups.


Get-VIProperty - vSphere PowerCLI Cmdlets Reference

Get-VIProperty

Synopsis

This cmdlet retrieves extended object properties.

Syntax

Get-VIProperty [[-Name] <String[]>] [[-ObjectType] <String[]>] [-DeclaredOnly] [<CommonParameters>]

Related Commands

Online version
Remove-VIProperty
New-VIProperty

Detailed Description

This cmdlet retrieves the extended properties and filters them by using the provided cmdlet parameters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the extended properties you want to retrieve. | false | false |
ObjectType | String[] | Specifies the object types for which you want to retrieve extended properties. | false | false |
DeclaredOnly | SwitchParameter | Indicates that you want to retrieve only the extended properties that have been directly defined for the specified object types. | false | false |

Return Type

Zero or more VIProperty objects

Notes

Examples

-------------- Example 1 --------------

Get-VIProperty -Name "property*"

Retrieve all custom properties that match the specified name pattern.

-------------- Example 2 --------------

Get-VIProperty -ObjectType 'VirtualMachine'

Retrieve all custom properties for the specified object type.

-------------- Example 3 --------------

Get-VIProperty -ObjectType 'VirtualMachine' -DeclaredOnly

Retrieve all custom properties for the specified object type that are not inherited.


Get-VIRole - vSphere PowerCLI Cmdlets Reference

Get-VIRole

Synopsis

This cmdlet retrieves all roles defined on the provided servers.

Syntax

Get-VIRole [[-Name] <String[]>] [-Id <String[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-VIRole
Remove-VIRole
Set-VIRole
Get-VIPrivilege
Get-VIPermission
New-VIPermission
Remove-VIPermission
Set-VIPermission

Detailed Description

This cmdlet retrieves all roles defined on the provided servers.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the roles you want to retrieve. | false | false |
Id | String[] | Specifies the IDs of the roles you want to retrieve. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more Role objects

Notes

Examples

-------------- Example 1 --------------

Get-VIRole -Server $server -Name "Admin*"

Retrieves all roles on the specified server with names that start with "Admin".


Get-VirtualPortGroup - vSphere PowerCLI Cmdlets Reference

Get-VirtualPortGroup

Synopsis

This cmdlet retrieves the available port groups of hosts, virtual machines, and virtual switches.

Syntax

Get-VirtualPortGroup [[-VMHost] <VMHost[]>] [-VM <VirtualMachine[]>] [-VirtualSwitch <VirtualSwitchBase[]>] [-Name <String[]>] [-Datacenter <Datacenter[]>] [-Standard] [-Distributed] [-Tag <Tag[]>] [-Server <VIServer[]>] [<CommonParameters>]
Get-VirtualPortGroup -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-VirtualPortGroup -RelatedObject <VirtualPortGroupRelatedObjectBase[]> [<CommonParameters>]

Related Commands

Online version
New-VirtualPortGroup
Remove-VirtualPortGroup
Set-VirtualPortGroup

Detailed Description

This cmdlet retrieves the available port groups of hosts, virtual machines, and virtual switches. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts whose port groups you want to retrieve. The position of this parameter is deprecated and will be changed in a future release. To avoid errors when you run existing scripts on future PowerCLI versions, specify the parameter by name. | false | true (ByValue) |
Datacenter | Datacenter[] | Filters the port groups of the virtual switches connected to hosts in the specified datacenters. | false | true (ByValue) |
Distributed | SwitchParameter | Indicates that you want to retrieve the port groups for DistributedSwitch objects. This parameter is obsolete. To retrieve distributed port groups, use the Get-VDPortgroup cmdlet instead. | false | false |
Id | String[] | Specifies the IDs of the port groups you want to retrieve. | true | false |
Name | String[] | Specifies the names of the port groups you want to retrieve. | false | false |
RelatedObject | VirtualPortGroupRelatedObjectBase[] | Specifies objects to retrieve one or more VirtualPortGroup objects that are related to them. This parameter accepts vCloud NetworkPool, vCloud ExternalNetwork, and vCloud OrgNetwork objects. Note: In vCloud Director 5.1 environments, you cannot retrieve a distributed port group from an organization network backed by the distributed port group. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Standard | SwitchParameter | Indicates that you want to retrieve the port groups for VirtualSwitch objects. | false | false |
Tag | Tag[] | Returns only the virtual port groups that are associated with any of the specified tags. Note: This parameter is compatible only with standard virtual port groups. For distributed port groups, you should use the Get-VDPortgroup cmdlet. | false | false |
VirtualSwitch | VirtualSwitchBase[] | Specifies the virtual switches for which you want to retrieve their port groups. | false | true (ByValue) |
VM | VirtualMachine[] | Specifies the virtual machines whose port groups you want to retrieve. | false | true (ByValue) |

Return Type

Zero or more VirtualPortGroup or DistributedPortGroup objects

Notes

This cmdlet retrieves standard port groups. Retrieving distributed port gro ups with this cmdlet is obsolete. Use the Get-VDPortgroup cmdlet instead.

Examples

-------------- Example 1 --------------

Get-VirtualPortgroup -Name "VM Network"

Retrieves all port groups named "VM Network".

-------------- Example 2 --------------

$myVMHost = Get-VMHost -Name "MyVMHost"
Get-VirtualPortGroup -Name "VM Network" -VMHost $myVmHost

Retrieves the port group named "VM Network" on the specified host.

-------------- Example 3 --------------

$myVM = Get-VM -Name "MyVM"
Get-VirtualPortGroup -VM $myVM

Retrieves all port groups to which the specified virtual machine is connected.

-------------- Example 4 --------------

$virtualSwitch = Get-VirtualSwitch -VMHost MyVMHost -Name vSwitch0
Get-VirtualPortGroup -VirtualSwitch $virtualSwitch

Retrieves all port groups which belong to the specified virtual switch.


Get-VirtualSwitch - vSphere PowerCLI Cmdlets Reference

Get-VirtualSwitch

Synopsis

This cmdlet retrieves the virtual switches associated with a virtual machine host or used by a virtual machine.

Syntax

Get-VirtualSwitch [[-VMHost] <VMHost[]>] [[-VM] <VirtualMachine[]>] [-Datacenter <Datacenter[]>] [-Name <String[]>] [-Standard] [-Distributed] [-Server <VIServer[]>] [<CommonParameters>]
Get-VirtualSwitch -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-VirtualSwitch -RelatedObject <VirtualSwitchRelatedObjectBase[]> [<CommonParameters>]

Related Commands

Online version
New-VirtualSwitch
Remove-VirtualSwitch
Set-VirtualSwitch

Detailed Description

This cmdlet retrieves the virtual switches associated with a virtual machine host or used by a virtual machine. At least one of the VMHost and VM parameters must be provided. The VM, VMHost, Name parameters do not accept string values through a pipeline because of collision. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts whose virtual switches you want to retrieve. The position of this parameter is deprecated and will be changed in a future release. To avoid errors when you run existing scripts on future PowerCLI versions, specify the parameter by name. | false | true (ByValue) |
VM | VirtualMachine[] | Specifies the virtual machines whose virtual switches you want to retrieve. | false | true (ByValue) |
Datacenter | Datacenter[] | Filters the virtual switches connected to hosts in the specified datacenters. | false | true (ByValue) |
Distributed | SwitchParameter | Indicates that you want to retrieve only DistributedSwitch objects. This parameter is obsolete. To retrieve distributed switches, use the Get-VDSwitch cmdlet instead. | false | false |
Id | String[] | Specifies the IDs of the virtual switches you want to retrieve. | true | false |
Name | String[] | Specifies the names of the virtual switches you want to retrieve. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. The position of this parameter is deprecated and will be changed in a future release. To avoid errors when you run existing scripts on future PowerCLI versions, specify the parameter by name. | false | false |
RelatedObject | VirtualSwitchRelatedObjectBase[] | Specifies objects to retrieve one or more VirtualSwitch objects that are related to them. This parameter accepts vCloud NetworkPool objects. Note: In vCloud Director 5.1 environments, you cannot retrieve a distributed switch from a network pool backed by the distributed switch. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Standard | SwitchParameter | Indicates that you want to retrieve only VirtualSwitch objects. | false | false |

Return Type

Zero or more VirtualSwitchBase objects

Notes

This cmdlet retrieves standard switches. Retrieving distributed switches wi th this cmdlet is obsolete. Use the Get-VDSwitch cmdlet instead.

Examples

-------------- Example 1 --------------

Get-VirtualSwitch -VM VM

Retrieves the virtual switch used by the virtual machine named VM.

-------------- Example 2 --------------

Get-Datacenter -Name "MyDatacenter" | Get-VirtualSwitch

Retrieves all virtual switches in the specified datacenter.

-------------- Example 3 --------------

Get-VMHost -Name "MyVMHost" | Get-VirtualSwitch

Retrieves all virtual switches on the specified host.

-------------- Example 4 --------------

Get-VirtualSwitch -Name "vSwitch0"

Retrieves all virtual switches named "vSwitch0".


Get-VM - vSphere PowerCLI Cmdlets Reference

Get-VM

Synopsis

This cmdlet retrieves the virtual machines on a vCenter Server system.

Syntax

Get-VM [[-Name] <String[]>] [-Server <VIServer[]>] [-Datastore <StorageResource[]>] [-Location <VIContainer[]>] [-Tag <Tag[]>] [-NoRecursion] [<CommonParameters>]
Get-VM [[-Name] <String[]>] [-Server <VIServer[]>] [-DistributedSwitch <DistributedSwitch[]>] [-Tag <Tag[]>] [<CommonParameters>]
Get-VM [-Server <VIServer[]>] -Id <String[]> [<CommonParameters>]
Get-VM -RelatedObject <VmRelatedObjectBase[]> [<CommonParameters>]

Related Commands

Online version
Remove-VM
New-VM
Set-VM
Move-VM
Start-VM
Stop-VM
Suspend-VM
Restart-VM

Detailed Description

This cmdlet retrieves the virtual machines on a vCenter Server system. Returns a set of virtual machines that correspond to the filter criteria provided by the cmdlet parameters. For virtual machines with multiple NICs and multiple IP addresses, the IPAddress property of the VMGuest object contains all IP addresses of the virtual machine. The IP at position 0 is the primary IP address.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the virtual machines you want to retrieve. | false | false |
Datastore | StorageResource[] | Specifies datastores or datastore clusters to filter the virtual machines associated with them. Passing values to this parameter through a pipeline is deprecated and will be removed in a future release. | false | true (ByValue) |
DistributedSwitch | DistributedSwitch[] | Filters the available virtual machines by the virtual switches they are connected to. | false | true (ByValue) |
Id | String[] | Specifies the IDs of the virtual machines you want to retrieve. | true | false |
Location | VIContainer[] | Specifies vSphere container objects you want to search for virtual machines. Supported container object types are: ResourcePool, VApp, VMHost, Folder, Cluster, Datacenter. | false | true (ByValue) |
NoRecursion | SwitchParameter | Indicates that you want to disable the recursive behavior of the command. | false | false |
RelatedObject | VmRelatedObjectBase[] | Specifies objects to retrieve one or more vSphere VirtualMachine objects that are related to them. This parameter accepts vCloud CIVM objects. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Tag | Tag[] | Returns only the virtual machines that are associated with any of the specified tags. | false | false |

Return Type

Zero or more VirtualMachine objects

Notes

Examples

-------------- Example 1 --------------

Get-VM -Name MyVM*

Retrieves all virtual machines whose names starting with "MyVM".

-------------- Example 2 --------------

$myDatastore = Get-Datastore -Name "MyDatastore"
Get-VM -Datastore $myDatastore

Retrieves all virtual machines that reside on the specified datastore.

-------------- Example 3 --------------

$myDatacenter = Get-Datacenter -Name "MyDatacenter"
Get-VM -Location $myDatacenter

Retrieves all virtual machines in the specified datacenter.

-------------- Example 4 --------------

$myVDSwitch = Get-VDSwitch -Name "MyVDSwitch"
Get-VM -DistributedSwitch $myVDSwitch

Retrieves all virtual machines connected to the specified distributed switch.


Get-VMGuest - vSphere PowerCLI Cmdlets Reference

Get-VMGuest

Synopsis

This cmdlet retrieves the guest operating systems of the specified virtual machines.

Syntax

Get-VMGuest [-VM] <VirtualMachine[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Suspend-VMGuest
Shutdown-VMGuest
Restart-VMGuest

Detailed Description

This cmdlet retrieves the guest operating systems of the specified virtual machines. To specify a server different from the default one, use the Server parameter. When Get-VMGuest is run against a virtual machine that is just starting, the properties of the returned VMGuest object are not filled at one time.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines whose guest operating systems you want to retrieve. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VMGuest objects

Notes

Examples

-------------- Example 1 --------------

Get-VMGuest -VM VM

Retrieves the guest OS of the virtual machine named VM.


Get-VMGuestNetworkInterface - vSphere PowerCLI Cmdlets Reference

Get-VMGuestNetworkInterface

Synopsis

This cmdlet etrieves information about the network configuration of the specified virtual machines or guests.

Syntax

Get-VMGuestNetworkInterface [-Name <String[]>] [[-VM] <VirtualMachine[]>] [-VMGuest <VMGuest[]>] [-Server <VIServer[]>] [-ToolsWaitSecs <Int32>] [-GuestPassword <SecureString>] [-GuestUser <String>] [-GuestCredential <PSCredential>] [-HostPassword <SecureString>] [-HostUser <String>] [-HostCredential <PSCredential>] [<CommonParameters>]

Related Commands

Online version
Set-VMGuestNetworkInterface

Detailed Description

This cmdlet retrieves information about the network configuration of the specified virtual machines or guests. This cmdlet supports only Windows XP 32 SP3, Windows Server 2003 32bit SP2, Windows Server 2003 64bit SP2, Windows 7 64 bit, Windows Server 2008 R2 64bit and Redhat Enterprise 5 operating systems.

To run this cmdlet against vCenter Server/ESX/ESXi versions earlier than 5.0, you need to meet the following requirements:
*You must run the cmdlet on the 32-bit version of Windows PowerShell.
*You must have access to the ESX that hosts the virtual machine over TCP port 902.
*For vCenter Server/ESX/ESXi versions earlier than 4.1, you need VirtualMachine.Interact.ConsoleInteract privilege. For vCenter Server/ESX/ESXi 4.1 and later, you need VirtualMachine.Interact.GuestControl privilege.

To run this cmdlet against vCenter Server/ESXi 5.0 and later, you need VirtualMachine.GuestOperations.Execute and VirtualMachine.GuestOperations.Modify privileges.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines for which you want to retrieve the network configuration. | false | true (ByValue) |
GuestCredential | PSCredential | Specifies a PSCredential object that contains credentials for authenticating with the guest OS. Do not use this parameter if the GuestUser and GuestPassword parameters are used. | false | false |
GuestPassword | SecureString | Specifies the password you want to use for authenticating with the guest OS. | false | false |
GuestUser | String | Specifies the user name you want to use for authenticating with the guest OS. | false | false |
HostCredential | PSCredential | Specifies a PSCredential object that contains credentials for authenticating with the host. Do not use this parameter if the HostUser and HostPassword parameters are used. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
HostPassword | SecureString | Specifies the password you want to use for authenticating with the host. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
HostUser | String | Specifies the user name you want to use for authenticating with the host. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
Name | String[] | Specifies the names of the guest network interfaces you want to retrieve. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
ToolsWaitSecs | Int32 | Specifies the time in seconds to wait for a response from the VMware Tools. If a non-positive value is provided, the system waits infinitely long time. | false | false |
VMGuest | VMGuest[] | Specifies the guest OS for which you want to retrieve the network configuration. | false | true (ByValue) |

Return Type

Zero or more VMGuestNetworkInterface objects

Notes

This cmdlet is experimental and might be changed or removed in a future rel ease.

Examples

-------------- Example 1 --------------

Get-VMGuestNetworkInterface -VM $vm -GuestUser User -GuestPassword pass2

Retrieves the guest network interface of the $vm virtual machine.


Get-VMGuestRoute - vSphere PowerCLI Cmdlets Reference

Get-VMGuestRoute

Synopsis

This cmdlet retrieves the routing configuration of the specified virtual machines or guests.

Syntax

Get-VMGuestRoute [[-VM] <VirtualMachine[]>] [-VMGuest <VMGuest[]>] [-Server <VIServer[]>] [-ToolsWaitSecs <Int32>] [-GuestPassword <SecureString>] [-GuestUser <String>] [-GuestCredential <PSCredential>] [-HostPassword <SecureString>] [-HostUser <String>] [-HostCredential <PSCredential>] [<CommonParameters>]

Related Commands

Online version
New-VMGuestRoute
Remove-VMGuestRoute

Detailed Description

This cmdlet retrieves the routing configuration of the specified virtual machines or guests. This cmdlet supports only Windows XP 32 SP3, Windows Server 2003 32bit SP2, Windows Server 2003 64bit SP2, Windows 7 64 bit, Windows Server 2008 R2 64bit and Redhat Enterprise 5 operating systems.

To run this cmdlet against vCenter Server/ESX/ESXi versions earlier than 5.0, you need to meet the following requirements:
*You must run the cmdlet on the 32-bit version of Windows PowerShell.
*You must have access to the ESX that hosts the virtual machine over TCP port 902.
*For vCenter Server/ESX/ESXi versions earlier than 4.1, you need VirtualMachine.Interact.ConsoleInteract privilege. For vCenter Server/ESX/ESXi 4.1 and later, you need VirtualMachine.Interact.GuestControl privilege.

To run this cmdlet against vCenter Server/ESXi 5.0 and later, you need VirtualMachine.GuestOperations.Execute and VirtualMachine.GuestOperations.Modify privileges.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines for which you want to retrieve the routing configuration. | false | true (ByValue) |
GuestCredential | PSCredential | Specifies a PSCredential object that contains credentials for authenticating with the guest OS. Do not use this parameter if the GuestUser and GuestPassword parameters are used. | false | false |
GuestPassword | SecureString | Specifies the password you want to use for authenticating with the guest OS. | false | false |
GuestUser | String | Specifies the user name you want to use for authenticating with the guest OS. | false | false |
HostCredential | PSCredential | Specifies a PSCredential object that contains credentials for authenticating with the host. Do not use this parameter if the HostUser and HostPassword parameters are used. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
HostPassword | SecureString | Specifies the password you want to use for authenticating with the host. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
HostUser | String | Specifies the user name you want to use for authenticating with the host. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
ToolsWaitSecs | Int32 | Specifies the time in seconds to wait for a response from the VMware Tools. If a non-positive value is provided, the system waits infinitely long time. | false | false |
VMGuest | VMGuest[] | Specifies the guest operating systems for which you want to retrieve the routing configuration. | false | true (ByValue) |

Return Type

Zero or more VMGuestRoute objects

Notes

This cmdlet is experimental and might be changed or removed in a future rel ease.

Examples

-------------- Example 1 --------------

Get-VMGuestRoute -VM $vm -GuestUser User -GuestPassword pass2

Retrieves the guest route of the $vm virtual machine.


Get-VMHost - vSphere PowerCLI Cmdlets Reference

Get-VMHost

Synopsis

This cmdlet retrieves the hosts on a vCenter Server system.

Syntax

Get-VMHost [[-Name] <String[]>] [-NoRecursion] [-Datastore <StorageResource[]>] [-State <VMHostState[]>] [-Location <VIContainer[]>] [-Tag <Tag[]>] [-Server <VIServer[]>] [<CommonParameters>]
Get-VMHost [[-Name] <String[]>] [-DistributedSwitch <DistributedSwitch[]>] [-Tag <Tag[]>] [-Server <VIServer[]>] [<CommonParameters>]
Get-VMHost [[-Name] <String[]>] [-NoRecursion] [-VM <VirtualMachine[]>] [-ResourcePool <ResourcePool[]>] [-Datastore <StorageResource[]>] [-Location <VIContainer[]>] [-Tag <Tag[]>] [-Server <VIServer[]>] [<CommonParameters>]
Get-VMHost -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Add-VMHost
Move-VMHost
Remove-VMHost
Restart-VMHost
Set-VMHost
Start-VMHost
Stop-VMHost
Suspend-VMHost

Detailed Description

This cmdlet retrieves the hosts on a vCenter Server system. Returns a set of hosts that correspond to the filter criteria provided by the cmdlet parameters. To specify a server different from the default one, use the Server parameter.
When working directly on an ESX host, the Name property of the returned VMHost object contains either the DNS name or the IP of the ESX host, depending on which of them was specified when connecting with Connect-VIServer.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the hosts you want to retrieve. | false | false |
Datastore | StorageResource[] | Specifies the datastores or datastore clusters to which the hosts that you want to retrieve are associated. Passing values to this parameter through a pipeline is deprecated and will be removed in a future release. | false | true (ByValue) |
DistributedSwitch | DistributedSwitch[] | Filters the available hosts by the virtual switches they are connected to. | false | true (ByValue) |
Id | String[] | Specifies the IDs of the hosts you want to retrieve. | true | false |
Location | VIContainer[] | Specifies the vSphere container objects (such as folders, datacenters, and clusters) you want to search for hosts. | false | true (ByValue) |
NoRecursion | SwitchParameter | Indicates that you want to disable the recursive behavior of the command. | false | false |
ResourcePool | ResourcePool[] | Specifies resource pools associated with the hosts you want to retrieve. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
State | VMHostState[] | Specifies the state of the hosts you want to retrieve. The valid values are Connected, Disconnected, NotResponding, and Maintenance. | false | false |
Tag | Tag[] | Returns only the virtual machine hosts that are associated with any of the specified tags. | false | false |
VM | VirtualMachine[] | Specifies virtual machines whose hosts you want to retrieve. | false | true (ByValue) |

Return Type

Zero or more VMHost objects

Notes

When working directly on an ESX host, the Name property of the returned VMH ost object contains either the DNS name or the IP of the ESX host, dependi ng on which of them was specified when connecting with Connect-VIServer.

Examples

-------------- Example 1 --------------

Get-VMHost -Location MyDatacenter

Retrieves all hosts in the specified datacenter.

-------------- Example 2 --------------

$MyVM = Get-VM -Name MyVM
Get-VMHost -VM $MyVM

Retrieves the host on which the specified virtual machine runs.

-------------- Example 3 --------------

$myVDSwitch = Get-VDSwitch -Name "MyVDSwitch"
Get-VMHost -DistributedSwitch $myVDSwitch

Retrieves all hosts associated with the specified vSphere distributed switch.


Get-VMHostAccount - vSphere PowerCLI Cmdlets Reference

Get-VMHostAccount

Synopsis

This cmdlet retrieves the host accounts available on a vCenter Server system.

Syntax

Get-VMHostAccount [-Group] [-User] [[-Id] <String[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Remove-VMHostAccount
New-VMHostAccount
Set-VMHostAccount

Detailed Description

This cmdlet retrieves the host accounts available on a vCenter Server system. If both User and Group parameters are set to $true, in the list returned by the command, group accounts come out on top. If none of the User and Group switch parameters are provided, the cmdlet retrieves only the user accounts.
If the ID parameter is set, the cmdlet filters the host accounts by their IDs. To specify a server different from the default one, use the Server parameter.
Note: The specified server must be an ESX/ESXi host.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Id | String[] | Specifies the IDs of the host accounts you want to retrieve. | false | false |
Group | SwitchParameter | Indicates that you want to retrieve only group host accounts. Starting with ESXi 5.1, this parameter is not supported. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | true (ByValue) |
User | SwitchParameter | Indicates that you want to retrieve only user host accounts. | false | false |

Return Type

Zero or more HostAccount objects

Notes

Depending on what the user specified, the returned object can be of one of the child types: HostGroupAccount, HostUserAccount. Starting with ESXi 5.1, you cannot retrieve group host accounts.

Examples

-------------- Example 1 --------------

Get-VMHostAccount -Group

Retrieves the group accounts for the default ESX/ESXi host. Starting with ESXi 5.1, you cannot retrieve group accounts.

-------------- Example 2 --------------

$myServer1 = Connect-VIServer -Server 10.23.112.235
$myUserAccount1 = New-VMHostAccount -ID MyUser1 -Password MyPass1 -UserAccount
Get-VMHostAccount -Server $myServer1 -ID $myUserAccount1.Id -User

Retrieves a host account specified by an ID and an ESX/ESXi host.

-------------- Example 3 --------------

$myServer1 = Connect-VIServer -Server 10.23.112.235
$myGroupAccount1 = New-VMHostAccount -ID MyGroup1 -Password MyPassword1 -GroupAccount
Get-VMHostAccount -Server $myServer1 -Id $myGroupAccount.Id -Group

Retrieves a group host account specified by an ID and an ESX/ESXi host. Starting with ESXi 5.1, you cannot retrieve group host accounts.

-------------- Example 4 --------------

$myServer1 = Connect-VIServer 10.23.112.235
Get-VMHostAccount -Server $myServer1 -User -Group

Retrieves all user and group accounts on a specified ESX/ESXi host. Starting with ESXi 5.1, you cannot retrieve group host accounts.


Get-VMHostAdvancedConfiguration - vSphere PowerCLI Cmdlets Reference

Get-VMHostAdvancedConfiguration

Synopsis

This cmdlet retrieves the advanced configuration of the hosts.

Syntax

Get-VMHostAdvancedConfiguration [[-Name] <String[]>] [-VMHost] <VMHost[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Set-VMHostAdvancedConfiguration

Detailed Description

This cmdlet is deprecated. Use Get-AdvancedSetting instead.

This cmdlet retrieves the advanced configuration of the hosts. For each of the specified hosts, the cmdlet returns a hash table mapping the names of the settings to the corresponding values.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the host configuration settings you want to retrieve. | false | false |
VMHost | VMHost[] | Specifies the hosts for which you want to retrieve the configuration settings. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | true (ByValue) |

Return Type

Zero or more System.Collections.Hashtable objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHostAdvancedConfiguration -VMHost 10.23.123.100 -Name net*tcp*

Retrieves the virtual machine host advanced configuration settings, whose names contain "net" and "tcp".


Get-VMHostAttributes - vSphere Auto Deploy Reference

Get-VMHostAttributes

Synopsis

Gets the identifying attributes of a host.

Syntax

Get-VMHostAttributes [-VMHost] <VMHost> [<CommonParameters>]

Related Commands

Get-VMHost

Detailed Description

Gets the identifying attributes of a host. These are the attributes that the rules will match against.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost | Host to get the attributes for. Use Get-VMHost to retrieve the host object associated with a host name. | true | true (ByValue) |

Return Type

Notes

Examples

-------------- Example 1 --------------

C:\PS> Get-VMHostAttributes myhost

"ipv4" "192.168.1.1"

"vendor" "VMware"

Retrieves the identifying attributes for the host named myhost.

-------------- Example 2 --------------

C:\PS> Get-VMhost "myhost" | Get-VMHostAttributes

"ipv4" "192.168.1.1"

"vendor" "VMware"

Retrieves the identifying attributes for the host named myhost.

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Get-VMHostAuthentication - vSphere PowerCLI Cmdlets Reference

Get-VMHostAuthentication

Synopsis

This cmdlet retrieves authentication information for the specified hosts.

Syntax

Get-VMHostAuthentication [[-VMHost] <VMHost[]>] [-Server <VIServer[]>] [<CommonParameters>]
Get-VMHostAuthentication -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Set-VMHostAuthentication

Detailed Description

This cmdlet retrieves authentication information for the specified hosts.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts for which you want to retrieve authentication information. | false | true (ByValue) |
Id | String[] | Specifies the IDs of the host authentication information that you want to retrieve. | true | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VMHostAuthentication objects

Notes

Supported only on ESX Server 4.1 and later.

Examples

-------------- Example 1 --------------

$vmhost | Get-VMHostAuthentication

Retrieve authentication information for the specified host.


Get-VMHostAvailableTimeZone - vSphere PowerCLI Cmdlets Reference

Get-VMHostAvailableTimeZone

Synopsis

This cmdlet retrieves the time zones available on the specified host.

Syntax

Get-VMHostAvailableTimeZone [-VMHost] <VMHost[]> [[-Name] <String[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Set-VMHost

Detailed Description

This cmdlet retrieves the time zones available on the specified host.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the available time zones you want to retrieve. | false | false |
VMHost | VMHost[] | Specifies the host for which you want to retrieve the available time zones. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VMHostTimeZone objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHostAvailableTimeZone -Name Pacific* -VMHost 10.23.112.19

Retrieves the Pacific time zones available on the specified host.


Get-VMHostDiagnosticPartition - vSphere PowerCLI Cmdlets Reference

Get-VMHostDiagnosticPartition

Synopsis

This cmdlet retrieves a list of the diagnostic partitions on the specified hosts.

Syntax

Get-VMHostDiagnosticPartition [-VMHost] <VMHost[]> [-All] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Set-VMHostDiagnosticPartition

Detailed Description

This cmdlet retrieves a list of the diagnostic partitions on the specified hosts. The list is ordered by the partitions preference. Local diagnostic partitions are more preferable than shared diagnostic partitions because multiple servers cannot share the same partition. The most preferred diagnostic partition is first in the list.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts for which you want to retrieve diagnostic partitions. | true | true (ByValue) |
All | SwitchParameter | Indicates that you want to retrieve all diagnostic partitions on the specified hosts. By default, only the active partitions are retrieved. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VMHostDiagnosticPartition objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHost 192.168.1.10 | Get-VMHostDiagnosticPartition -All

Retrieves all diagnostic partitions for the specified host.


Get-VMHostDisk - vSphere PowerCLI Cmdlets Reference

Get-VMHostDisk

Synopsis

This cmdlet retrieves information about the specified SCSI LUN disk.

Syntax

Get-VMHostDisk [[-VMHost] <VMHost[]>] [-Server <VIServer[]>] [<CommonParameters>]
Get-VMHostDisk -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-VMHostDisk [[-ScsiLun] <ScsiLun[]>] [<CommonParameters>]

Related Commands

Online version
Get-VMHostDiskPartition

Detailed Description

This cmdlet retrieves information about the specified SCSI LUN disk.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
ScsiLun | ScsiLun[] | Specifies the SCSI LUN for which you want to retrieve information. | false | true (ByValue) |
VMHost | VMHost[] | Specifies hosts to retrieve the hard disks attached to them. | false | true (ByValue) |
Id | String[] | Specifies the IDs of the SCSI LUN disks that you want to retrieve. | true | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VMHostDisk objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHostDisk -VMHost $vmhost

Retrieves the disks of the specified host.

-------------- Example 2 --------------

$vmhost | Get-VMHostHba -Type FibreChannel | Get-ScsiLun | Get-VMHostDisk

Retrieves the host disks only for LUNs that are of FibreChannel type.


Get-VMHostDiskPartition - vSphere PowerCLI Cmdlets Reference

Get-VMHostDiskPartition

Synopsis

This cmdlet retrieves the partitions of a host disk (LUN).

Syntax

Get-VMHostDiskPartition [[-VMHostDisk] <VMHostDisk[]>] [<CommonParameters>]
Get-VMHostDiskPartition -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-VMHostDisk
Format-VMHostDiskPartition

Detailed Description

This cmdlet retrieves the partitions of a host disk (LUN).

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHostDisk | VMHostDisk[] | Specifies the host disk for which you want to retrieve the partitions. | false | true (ByValue) |
Id | String[] | Specifies the IDs of the host disk partitions that you want to retrieve. | true | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VMHostDiskPartition objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHost Host | Get-VMHostDisk | Get-VMHostDiskPartition | ? {.Type -eq "Ntfs"} | Format-VMHostDiskPartition -VolumeName "NewStorage"

Formats the NTFS disk partitions of a host.


Get-VMHostFirewallDefaultPolicy - vSphere PowerCLI Cmdlets Reference

Get-VMHostFirewallDefaultPolicy

Synopsis

This cmdlet retrieves the firewall default policy of the specified hosts.

Syntax

Get-VMHostFirewallDefaultPolicy [-VMHost] <VMHost[]> [[-Server] <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Set-VMHostFirewallDefaultPolicy

Detailed Description

This cmdlet retrieves the firewall default policy of the specified hosts. The firewall policy determines whether the outgoing and incoming connections are allowed.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts whose firewall default policy you want to retrieve. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VMHostFirewallDefaultPolicy objects

Notes

Firewall management functionality is not supported on ESX 3i.

Examples

-------------- Example 1 --------------

Get-VMHostFirewallDefaultPolicy -VMHost 10.23.123.100

Retrieves the default firewall policy of the virtual machine host with an IP address 10.23.123.100.


Get-VMHostFirewallException - vSphere PowerCLI Cmdlets Reference

Get-VMHostFirewallException

Synopsis

This cmdlet retrieves the exceptions from the firewall policy on the specified hosts.

Syntax

Get-VMHostFirewallException [[-Name] <String[]>] [-VMHost] <VMHost[]> [-Port <Int32[]>] [-Enabled [<Boolean>]] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Set-VMHostFirewallException

Detailed Description

This cmdlet retrieves the exceptions from the firewall policy on the specified hosts. The exceptions can be filtered using the VMHost, Name, Port, and Enabled parameters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the firewall exceptions you want to retrieve. | false | false |
VMHost | VMHost[] | Specifies the hosts for which you want to retrieve firewall exceptions. | true | true (ByValue) |
Enabled | Boolean | Indicates whether you want to retrieve only the enabled hosts firewall exceptions. | false | false |
Port | Int32[] | Specifies the number of the port for which you want to retrieve the firewall exceptions. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VMHostFirewallException objects

Notes

Firewall management functionality is not supported on ESX 3i.

Examples

-------------- Example 1 --------------

Get-VMHost -Name VMHost1 | Get-VMHostFirewallException -Enabled:$true

Retrieves the enabled firewall exceptions of a host named VMHost1.

-------------- Example 2 --------------

Get-VMHostFirewallException "SSH Server", "SSH Client" -VMHost $vmhost

Retrieves the firewall exceptions for the SSH server and client for the virtual machine host $vmhost.

-------------- Example 3 --------------

Get-VMHostFirewallException -VMHost Host -Port 21

Retrieves the firewall exceptions of a host named Host. Only firewall exceptions which have port 21 in their incoming port or outgoing ports are returned.


Get-VMHostFirmware - vSphere PowerCLI Cmdlets Reference

Get-VMHostFirmware

Synopsis

This cmdlet retrieves hosts firmware information.

Syntax

Get-VMHostFirmware [-VMHost] <VMHost[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-VMHostFirmware [-VMHost] <VMHost[]> [-BackupConfiguration] -DestinationPath <String> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Set-VMHostFirmware

Detailed Description

This cmdlet retrieves firmware information for the hosts specified by the VMHost parameter. To specify a server different from the default one, use the Server parameter. To run this cmdlet, you need to have the "Host.Config.Firmware" permission to the ESX.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts for which you want to retrieve firmware information. | true | true (ByValue) |
BackupConfiguration | SwitchParameter | Indicates that you want to backup the host firmware configuration and download the bundle to the specified DestinationPath. | false | false |
DestinationPath | String | Specifies a destination path where to download the host configuration backup bundle if the BackupConfiguration parameter is set. | true | false |
Server | VIServer[] | This parameter is required when you specify the host by name. In this case, the host with the specified name is searched on the specified servers and firmware information is retrieved from it. If a VMHost object is passed to the VMHost parameter, the Server parameter is not used. | false | false |

Return Type

Zero or more HostFirmware or HostFirmwareBundle objects

Notes

This functionality applies to ESXi Embedded only.

Examples

-------------- Example 1 --------------

Get-VMHostFirmware -VMHost $vmhost

Retrieves the firmware information for the specified host.

-------------- Example 2 --------------

Get-VMHostFirmware -VMHost $vmhost -BackupConfiguration -DestinationPath C:\Downloads

Backups a server configuration for the virtual machine host stored in the $vmhost variable, and downloads the configuration files into the specified folder.


Get-VMHostHba - vSphere PowerCLI Cmdlets Reference

Get-VMHostHba

Synopsis

This cmdlet retrieves information about the available HBAs (Host Bus Adapter).

Syntax

Get-VMHostHba [[-VMHost] <VMHost[]>] [[-Device] <String[]>] [-Type <HbaType[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-IScsiHbaTarget
New-IScsiHbaTarget
Remove-IScsiHbaTarget
Set-IScsiHbaTarget
Set-VMHostHba

Detailed Description

This cmdlet retrieves information about the available HBAs (Host Bus Adapter).

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Device | String[] | Specifies the devices of the HBA you want to retrieve. | false | false |
VMHost | VMHost[] | Specifies the hosts for which you want to retrieve HBAs. | false | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Type | HbaType[] | Specifies the type of the HBAs you want to retrieve. The valid values are Block, FibreChannel, iSCSI, and ParallelSCSI. | false | false |

Return Type

Zero or more Hba objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHostHba -Device *hba0* | fl

Retrieves the available HBA devices that contain "hba0" in their names.


Get-VMHostImageProfile - vSphere Auto Deploy Reference

Get-VMHostImageProfile

Synopsis

Gets the image profile associated with the specified ESXi host.

Syntax

Get-VMHostImageProfile -Entity <VIObjectCore> [<CommonParameters>]

Related Commands

Apply-ESXImageProfile
Get-VMHost

Detailed Description

Gets the image profile currently associated with the specified ESXi host. Use the Get-VMHost cmdlet to retrieve the host.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Entity | VIObjectCore | Host to retrieve the image profile information for. | true | true (ByValue) |

Return Type

VMware.ImageBuilder.Types.ImageProfile

Notes

Examples

-------------- Example 1 --------------

C:\PS> Get-VMHostImageProfile -Entity h1

Get the image profile associated with host "h1".

-------------- Example 2 --------------

C:\PS> Get-VMHostImageProfile -Entity (Get-VMHost "h1")

Get the image profile associated with host "h1".

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Get-VMHostMatchingRules - vSphere Auto Deploy Reference

Get-VMHostMatchingRules

Synopsis

Retrieves the list of rules in the rule set that match a specified host.

Syntax

Get-VMHostMatchingRules [-VMHost] <VMHost> [-DeployRuleSet <DeployRuleSet>] [<CommonParameters>]

Related Commands

Get-DeployRuleSet
New-DeployRule

Detailed Description

Retrieves the list of rules in the rule set that match a specified host. You can use this cmdlet to debug your working rule set before activating it.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost | The VMHost object to match against. | true | true (ByValue) |
DeployRuleSet | DeployRuleSet | The set of rules to match against a host. | false | false |

Return Type

VMware.DeployAutomation.Types.DeployRule[]

Notes

The DeployRule object has the following properties: Name System.String Pattern DeployRule.Pattern[] Items System.VIObject[]

Examples

-------------- Example 1 --------------

C:\PS> Get-VMHostMatchingRules h1

Get the list of rules that match host "h1".

-------------- Example 2 --------------

C:\PS> Get-VMHostMatchingRules (Get-VMHost "h1")

Get the list of rules that match host "h1".

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Get-VMHostModule - vSphere PowerCLI Cmdlets Reference

Get-VMHostModule

Synopsis

This cmdlet retrieves the option strings of the specified host modules.

Syntax

Get-VMHostModule [-VMHost] <VMHost[]> [[-Name] <String[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Set-VMHostModule

Detailed Description

This cmdlet retrieves the option strings of the specified host modules. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the host modules you want to retrieve. To find a list of the valid module names for different servers, see the vSphere documentation or in the ESX console, run "esxcfg-module -l". This parameter is mandatory only if you are connected to ESX/vCenter Server with version earlier than 4.0. | false | false |
VMHost | VMHost[] | Specifies hosts to retrieve their modules. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | true (ByValue) |

Return Type

Zero or more VmHostModule objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHostModule -Name Shaper

Retrieves the option string for the specified host module.


Get-VMHostNetwork - vSphere PowerCLI Cmdlets Reference

Get-VMHostNetwork

Synopsis

THis cmdlet retrieves the host networks on a vCenter Server system.

Syntax

Get-VMHostNetwork [-Server <VIServer[]>] [-VMHost] <VMHost[]> [<CommonParameters>]

Related Commands

Online version
Set-VMHostNetwork

Detailed Description

This cmdlet retrieves the host networks on a vCenter Server system. This command retrieves the networking configuration of the hosts specified by the VMHost parameter. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts whose networking configuration you want to retrieve. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VMHostNetworkInfo objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHostNetwork -VMHost 10.23.113.212 | fl

Retrieves the networking configuration for the virtual machine host on IP address 10.23.113.212.


Get-VMHostNetworkAdapter - vSphere PowerCLI Cmdlets Reference

Get-VMHostNetworkAdapter

Synopsis

This cmdlet retrieves the host network adapters on a vCenter Server system.

Syntax

Get-VMHostNetworkAdapter [[-VMHost] <VMHost[]>] [-Physical] [-VMKernel] [-Console] [[-Name] <String[]>] [-Id <String[]>] [-Server <VIServer[]>] [<CommonParameters>]
Get-VMHostNetworkAdapter [[-VirtualSwitch] <VirtualSwitchBase[]>] [-PortGroup <VirtualPortGroupBase[]>] [-Physical] [-VMKernel] [-Console] [[-Name] <String[]>] [-Id <String[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-VMHostNetworkAdapter
Remove-VMHostNetworkAdapter
Set-VMHostNetworkAdapter

Detailed Description

This cmdlet retrieves the host network adapters on a vCenter Server system.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VirtualSwitch | VirtualSwitchBase[] | Specifies the virtual switches to which network adapters that you want to retrieve are connected. | false | true (ByValue) |
VMHost | VMHost[] | Specifies the hosts whose network adapters you want to retrieve. The position of this parameter is deprecated and might change in a following release. | false | true (ByValue) |
Name | String[] | Specifies the names of the host network adapters you want to retrieve. The position of this parameter might change in a future release. | false | false |
Console | SwitchParameter | Indicates that you want to retrieve only service console virtual network adapters. | false | false |
Id | String[] | Specifies the IDs of the host network adapters you want to retrieve. | false | false |
Physical | SwitchParameter | Indicates that you want to retrieve only physical network adapters. | false | false |
PortGroup | VirtualPortGroupBase[] | Specifies the port groups to which network adapters that you want to retrieve are connected. | false | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VMKernel | SwitchParameter | Indicates that you want to retrieve only VMKernel virtual network adapters. | false | false |

Return Type

Zero or more HostVirtualNic objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHostNetworkAdapter -VMKernel

Retrieves information about about all VMKernel network adapters on servers that you are connected to.

-------------- Example 2 --------------

$myVMHost = Get-VMHost -Name MyVMHost
Get-VMHostNetworkAdapter -VMHost $myVMHost -Physical

Retrieves all physical network adapters on the specified host.

-------------- Example 3 --------------

$myVDSwitch = Get-VDSwitch -Name MyVDSwitch
Get-VMHostNetworkAdapter -VirtualSwitch $myVDSwitch -VMKernel

Retrieves all VMKernel network adapters connected to the specified virtual switch.

-------------- Example 4 --------------

Get-VDPortGroup -Name MyVDPortGroup | Get-VMHostNetworkAdapter

Retrieves VMHost network adapters by a specified distributed port group.

-------------- Example 5 --------------

$myVirtualSwitch = Get-VirtualSwitch -Name MyVirtualSwitch
Get-VMHostNetworkAdapter -VirtualSwitch $myVirtualSwitch

Retrieves physical VMHost network adapters by a specified standard virtual switch.


Get-VMHostNtpServer - vSphere PowerCLI Cmdlets Reference

Get-VMHostNtpServer

Synopsis

This cmdlet retrieves the NTP servers on the specified hosts.

Syntax

Get-VMHostNtpServer [-VMHost] <VMHost[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Add-VMHostNtpServer
Remove-VMHostNtpServer

Detailed Description

This cmdlet retrieves the NTP servers on the specified hosts.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts, whose NTP servers you want to retrieve. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more String objects

Notes

Returns the IP addresses of the NTP servers.

Examples

-------------- Example 1 --------------

Get-VMHostNtpServer -VMHost 10.23.123.100

Retrieves the NTP server of the virtual machine host with an IP address 10.23.123.100.

127.127.1.0


Get-VMHostPatch - vSphere PowerCLI Cmdlets Reference

Get-VMHostPatch

Synopsis

This cmdlet retrieves information about the host patches installed on the specified hosts.

Syntax

Get-VMHostPatch [[-VMHost] <VMHost[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Install-VMHostPatch

Detailed Description

This cmdlet retrieves information about the host patches installed on the specified hosts.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts for which you want to retrieve the available patches. | false | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VMHostPatch objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHostPatch Host

Retrieves information of the host patches installed on the specified host.


Get-VMHostProfile - vSphere PowerCLI Cmdlets Reference

Get-VMHostProfile

Synopsis

This cmdlet retrieves the available host profiles.

Syntax

Get-VMHostProfile [[-Name] <String[]>] [-Description <String[]>] [-Entity <InventoryItem[]>] [-ReferenceHost <VMHost[]>] [-Id <String[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Apply-VMHostProfile
Export-VMHostProfile
Import-VMHostProfile
New-VMHostProfile
Remove-VMHostProfile
Set-VMHostProfile
Test-VMHostProfileCompliance

Detailed Description

This cmdlet retrieves the available host profiles. A host profile encapsulates the host settings and helps to manage the host configuration.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the host profiles you want to retrieve. | false | false |
Description | String[] | Specifies a phrase from the description of the host profiles you want to retrieve. | false | false |
Entity | InventoryItem[] | Specifies inventory objects associated with the host profiles you want to retrieve. | false | true (ByValue) |
Id | String[] | Specifies the IDs of the host profiles you want to retrieve. | false | false |
ReferenceHost | VMHost[] | Specifies the reference hosts of the profiles you want to retrieve. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | true (ByValue) |

Return Type

Zero or more VMHostProfile objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHostProfile -Name Profile

Retrieves the virtual machine host profile named Profile.


Get-VMHostProfileRequiredInput - vSphere PowerCLI Cmdlets Reference

Get-VMHostProfileRequiredInput

Synopsis

This cmdlet performs a check whether the available information is sufficient to apply a host profile.

Syntax

Get-VMHostProfileRequiredInput [-VMHost] <VMHost> [[-Variable] <Hashtable>] [-Profile <VMHostProfile>] [-Inapplicable] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet performs a check whether the available information is sufficient to apply a host profile, and returns missing values. If the cmdlet returns no output, the information in the hashtable passed to the Variable parameter is sufficient to apply the host profile to the host by using the Apply-VMHostProfile cmdlet.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost | Specifies a host to check if the provided information is sufficient for applying the specified host profile. | true | true (ByValue) |
Variable | Hashtable | Provides a hash table that contains the available values required for applying the specified profile to the the specified host. | false | false |
Inapplicable | SwitchParameter | Indicates that you want to view also the elements that are inapplicable to the operation. | false | false |
Profile | VMHostProfile | Specifies a host profile to check if the provided information is sufficient for applying it to the specified host. | false | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VMHostProfileInput objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHost | Get-VMHostProfileRequiredInput

Retrieves required input for a list of hosts.

-------------- Example 2 --------------

Get-VMHostProfileRequiredInput -VMHost $vmhost -Profile $vmhostProfile

Retrieves a required input by specifying a host and a profile.

-------------- Example 3 --------------

$result = Get-VMHostProfileRequiredInput -VMHost $vmhost -Variable $requiredInputHashtable;

if (-not $result) { Apply-VMHostProfile -Entity $vmhost -Variable $requiredInputHashtable}

Check whether the specified hashtable that contains values for each required input is exhaustive. If the result is null, then the hashtable can be used by Apply-VMHostProfile.

-------------- Example 4 --------------

$result = Get-VMHostProfileRequiredInput -VMHost $vmhost -Variable $requiredInputHashtable -Inapplicable;

$result | where { $_.Type -eq 'Inapplicable' } | foreach { Write-Host "Key $($_.Key) is not applicable for host $vmhost" }

Retrieve the required and inapplicable input and display all inapplicable keys.


Get-VMHostRoute - vSphere PowerCLI Cmdlets Reference

Get-VMHostRoute

Synopsis

This cmdlet retrieves the routes from the routing table of the specified hosts.

Syntax

Get-VMHostRoute [[-VMHost] <VMHost[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-VMHostRoute
Remove-VMHostRoute
Set-VMHostRoute

Detailed Description

This cmdlet retrieves the routes from the routing table of the specified hosts.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts for which you want to retrieve routes. | false | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VMHostRoute objects

Notes

Supported only on ESX 4.0/ vCenter Server 4.0 and later.

Examples

-------------- Example 1 --------------

Get-VMHostRoute -VMHost $vmhost

Retrieves the routes for the specified host.

-------------- Example 2 --------------

Get-VMHostRoute -VMHost $vmhost1, $vmhost2 -Server $server1, $server2

Retrieves the routes for the specified hosts and servers.


Get-VMHostService - vSphere PowerCLI Cmdlets Reference

Get-VMHostService

Synopsis

This cmdlet retrieves information about a host service.

Syntax

Get-VMHostService [-VMHost] <VMHost[]> [-Refresh] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Set-VMHostService
Start-VMHostService
Stop-VMHostService
Restart-VMHostService

Detailed Description

This cmdlet retrieves information about a host service. If the Refresh parameter is set to $true, the cmdlet refreshes the host services information before retrieving it. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies hosts for which you want to retrieve the available services. | true | true (ByValue) |
Refresh | SwitchParameter | Indicates whether the cmdlet refreshes the service information before retrieving it. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more HostService objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHostService -Refresh

Refreshes and retrieves the host services on the default server.

-------------- Example 2 --------------

$vmhost = Get-VMHost -Name Host

$vmHostService = Get-VMHostService -VMHost $vmhost

Gets the services of the specified host.


Get-VMHostSnmp - vSphere PowerCLI Cmdlets Reference

Get-VMHostSnmp

Synopsis

This cmdlet retrieves hosts SNMP configuration.

Syntax

Get-VMHostSnmp [[-Server] <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Set-VMHostSNMP
Test-VMHostSNMP

Detailed Description

This cmdlet retrieves hosts SNMP configuration. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | true (ByValue) |

Return Type

Zero or more VmHostSnmp objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHostSNMP

Retrieves the host SNMP configuration. Operates on the default server which must be an ESX host.


Get-VMHostStartPolicy - vSphere PowerCLI Cmdlets Reference

Get-VMHostStartPolicy

Synopsis

This cmdlet retrieves the start policy of hosts.

Syntax

Get-VMHostStartPolicy [-VMHost] <VMHost[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Set-VMHostStartPolicy

Detailed Description

This cmdlet retrieves the start policy of the hosts specified by the VMHost parameter. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts whose start policy you want to retrieve. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VMHostStartPolicy objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHostStartPolicy -VMHost 10.23.113.212

Retrieves the start policy of the virtual machine host on IP address 10.23.113.212.


Get-VMHostStorage - vSphere PowerCLI Cmdlets Reference

Get-VMHostStorage

Synopsis

This cmdlet retrieves the host storages on a vCenter Server system.

Syntax

Get-VMHostStorage [-VMHost] <VMHost[]> [-Refresh] [-RescanAllHba] [-RescanVmfs] [-Server <VIServer[]>] [<CommonParameters>]
Get-VMHostStorage -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Set-VMHostStorage

Detailed Description

This cmdlet retrieves the host storages on a vCenter Server system. The cmdlet returns a list of the storages on the hosts specified by the VMHost parameter. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts for which you want to retrieve storage information. | true | true (ByValue) |
Id | String[] | Specifies the IDs of the host storages that you want to retrieve. | true | false |
Refresh | SwitchParameter | Indicates whether the cmdlet refreshes the storage system information before retrieving the specified host storages. | false | false |
RescanAllHba | SwitchParameter | Indicates whether to issue a request to rescan all virtual machine hosts bus adapters for new storage devices prior to retrieving the storage information. | false | false |
RescanVmfs | SwitchParameter | Indicates whether to perform a re-scan for new virtual machine file systems that might have been added, prior to retrieving the storage information. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VMHostStorageInfo objects

Notes

The ScsiLun property of the VMHostStorageInfo object is deprecated and sche duled for removal.

Examples

-------------- Example 1 --------------

Get-VmHostStorage -VMHost 10.23.112.234 -Refresh

Retrieves storage information from the virtual machine host with IP address 10.23.112.234.

-------------- Example 2 --------------

Get-VMHostStorage | select -expandproperty scsilun | fl *

Retrieves information about the vendor, model, and serial number of the virtual machine host storage SCSI adapter.

Note that for devices, that are not SCSI-3 compliant, the SerialNumber property is not defined. And not all SCSI-3 compliant devices provide the serial number information.


Get-VMHostSysLogServer - vSphere PowerCLI Cmdlets Reference

Get-VMHostSysLogServer

Synopsis

This cmdlet displays the remote syslog servers of the specified hosts.

Syntax

Get-VMHostSysLogServer [-VMHost] <VMHost[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Set-VMHostSysLogServer

Detailed Description

This cmdlet displays the remote syslog servers of the specified hosts. The returned object contains the server address and the port if configured.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the host whose remote syslog server you want to display. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more NamedIPEndPoint objects

Notes

Examples

-------------- Example 1 --------------

$sysLogServer = Get-VMHostSysLogServer  -VMHost 10.23.123.234

Retrieves the SysLog server of the virtual machine host with IP address 10.23.123.234.


Get-VMQuestion - vSphere PowerCLI Cmdlets Reference

Get-VMQuestion

Synopsis

This cmdlet retrieves the pending questions for the specified virtual machines.

Syntax

Get-VMQuestion [-VM <VirtualMachine[]>] [[-QuestionText] <String>] [-QuestionId <String>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Set-VMQuestion

Detailed Description

This cmdlet retrieves the pending questions for the specified virtual machines. A question is a task that requires a response from you. If the VM parameter is not specified or its value is $null, the cmdlet returns all questions for all virtual machines on the specified servers.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
QuestionText | String | Specifies a phrase from the text that describes the questions you want to retrieve. | false | false |
QuestionId | String | Specifies the IDs of the questions you want to retrieve. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VM | VirtualMachine[] | Specifies the virtual machines whose pending questions you want to retrieve. | false | true (ByValue) |

Return Type

Zero or more VmQuestion objects

Notes

Examples

-------------- Example 1 --------------

Get-VMQuestion -VM VM

Retrieves the questions of the VM virtual machine.

-------------- Example 2 --------------

$vm = Get-VM VM

$vm | Get-VMQuestion -QuestionText "*have been moved or copied*"

Retrieves the VM virtual machine questions that contain the phrase "have been moved or copied".


Get-VMResourceConfiguration - vSphere PowerCLI Cmdlets Reference

Get-VMResourceConfiguration

Synopsis

This cmdlet retrieves information about the resource allocation between the selected virtual machines.

Syntax

Get-VMResourceConfiguration [-Server <VIServer[]>] [-VM] <VirtualMachine[]> [<CommonParameters>]

Related Commands

Online version
Set-VMResourceConfiguration

Detailed Description

This cmdlet retrieves information about the resource allocation between the selected virtual machines.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines whose resource configuration you want to retrieve. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VMResourceConfiguration objects

Notes

Examples

-------------- Example 1 --------------

Get-VMResourceConfiguration -VM VM | Format-Custom -Property DiskResourceConfiguration

Displays the disk share for the VM virtual machine.


Get-VMStartPolicy - vSphere PowerCLI Cmdlets Reference

Get-VMStartPolicy

Synopsis

This cmdlet retrieves the start policy of the virtual machines on a vCenter Server system.

Syntax

Get-VMStartPolicy [-VMHost <VMHost[]>] [[-VM] <VirtualMachine[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Set-VMStartPolicy

Detailed Description

This cmdlet retrieves the start policy of the virtual machines on a vCenter Server system. The virtual machines are specified by the VM parameter or retrieved from the host passed through the VMHost parameter. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines whose start policy you want to retrieve. | false | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VMHost | VMHost[] | Specifies the hosts of the virtual machines whose start policy you want to retrieve. | false | true (ByValue) |

Return Type

Zero or more VMStartPolicy objects

Notes

Examples

-------------- Example 1 --------------

Get-VMStartPolicy -VM VM

Retrieves the start policy of the virtual machine named VM.


Import-CIVApp - vCloud Snapin Cmdlets Reference

Import-CIVApp

Synopsis

This cmdlet imports a virtual machine from the underlying vSphere to the cloud.

Syntax

Import-CIVApp [-VM] <VirtualMachine> [-ComputerName <String>] [-Description <String>] [-Name <String>] [-NoCopy] [-RunAsync] [-Server <CIServer[]>] -OrgVdc <OrgVdc> [-WhatIf] [-Confirm] [<CommonParameters>]
Import-CIVApp [-VM] <VirtualMachine> [-ComputerName <String>] [-NoCopy] [-RunAsync] [-Server <CIServer[]>] -VApp <CIVApp> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVApp
Get-CloudVAppTempate
Import-CloudVAppTempate

Detailed Description

This cmdlet imports a virtual machine from the underlying vSphere to the cloud as a vApp. You can import the virtual machine to an already existing vApp or create a new vApp and import the virtual machine into it. Note: This cmdlet is only available to Provider Administrators.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine | Specifies the virtual machine you want to import into the cloud. This parameter accepts VirtualMachine objects retrieved from a vCenter Server that has already been registered with vCloud Director. | true | true (ByValue) |
ComputerName | String | Specifies a computer name for the imported virtual machine. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Description | String | Specifies a description for the imported virtual machine. | false | false |
Name | String | Specifies the name of the new vApp that you want to create by importing the selected vSphere virtual machine. If you do not set a name, the newly created vApp inherits the name of the imported virtual machine. | false | false |
NoCopy | SwitchParameter | Use this parameter if you want to import the original vSphere virtual machine. Otherwise, a copy of the virtual machine is imported in vCloud Director. Importing the original vSphere virtual machine might cause its modification. | false | false |
OrgVdc | OrgVdc | Specifies the organization vDC to which you want to import the virtual machine. | true | true (ByValue) |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
VApp | CIVApp | Specifies the vApp into which you want to import the virtual machine. | true | true (ByValue) |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The CIVApp object that represents the imported vApp

Notes

Examples

-------------- Example 1 --------------

Get-OrgVdc 'MyOrganizationVdc' | Import-CIVApp -VM (Get-VM 'MyVMToImport')

Imports a virtual machine from vSphere into a new cloud virtual appliance.

Note: You must be connected to a vCenter Server and a vCloud Director server.

-------------- Example 2 --------------

(Get-VM 'MyVMToImport') | Import-CIVApp -OrgVdc 'MyOrganizationVdc' -Name 'MyNewVApp' -Description "My New VApp Description" -ComputerName "MyComputer"

Imports a virtual machine from vSphere into a new cloud virtual appliance (Vapp) while specifying the new VApp name, its description and the virtual machine computer name.

Note: You must be connected to a vCenter Server and a vCloud Director server.

-------------- Example 3 --------------

Import-CIVApp -VM (Get-VM 'MyVMToImport') -OrgVdc 'MyOrganizationVdc' -NoCopy

Imports a virtual machine from vSphere into a new cloud virtual appliance by moving it instead of copying it.

Note: You must be connected to a vCenter Server and a vCloud Director server.

-------------- Example 4 --------------

Import-CIVApp -VM (Get-VM 'MyVMToImport') -VApp 'MyVAppToExtend'

Imports a virtual machine from vSphere into an existing cloud virtual appliance.

Note: You must be connected to a vCenter Server and a vCloud Director server.

-------------- Example 5 --------------

Get-CIVApp "MyVAppToExtend" | Import-CIVApp (Get-VM 'MyVMToImport') -NoCopy

Imports a VM from vSphere into an existing cloud VApp by moving it instead of copying it.

Note: You must be connected to a vCenter Server and a vCloud Director server.


Import-CIVAppTemplate - vCloud Snapin Cmdlets Reference

Import-CIVAppTemplate

Synopsis

This cmdlet imports a virtual machine or an OVF package from vCenter Server to vCloud Director as a vApp template.

Syntax

Import-CIVAppTemplate [-VM] <VirtualMachine> [-Catalog <Catalog>] [-ComputerName <String>] [-Description <String>] [-Name <String>] -OrgVdc <OrgVdc> [-NoCopy] [-GoldMaster] [-RunAsync] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Import-CIVAppTemplate [-Catalog <Catalog>] [-Name <String>] -SourcePath <String> -OrgVdc <OrgVdc> [-RunAsync] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Import-CIVAppTemplate [-SourcePath <String>] -VAppTemplate <CIVAppTemplate> -ResumeUpload [-RunAsync] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVApp
Get-CIVAppTempate
Import-CIVApp

Detailed Description

This cmdlet imports a virtual machine or an OVF package from vCenter Server to vCloud Director as a vApp template.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine | Specifies the virtual machine you want to import into vCloud Director. This parameter accepts VirtualMachine objects retrieved from a vCenter Server that has already been registered with vCloud Director. Note: This parameter is only available to Provider Administrators. | true | true (ByValue) |
Catalog | Catalog | Specifies the catalog where the imported template will be placed. | false | false |
ComputerName | String | Specifies a computer name for the imported object. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Description | String | Specifies a description for the imported object. | false | false |
GoldMaster | SwitchParameter | Indicates that the virtual machine is imported as a GoldMaster vApp template. | false | false |
Name | String | Specifies a new name for the new OVF or vApp template. If not specified, the new object takes the name of the vSphere virtual machine. | false | false |
NoCopy | SwitchParameter | Indicates that you want to import the original vSphere object. Otherwise, a copy of the object is imported in the vCloud. Importing the original vSphere object might cause its modification. | false | false |
OrgVdc | OrgVdc | Specifies the organization vDC to which you want to add the new object. | true | false |
ResumeUpload | SwitchParameter | Indicates that you want to resume a previously interrupted OVF upload. | true | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
SourcePath | String | Specifies a source path to the OVF file containing the vApp template. | true | false |
VAppTemplate | CIVAppTemplate | Specifies vApp templates that have been previously created but the upload has been interrupted. Use with the ResumeUpload parameter to resume and finalize the import process. | true | true (ByValue) |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The imported CIVAppTemplate objects

Notes

Examples

-------------- Example 1 --------------

$myCatalog = Get-Catalog MyCatalog
$myOrgvdc = Get-OrgVdc MyOrgVdc
Import-CIVAppTemplate -SourcePath C:\ovfs\WindowsXP\WindowsXP.ovf -Name MyWindowsXPVAppTemplate -OrgVdc $myOrgvdc -Catalog $myCatalog

Imports an OVF formatted virtual machine as a catalog item while specifying VAppTemplate name, catalog and organization virtual datacenter.

-------------- Example 2 --------------

$myorganizationvdc = Get-OrgVdc MyOrgVdc
Import-CIVAppTemplate -SourcePath C:\ovfs\WindowsXP\WindowsXP.ovf -OrgVdc $myOrgvdc

Imports an OVF formatted virtual machine while specifying only the organization virtual datacenter to be placed in.

-------------- Example 3 --------------

Get-CIVAppTemplate MyWindowsXPVAppTemplate | Import-CIVAppTemplate -ResumeUpload -SourcePath C:\ovfs\WindowsXP\WindowsXP.ovf

Resumes upload in case of a network failure. First obtains the not fully uploaded VAppTemplate, then starts the resume process.

-------------- Example 4 --------------

$myCatalog = Get-Catalog MyCatalog
$myOrgvdc = Get-OrgVdc MyOrgVdc
$myVM = Get-VM -Name 'MyWindowsXP'
Import-CIVAppTemplate -VM $myVM -Name MyWindowsXPVAppTemplate -OrgVdc $myOrgvdc -Catalog $myCatalog

Imports a vSphere virtual machine as a vCloud Director VAppTemplate.

Note: You must be connected to a vCenter Server and a vCloud Director server.

-------------- Example 5 --------------

$myOrgvdc = Get-OrgVdc MyOrgVdc
$myCatalog = Get-Catalog MyCatalog
$myVM = Get-VM -Name 'MyWindowsXP'
Import-CIVAppTemplate -VM $myVM -Name MyWindowsXPVAppTemplate -OrgVdc $myOrgvdc -Catalog $myCatalog -NoCopy

Imports a vSphere virtual machine as a vCloud Director VAppTemplate. The virtual machine is moved by using the -NoCopy switch.

Note: You must be connected to a vCenter Server and a vCloud Director server.


Import-VApp - vSphere PowerCLI Cmdlets Reference

Import-VApp

Synopsis

This cmdlet imports OVF (Open Virtualization Format) and OVA packages. The package can contain a virtual appliance or a virtual machine.

Syntax

Import-VApp [-Source] <String> [[-Name] <String>] [-Location <VIContainer>] [-VMHost] <VMHost> [-Datastore <StorageResource>] [-Force] [-DiskStorageFormat <VirtualDiskStorageFormat>] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Export-VApp
Get-VApp
New-VApp
Remove-VApp
Set-VApp
Start-VApp
Stop-VApp
Move-VApp

Detailed Description

This cmdlet imports OVF (Open Virtualization Format) and OVA packages. The package can contain a vApp or a virtual machine. The cmdlet returns a VApp object when the OVF contains a vApp and a VirtualMachine object when the OVF contains a single virtual machine.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Source | String | Specifies the path to the OVF or OVA package that you want to import. | true | false |
Name | String | Specifies a name for the imported vApp or virtual machine. | false | false |
VMHost | VMHost | Specifies a host where you want to run the vApp or virtual machine. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Datastore | StorageResource | Specifies a datastore or a datastore cluster where you want to store the vApp or virtual machine. | false | false |
DiskStorageFormat | VirtualDiskStorageFormat | Specifies the storage format for the disks of the imported VMs. By default, the storage format is thick. When you set this parameter, you set the storage format for all virtual machine disks in the OVF package. This parameter accepts Thin, Thick, and EagerZeroedThick values. | false | false |
Force | SwitchParameter | Indicates that you want to import an OVF or OVA package even if the package signature cannot be verified. | false | false |
Location | VIContainer | Specifies a vSphere inventory container where you want to import the vApp or virtual machine. It must be a vApp, a resource pool, or a cluster. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created VApp or VirtualMachine object

Notes

Examples

-------------- Example 1 --------------

$vmHost = Get-VMHost -Name "MyVMHost1"
Import-vApp -Source "c:\vApps\WebServer\WebServer.ovf" -VMHost $vmHost

Imports an OVF package by specifying the target host and name.

-------------- Example 2 --------------

$myCluster = Get-Cluster -Name "MyCluster1"
$vmHost = Get-VMHost -Name "MyVMHost1"
Import-vApp -Source "c:\vApps\WebServer\WebServer.ovf" -VMHost $vmHost -Location $myCluster -Name "MyWebServerProduction1"

Imports an OVF package within a cluster.

-------------- Example 3 --------------

$vmHost = Get-VMHost -Name "MyVMHost1"
$myDatastore = Get-Datastore -Name "MyDatastore1"
$vmHost | Import-vApp -Source "c:\vApps\WebServer\WebServer.ovf" -Datastore $myDatastore

Imports an OVF package by specifying a datastore where to store the virtual machines.

-------------- Example 4 --------------

$myDatastore = Get-Datastore -Name "MyDatastore1"
$vmHost = Get-VMHost -Name "MyVMHost1"
$vmHost | Import-vApp -Source "c:\vApps\WebServer\WebServer.ova" -Datastore $myDatastore -Force

Imports an OVA package even if the package signature cannot be verified.


Import-VMHostProfile - vSphere PowerCLI Cmdlets Reference

Import-VMHostProfile

Synopsis

This cmdlet imports a host profile from a file. The file path must be accessible from the vSphere PowerCLI client side.

Syntax

Import-VMHostProfile [-FilePath] <String> [-Name] <String> [[-ReferenceHost] <VMHost>] [-Description <String>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Apply-VMHostProfile
Export-VMHostProfile
Get-VMHostProfile
New-VMHostProfile
Remove-VMHostProfile
Set-VMHostProfile
Test-VMHostProfileCompliance

Detailed Description

This cmdlet imports a host profile from a file. The file path must be accessible from the vSphere PowerCLI client side.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
FilePath | String | Specifies the path to the file, from which you want to import a host profile. | true | false |
Name | String | Specifies a name of the imported host profile. | true | false |
ReferenceHost | VMHost | Specifies a reference host for the imported host profile. | false | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Description | String | Specifies a description for the imported host profile. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | true (ByValue) |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The imported VMHostProfile object

Notes

Examples

-------------- Example 1 --------------

Import-VMHostProfile -FilePath export.prf -Name Profile

Imports a virtual machine host profile from the export.prf file and names it Profile.


Install-VMHostPatch - vSphere PowerCLI Cmdlets Reference

Install-VMHostPatch

Synopsis

This cmdlet updates the specified hosts.

Syntax

Install-VMHostPatch [-VMHost] <VMHost[]> -HostPath <String[]> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]
Install-VMHostPatch [-VMHost] <VMHost[]> -WebPath <String[]> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]
Install-VMHostPatch [-VMHost] <VMHost[]> -LocalPath <String[]> [-HostUsername <String>] [-HostPassword <SecureString>] [-HostCredential <PSCredential>] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostPatch

Detailed Description

This cmdlet updates the specified hosts. The cmdlet installs patches on the host. The patches that can be located locally, on a web location, or in a host file system.
When using the LocalPath or WebPath parameters, the ESX/ESXi host attempts to store the patch contents in its local temporary directory. Because ESXi hosts might not have enough free space on their local drives, this cannot apply to large size patches. The best practice for upgrading an ESXi host is to upload the patch contents on the host's datastore and to run Install-VMHostPatch with the HostPath parameter.
Depending on the component to be upgraded, you might have to set the host into a maintenance mode and to restart the host or the hostd management service after applying the patch.
This cmdlet is experimental and might be changed or removed in a future release.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts you want to update. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
HostCredential | PSCredential | Specifies a PSCredential object that contains credentials for authenticating with the host. | false | false |
HostPassword | SecureString | Specifies the password you want to use to authenticate with the host. | false | false |
HostPath | String[] | Specifies a file path on the ESX/ESXi host to the patches you want to install. | true | false |
HostUsername | String | Specifies the username you want to use to authenticate with the host. | false | false |
LocalPath | String[] | Specifies the local file system path to the patches you want to install. | true | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WebPath | String[] | Specifies the web location of the patches you want to install. | true | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

One or more VMHostPatchResult objects

Notes

The cmdlet works only on ESX 4.0 and later.

Examples

-------------- Example 1 --------------

Install-VMHostPatch -VMHost $vmhost1,$vmhost2 -LocalPath c:\esx40\patches\ESX400-200906001\metadata.zip -HostUsername admin -HostPassword pass

Updates ESX servers using a local file. Before running the cmdlet, you must download the patch file locally and extract to a folder. The name of the folder must contain the patch ID (for example, "ESX400-200906001"). Providing credentials when installing a patch from a local path is mandatory.

-------------- Example 2 --------------

$vmhost | Install-VMHostPatch -WebPath http://myInternalWebServer/esx40/ESX400-200906001/metadata.zip

Upgrades an ESX server using a Web location. Before running the cmdlet, you must download the patch file and extract to a folder that is published on a Web server. The patch URL address must contain the patch ID (for example, http://myInternalWebServer/esx40/ESX400-200906001/).

-------------- Example 3 --------------

$datastore = Get-Datastore -Name Datastore

Copy-DatastoreItem c:\temp\ESX400-200906001\

$datastore.DatastoreBrowserPath -Recurse

$vmhost1,$vmhost2 | Install-VMHostPatch -HostPath
/vmfs/volumes/datastore/ESX400-200906001/metadata.zip

Upgrades ESX servers using the -HostPath parameter. First, you must download the patch file and extract its contents to a temporary folder that is named after the patch ID (for example, c:\temp\ESX400-200906001\). Copy the folder in the root folder of the Datastore datastore and run Install-VMHostPatch providing the datastore path to the patch. Note that the datastore path is case-sensitive.


Invoke-VMScript - vSphere PowerCLI Cmdlets Reference

Invoke-VMScript

Synopsis

This cmdlet runs a script in the guest OS of each of the specified virtual machines.

Syntax

Invoke-VMScript [-ScriptText] <String> [-VM] <VirtualMachine[]> [-HostCredential <PSCredential>] [-HostUser <String>] [-HostPassword <SecureString>] [-GuestCredential <PSCredential>] [-GuestUser <String>] [-GuestPassword <SecureString>] [-ToolsWaitSecs <Int32>] [-ScriptType <ScriptType>] [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet runs a script in the guest OS of each of the specified virtual machines. To run Invoke-VMScript, the user must have read access to the folder containing the virtual machine and a Virtual Machine.Interaction.Console Interaction privilege. The virtual machines must be powered on and have VMware Tools installed. Network connectivity to the ESX system hosting the virtual machine on port 902 must be present. To authenticate with the host or the guest OS, one of the HostUser/HostPassword (GuestUser/GuestPassword) pair and HostCredential (GuestCredential) parameters must be provided. The guest account you use to authenticate with the guest operating system must have administrator's privileges. This cmdlet supports only Windows XP 32bit SP3, Windows Server 2003 32bit SP2, Windows Server 2003 64bit SP2, Windows 7 64bit, Windows Server 2008 R2 64bit and Redhat Enterprise 5 operating systems.

To run this cmdlet against vCenter Server/ESX/ESXi versions earlier than 5.0, you need to meet the following requirements:
*You must run the cmdlet on the 32-bit version of Windows PowerShell.
*You must have access to the ESX that hosts the virtual machine over TCP port 902.
*For vCenter Server/ESX/ESXi versions earlier than 4.1, you need VirtualMachine.Interact.ConsoleInteract privilege. For vCenter Server/ESX/ESXi 4.1 and later, you need VirtualMachine.Interact.GuestControl privilege.

To run this cmdlet against vCenter Server/ESXi 5.0 and later, you need VirtualMachine.GuestOperations.Modify and VirtualMachine.GuestOperations.Execute privileges.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
ScriptText | String | Provides the text of the script you want to run. You can also pass to this parameter a string variable containing the path to the script. | true | false |
VM | VirtualMachine[] | Specifies the virtual machines on whose guest operating systems you want to run the script. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
GuestCredential | PSCredential | Specifies a PSCredential object containing the credentials you want to use for authenticating with the virtual machine guest OS. | false | false |
GuestPassword | SecureString | Specifies the password you want to use for authenticating with the virtual machine guest OS. | false | false |
GuestUser | String | Specifies the user name you want to use for authenticating with the virtual machine guest OS. | false | false |
HostCredential | PSCredential | Specifies a PSCredential object containing the credentials you want to use for authenticating with the host. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
HostPassword | SecureString | Specifies the password you want to use for authenticating with the host. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
HostUser | String | Specifies the user name you want to use for authenticating with the host. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
ScriptType | ScriptType | Specifies the type of the script. The valid values are PowerShell, Bat, and Bash. If the virtual machine OS is Windows, the default value is PowerShell. If the virtual machine OS is Linux, the default value is Bash. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
ToolsWaitSecs | Int32 | Specifies how long in seconds the system waits for connecting to the VMware Tools. The default value is 20. | false | false | 20
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

One or more VMScriptResult objectsVMScriptResult

Notes

To make PowerShell scripts work, you must restart the virtual machine after the PowerShell installation. For BIN and BASH scripts, restart is not need ed.

Examples

-------------- Example 1 --------------

Invoke-VMScript -VM VM -ScriptText "dir" -GuestUser administrator -GuestPassword pass2

Lists the directory entries on the guest OS.

-------------- Example 2 --------------

$script = '&"$env:ProgramFiles\Common Files\Microsoft Shared\MSInfo\msinfo32.exe" /report "$env:Tmp\inforeport"'

Invoke-VMScript -ScriptText $script -VM VM -GuestCredential $guestCredential

Runs a PowerShell script. In PowerShell, to access environment variables, you must use the following syntax: $env:<environment variable> (for example, $env:ProgramFiles). Also, to run the program, you must specify an ampersand (&) in front of the program path.
The outer quotes ($script = '...') are required because this is how you define a string variable in PowerShell. The inner double quotes are required because there are spaces in the path.

-------------- Example 3 --------------

$script = '"%programfiles%\Common Files\Microsoft Shared\MSInfo\msinfo32.exe" /report "%tmp%\inforeport"'

Invoke-VMScript -ScriptText $script -VM VM -GuestCredential $guestCredential -ScriptType Bat

Runs a BAT script. In BAT scripts, to access environment variables, you must use the following syntax: %<environment variable>% (for example, %programfiles%).

The outer quotes ($script = '...') are required because this is how you define a string variable in PowerShell. The inner double quotes are required because there are spaces in the path.


Mount-Tools - vSphere PowerCLI Cmdlets Reference

Mount-Tools

Synopsis

This cmdlet mounts the VMware Tools CD installer as a CD-ROM on the guest operating system.

Syntax

Mount-Tools [[-Guest] <VMGuest[]>] [<CommonParameters>]
Mount-Tools [[-VM] <VirtualMachine[]>] [[-Server] <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Dismount-Tools
Update-Tools

Detailed Description

This cmdlet mounts the VMware Tools CD installer as a CD-ROM on the guest operating system that is specified by the Guest or VM parameters. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Guest | VMGuest[] | Specifies the guest operating systems on which you want to mount VMware Tools. | false | true (ByValue) |
VM | VirtualMachine[] | Specifies the virtual machines on which you want to mount VMware Tools. | false | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Mount-Tools VM

Mounts the VMware Tools on the specified virtual machine. The virtual machine must be powered on.

-------------- Example 2 --------------

Get-VMGuest VM | Mount-Tools

Mounts the VMware Tools on the virtual machine specified by its guest operating system. The virtual machine must be powered on.


Move-Cluster - vSphere PowerCLI Cmdlets Reference

Move-Cluster

Synopsis

This cmdlet moves a vCenter Server cluster from one location to another.

Syntax

Move-Cluster [-Cluster] <Cluster[]> [-Destination] <VIContainer> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Cluster
New-Cluster
Set-Cluster

Detailed Description

This cmdlet moves a vCenter Server cluster to the location that is specified by the Destination parameter. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Cluster | Cluster[] | Specifies the clusters you want to move to another location. | true | true (ByValue) |
Destination | VIContainer | Specifies the folder or datacenter where you want to move the clusters. If a datacenter is specified for the Destination parameter, the cluster is moved to its "hostFolder" folder. The "hostFolder" is a system folder and is guaranteed to exist. Note: You cannot move clusters from one datacenter to another. You can only move clusters between folders and to datacenter level. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more relocated Cluster objects

Notes

Examples

-------------- Example 1 --------------

Move-Cluster -Cluster Cluster -Destination Folder

Moves the cluster named Cluster into the folder called Folder on the same datacenter


Move-Datacenter - vSphere PowerCLI Cmdlets Reference

Move-Datacenter

Synopsis

This cmdlet moves a vCenter Server datacenter from one location to another.

Syntax

Move-Datacenter [-Datacenter] <Datacenter[]> [-Destination] <VIContainer> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
New-Datacenter
Get-Datacenter
Remove-Datacenter
Set-Datacenter

Detailed Description

This cmdlet moves a vCenter Server datacenter to the location that is specified by the Destination parameter. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Datacenter | Datacenter[] | Specifies the datacenters you want to move to another location. | true | true (ByValue) |
Destination | VIContainer | Specifies the folder where you want to move the datacenters. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more relocated Datacenter objects

Notes

Examples

-------------- Example 1 --------------

Move-Datacenter Datacenter -Destination Folder

Moves the Datacenter datacenter into the folder named Folder.


Move-Datastore - vSphere PowerCLI Cmdlets Reference

Move-Datastore

Synopsis

This cmdlet moves datastores from one location to another.

Syntax

Move-Datastore [-Datastore] <Datastore[]> [-Destination] <VIObject> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
New-Datastore
Get-Datastore
Remove-Datastore
Set-Datastore

Detailed Description

This cmdlet moves datastores from one location to another.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Datastore | Datastore[] | Specifies the datastore that you want to move. | true | true (ByValue) |
Destination | VIObject | Specifies a datastore cluster, folder, or datacenter where you want to place the datastore. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more relocated Datastore objects

Notes

Examples

-------------- Example 1 --------------

Move-Datastore "MyDatastore" -Destination "MyDatastoreFolder"

Moves the MyDatastore datastore to the specified folder.

-------------- Example 2 --------------

$myDatastoreCluster = Get-DatastoreCluster -Name "MyDatatoreCluster"
Get-Datastore "MyDatastore1", "MyDatastore2" | Move-Datstore -Destination $myDatastoreCluster

Moves two datastores to a specified datastore cluster.


Move-Folder - vSphere PowerCLI Cmdlets Reference

Move-Folder

Synopsis

This cmdlet moves a vCenter Server folder from one location to another.

Syntax

Move-Folder [-Folder] <Folder[]> [-Destination] <VIContainer> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Folder
New-Folder
Remove-Folder
Set-Folder

Detailed Description

This cmdlet moves a vCenter Server folder to the location that is specified by the Destination parameter. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Folder | Folder[] | Specifies the folders you want to move to another location. | true | true (ByValue) |
Destination | VIContainer | Specifies the datacenter or folder where you want to move the folders. If a datacenter is specified for the Destination parameter, the folder is moved to the datacenter's hostFolder or vmFolder folder, depending on the folder's child item type. The hostFolder and vmFolder are system folders and are guaranteed to exist. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more relocated Folder objects

Notes

Examples

-------------- Example 1 --------------

Get-Folder -Name "vmFolder" | Move-Folder -Destination "destinationVmFolder"

Moves the "vmFolder" folder into another folder of the same type named "destinationVmFolder".


Move-HardDisk - vSphere PowerCLI Cmdlets Reference

Move-HardDisk

Synopsis

This cmdlet moves a hard disk from one location to another.

Syntax

Move-HardDisk [-HardDisk] <HardDisk[]> [-Datastore] <Datastore> [-StorageFormat <VirtualDiskStorageFormat>] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-HardDisk
New-HardDisk
Remove-HardDisk
Set-HardDisk

Detailed Description

This cmdlet moves a hard disk from one location to another.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
HardDisk | HardDisk[] | Specifies the hard disk that you want to move to another location. | true | true (ByValue) |
Datastore | Datastore | Specifies a datastore where you want to place the hard disk. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
StorageFormat | VirtualDiskStorageFormat | Specifies the storage format of the relocated hard disk. This parameter accepts Thin, Thick, and EagerZeroedThick values. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more relocated HardDisk objects

Notes

Examples

-------------- Example 1 --------------

$myDatastore1 = Get-Datastore -Name 'MyDatastore1'
$myDisk = Get-VM -Name MyVm1 | Get-HardDisk
Move-HardDisk -HardDisk $myDisk -Datastore $myDatastore1

Moves the hard disk of a specified virtual machine to another datastore.

-------------- Example 2 --------------

$myDisk = Get-VM -Name 'MyVM1' | Get-HardDisk
$myDatastore1 = Get-Datastore -Name 'MyDatastore1'
Move-hardDisk - HardDisk $myDisk -Datastore $myDatastore1 - StorageFormat 'EagerZeroedThick'

Moves the hard disk of a specified virtual machine to another datastore and changes the storage format of the hard disk to EagerZeroedThick.


Move-Inventory - vSphere PowerCLI Cmdlets Reference

Move-Inventory

Synopsis

This cmdlet moves a vCenter Server inventory item from one location to another.

Syntax

Move-Inventory [-Item] <InventoryItem[]> [-Destination] <VIContainer> [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Inventory
Remove-Inventory

Detailed Description

This cmdlet moves a vCenter Server inventory object or template to the location that is specified by the Destination parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Item | InventoryItem[] | Specifies the Folder, ResourcePool, Datacenter, VirtualMachine, VMHost, Template, or Cluster objects you want to move to another location. | true | true (ByValue) |
Destination | VIContainer | Specifies the location where you want to move the inventory items. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more relocated VIObject objects

Notes

Examples

-------------- Example 1 --------------

$vm = Get-VM -Name VM*

Move-Inventory -Item $vm -Destination Folder

Moves the virtual machines whose names start with VM to the Folder folder.

-------------- Example 2 --------------

Get-Folder Folder1 | Get-Inventory -NoRecursion | Move-Inventory -Destination Folder2

Moves all objects from the Folder1 folder to the Folder2 folder.


Move-ResourcePool - vSphere PowerCLI Cmdlets Reference

Move-ResourcePool

Synopsis

This cmdlet moves a resource pool from one location to another.

Syntax

Move-ResourcePool [-ResourcePool] <ResourcePool[]> [-Destination] <VIContainer> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-ResourcePool
New-ResourcePool
Remove-ResourcePool
Set-ResourcePool

Detailed Description

This cmdlet moves a resource pool to the location that is specified by the Destination parameter. To specify a server different from the default one, use the Server parameter. Moving a resource pool is only supported when the objects assigned to the ResourcePool and Destination parameters are passed through connections to one and the same server with the same credentials.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
ResourcePool | ResourcePool[] | Specifies the resource pools you want to move to another location. | true | true (ByValue) |
Destination | VIContainer | Specifies the location where you want to move the resource pools. If a host or a cluster is specified for the Destination parameter, the resource pool is moved into a resource pool named Resources. The Resources resource pool is a system resource pool and is guaranteed to exist. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more relocated ResourcePool objects

Notes

Examples

-------------- Example 1 --------------

Move-ResourcePool -ResourcePool ResourcePool -Destination Host

Moves the resource pool named ResourcePool to the virtual machine host Host.


Move-Template - vSphere PowerCLI Cmdlets Reference

Move-Template

Synopsis

This cmdlet moves virtual machine templates to another location.

Syntax

Move-Template [-Template] <Template[]> [-Destination] <VIContainer> [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Template
New-Template
Remove-Template

Detailed Description

This cmdlet moves virtual machine templates to a location that is specified by the Destination parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Destination | VIContainer | Specifies a container object where you want to move the templates. | true | true (ByValue) |
Template | Template[] | Specifies the virtual machine templates you want to move to another location. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more relocated Template objects

Notes

Examples

-------------- Example 1 --------------

Move-Template -Template $template -Destination $dest

Moves the $template object into the $dest container object.


Move-VApp - vSphere PowerCLI Cmdlets Reference

Move-VApp

Synopsis

This cmdlet moves the specified virtual appliances to a new location.

Syntax

Move-VApp [-Destination] <VIContainer> [-VApp] <VApp[]> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VApp
New-VApp
Export-VApp
Import-VApp
Set-VApp
Start-VApp
Stop-VApp
Remove-VApp

Detailed Description

This cmdlet moves the specified vApps to a new location. If the destination is a host or a cluster, the vApps are moved to the system "Resources" resource pool.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VApp | VApp[] | Specifies the vApps you want to move. | true | true (ByValue) |
Destination | VIContainer | Specifies where you want to move the specified vApps. Supported types are Folder, VMHost, Cluster, ResourcePool, VApp, and Datacenter. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more relocated VApp objects

Notes

Examples

-------------- Example 1 --------------

$vmHost = Get-VMHost -Name "MyVMHost1"
$myDestinationRP = New-ResourcePool -Name "vApp ResourcePool" -Location $vmHost
Move-VApp -VApp (Get-Vapp -Name "MyVApp1" -Location $vmHost) -Destination $myDestinationRP

Moves a vApp from a host to a resource pool from the same host.

-------------- Example 2 --------------

$vmHost = Get-VMHost -Name "MyVMHost1"
$myDestinationVApp = New-VApp -Name "MyvApp1" -Location $vmHost
(Get-Vapp -Name "MyvApp2" -Location (Get-ResourcePool -Name "MyResourcePool1") | Move-VApp -Destination $myDestinationVApp

Moves a vApp from a resource pool to another vApp.

-------------- Example 3 --------------

Move-VApp -Name "MyvApp1" (Get-VMHost -Name "MyVMHost1")

Moves a vApp from a resource pool to a host.

-------------- Example 4 --------------

$myVmFolder1 = Get-Folder -Name "MyVMFolder1" -Location (Get-Datacenter -Name "MyDatacenter1") -NoRecursion
$myVMFolder2 = New-Folder -Name "MyVMFolder2" -Location $myVmFolder1
Get-VApp -Name "MyVApp" | Move-VApp -Destination $myVMFolder2 -RunAsync

Moves a virtual appliance to a folder asynchronously.


Move-VM - vSphere PowerCLI Cmdlets Reference

Move-VM

Synopsis

This cmdlet moves virtual machines to another location.

Syntax

Move-VM [-AdvancedOption <AdvancedOption[]>] [[-Destination] <VIContainer>] [-Datastore <StorageResource>] [-DiskStorageFormat <VirtualDiskStorageFormat>] [-RunAsync] [-VM] <VirtualMachine[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VM
Remove-VM
New-VM
Set-VM
Start-VM
Stop-VM
Suspend-VM
Restart-VM

Detailed Description

This cmdlet moves a virtual machine to the location that is specified by the Destination or the Datastore parameters. The destination must be a folder, host, cluster, or a resource pool. Moving a virtual machine in a cluster is only possible if the virtual machine is in a resource pool in that cluster. If the virtual machine is outside the cluster, you need to specify a virtual machine host in that cluster as destination. When moving virtual machines that are powered on, VMotion is used. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines you want to move to another location. | true | true (ByValue) |
Destination | VIContainer | Specifies a folder, host, cluster, or a resource pool where you want to move the virtual machines. If a datacenter is specified for the Destination parameter, the virtual machines are moved to the datacenter's "vmFolder" folder. The "vmFolder" is a system folder and is guaranteed to exist. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. | false | true (ByValue) |
AdvancedOption | AdvancedOption[] | This parameter is only applicable when a DatastoreCluster object is passed to the Datastore parameter. Specifies one or more rules for the placement of the virtual machines that you want to relocate. To indicate that VMs should be stored on different datastores, pass an SdrsVMAntiAffinityRule object to the parameter. You can set more than one Storage DRS (SDRS) VM anti-affinity rules. To indicate that the VM disks should be stored on different datastores, pass an SdrsVMDiskAntiAffinityRule object to the parameter. You can set only one SDRS VM disk anti-affinity rule. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Datastore | StorageResource | Specifies the datastore or datastore cluster where you want to move the virtual machines. When you pass a datastore cluster to the Datastore parameter, you can also set the AdvancedOption parameter. | false | false |
DiskStorageFormat | VirtualDiskStorageFormat | Specifies a new storage format for the hard disk of the virtual machine you want to move. This parameter is applicable only when moving a virtual machine to a different datastore, using the Datastore parameter. This parameter accepts Thin, Thick, and EagerZeroedThick values. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more relocated VirtualMachine objects

Notes

Examples

-------------- Example 1 --------------

Get-VM -Name VM | Move-VM -Destination 10.23.112.235

Moves the virtual machine named VM from its current location to the host on IP address 10.23.112.235.

-------------- Example 2 --------------

Move-VM -VM VM -Destination Folder

Moves the virtual machine to a folder called Folder. Note that you are able to move virtual machines only to folders containing virtual machines (the 'blue' folders in the vSphere Client).

-------------- Example 3 --------------

Move-VM -VM VM -Destination ResourcePool

Moves the virtual machine to the ResourcePool resourcepool. The ESX host does not change.

-------------- Example 4 --------------

$myDatastoreCluster1 = Get-DatastoreCluster -Name 'MyDatastoreCluster1'
Move-VM -VM 'MyVM1' -Datastore $myDatastoreCluster1

Moves the MyVM1 virtual machine to any datastore in the specified datastore cluster.

-------------- Example 5 --------------

$myDatastoreCluster1 = Get-DatastoreCluster -Name 'MyDatastoreCluster1'
$myVm2 = Get-VM -Name 'MyVM2'
$vmAntiAffinityRule = New-Object -TypeName VMware.VimAutomation.ViCore.Types.V1.DatastoreManagement.SdrsVMAntiAffinityRule -ArgumentList $myVm2
Move-VM -VM 'MyVM1' -Datastore $myDatastoreCluster1 -AdvancedOption $vmAntiAffinityRule

Moves the MyVM1 virtual machine to the specified datastore cluster and sets a VM anti-affinity rule for the placement of the virtual machine. The MyVM1 virtual machine will be placed on any datastore in the specified datastore cluster that does not contain the MyVM2 virtual machine.

-------------- Example 6 --------------

$myVm1 = Get-VM -Name 'MyVM1'
$vmdks = Get-Harddisk -VM $myVm1
$myDatastoreCluster1 = Get-DatastoreCluster -Name 'MyDatastoreCluster1'
$vmdkAntiAffinityRule = New-Object -TypeName VMware.VimAutomation.ViCore.Types.V1.DatastoreManagement.SdrsVMDiskAntiAffinityRule -ArgumentList $vmdks
Move-VM -VM '$myVm1' -Datastore $myDatastoreCluster1 -AdvancedOption $vmdkAntiAffinityRule

Moves the MyVM1 virtual machine to the specified datastore cluster and sets a VM disk anti-affinity rule for the placement of the virtual machine. The disks of the MyVM1 virtual machine will be stored on different datastores in the specified datastore cluster.


Move-VMHost - vSphere PowerCLI Cmdlets Reference

Move-VMHost

Synopsis

This cmdlet moves hosts to another location.

Syntax

Move-VMHost [-VMHost] <VMHost[]> [-Destination] <VIContainer> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Add-VMHost
Get-VMHost
Remove-VMHost
Restart-VMHost
Set-VMHost
Start-VMHost
Stop-VMHost
Suspend-VMHost

Detailed Description

This cmdlet moves hosts to the location that is specified by the Destination parameter. To specify a server different from the default one, use the Server parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts you want to move to another location. | true | true (ByValue) |
Destination | VIContainer | Specifies the location where you want to move the hosts. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more relocated VMHost objects

Notes

Examples

-------------- Example 1 --------------

Move-VMHost 192.168.112.113 -Destination Datacenter

Moves the host with IP address 10.23.112.113 to a different datacenter named Datacenter.


New-AdvancedSetting - vSphere PowerCLI Cmdlets Reference

New-AdvancedSetting

Synopsis

This cmdlet creates a new advanced setting for the specified entity.

Syntax

New-AdvancedSetting [-Name] <String> [-Value] <Object> [-Entity] <VIObject[]> [-Type <AdvancedSettingType>] [-Force] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-AdvancedSetting
Remove-AdvancedSetting
Set-AdvancedSetting

Detailed Description

This cmdlet creates a new advanced setting for the specified entity.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies a name for the advanced setting. | true | false |
Value | Object | Specifies a value for the advanced setting. | true | false |
Entity | VIObject[] | Specifies the entity for which you want to create a new advanced setting. This parameter accepts VIServer, VirtualMachine, VMHost, DatastoreCluster, and Cluster objects. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Force | SwitchParameter | Indicates that you want to create the new advanced setting even if another setting with the same name exists for the specified object type. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Type | AdvancedSettingType | Specifies the type of the new advanced setting. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The one or more newly created AdvancedSetting objects

Notes

Examples

-------------- Example 1 --------------

New-AdvancedSetting -Entity (Get-Cluster -Name Cluster) -Name SettingName -Value SettingValue -Type ClusterHA

Creates a new advanced setting for the Cluster cluster - of type CLusterHA, with name SettingName and value SettingValue.


New-AlarmAction - vSphere PowerCLI Cmdlets Reference

New-AlarmAction

Synopsis

This cmdlet creates an alarm action and attaches it to the specified alarm.

Syntax

New-AlarmAction [-AlarmDefinition] <AlarmDefinition> -Snmp [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-AlarmAction [-AlarmDefinition] <AlarmDefinition> -Email [-Subject <String>] -To <String[]> [-Cc <String[]>] [-Body <String>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-AlarmAction [-AlarmDefinition] <AlarmDefinition> -Script -ScriptPath <String> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-AlarmAction
Get-AlarmActionTrigger
Get-AlarmDefinition
New-AlarmActionTrigger
Remove-AlarmAction
Remove-AlarmActionTrigger
Set-AlarmDefinition

Detailed Description

This cmdlet creates an alarm action and attaches it to the specified alarm.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
AlarmDefinition | AlarmDefinition | Specifies the alarm definition for which you want to configure actions. | true | true (ByValue) |
Body | String | Specifies the text of the email message. | false | false |
Cc | String[] | Specifies the email addresses you want to add to the CC field of the email message. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Email | SwitchParameter | Indicates that when the alarm is activated, the system sends an email message to the specified address. Use the Subject, To, CC, and Body parameters to customize the alarm message. | true | false |
Script | SwitchParameter | Indicates that a script is run when the alarm is activated. | true | false |
ScriptPath | String | Specifies the path to a batch file, located on a vCenter Server system, that will run when the alarm is activated. | true | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Snmp | SwitchParameter | Indicates that a SNMP message is sent when the alarm is activated. | true | false |
Subject | String | Specifies a subject for the email message you want to send. | false | false |
To | String[] | Specifies the email address to which you want to send a message. | true | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created AlarmAction object

Notes

Examples

-------------- Example 1 --------------

Get-AlarmDefinition -Name "Alarm1" | New-AlarmAction -Snmp

Creates an alarm action SNMP.

-------------- Example 2 --------------

Get-AlarmDefinition -Name "Alarm1" | New-AlarmAction -Script -ScriptPath 'c:\test.bat'

Creates an alarm action script.

-------------- Example 3 --------------

Get-AlarmDefinition -Name "Alarm1" | New-AlarmAction -Email -To 'test@vmware.com' -CC @('test1@vmware.com', 'test2@vmware.com') -Body 'Test body' -Subject 'Test subject'

Creates an alarm action Email.


New-AlarmActionTrigger - vSphere PowerCLI Cmdlets Reference

New-AlarmActionTrigger

Synopsis

This cmdlet creates a new action trigger for the specified alarm action.

Syntax

New-AlarmActionTrigger [-StartStatus] <InventoryItemStatus> [-EndStatus] <InventoryItemStatus> -AlarmAction <AlarmAction> [-Repeat] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-AlarmAction
Get-AlarmActionTrigger
Get-AlarmDefinition
New-AlarmAction
Remove-AlarmAction
Remove-AlarmActionTrigger
Set-AlarmDefinition

Detailed Description

This cmdlet creates a new action trigger for the specified alarm action.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
StartStatus | InventoryItemStatus | Specifies the start status for the alarm action. The valid values are Green, Yellow, and Red. | true | false |
EndStatus | InventoryItemStatus | Specifies the end status for the alarm action. The valid values are Green, Yellow, and Red. | true | false |
AlarmAction | AlarmAction | Specifies the alarm action for which you want to create an action trigger. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Repeat | SwitchParameter | Indicates whether you want the alarm action to repeat until the alarm is acknowledged. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created AlarmActionTrigger object

Notes

Examples

-------------- Example 1 --------------

Get-AlarmDefinition -Name "Alarm1" | Get-AlarmAction | New-AlarmActionTrigger -StartStatus 'Red' -EndStatus 'Yellow' -Repeat

Creates an action trigger for all actions for the specified alarm definition.


New-CDDrive - vSphere PowerCLI Cmdlets Reference

New-CDDrive

Synopsis

This cmdlet creates a new virtual CD drive.

Syntax

New-CDDrive [-IsoPath <String>] [-HostDevice <String>] [-StartConnected] [-VM] <VirtualMachine[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CDDrive
Remove-CDDrive
Set-CDDrive

Detailed Description

This cmdlet creates a new virtual CD drive for each of the provided virtual machines. If an ISO location is provided, sets the CD to point to the ISO.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machine to which the new virtual CD drive belongs. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
HostDevice | String | Specifies the path to the CD drive on the virtual machine host that backs the virtual CD drive. Do not set this parameter if the ISOPath parameter is set. | false | false |
IsoPath | String | Specifies the datastore path to the ISO (CD image) file that backs the virtual CD drive. Do not set this parameter if the HostDevice parameter is set. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
StartConnected | SwitchParameter | Indicates that the virtual CD drive starts connected when the virtual machine associated with it powers on. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The one or more newly created CDDrive objects

Notes

Examples

-------------- Example 1 --------------

New-CDDrive -VM $vm -ISOPath "Path_to_ISO\test.iso"

Creates a CD drive on the specified virtual machine and attach an ISO image to it.


New-CIAccessControlRule - vCloud Snapin Cmdlets Reference

New-CIAccessControlRule

Synopsis

This cmdlet creates a new access control rule.

Syntax

New-CIAccessControlRule [-AccessLevel] <AccessLevel> -Entity <AccessControlledEntity> [-User] <CIObject> [-Server <CIServer[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
New-CIAccessControlRule [-AccessLevel] <AccessLevel> -Entity <AccessControlledEntity> -EveryoneInOrg [-Server <CIServer[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIAccessControlRule
Set-CIAccessControlRule
Remove-CIAccessControlRule

Detailed Description

This cmdlet creates a new access control rule.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
AccessLevel | AccessLevel | Specifies the access level for the access control rule that you want to create. This parameter accepts Read, ReadWrite, and FullControl values. | true | false |
User | CIObject | Specifies the cloud users for whom the access control rule applies. This parameter accepts CIUser and Org objects. When you pass an Org object to this parameter, the access control rule applies for everyone in the organization. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Entity | AccessControlledEntity | Specifies the entity for which you want to create the access control rule. This parameter accepts vApp and Catalog objects. | true | true (ByValue) |
EveryoneInOrg | SwitchParameter | Indicates that the access control rule applies for everyone in the organization of the entity. | true | false |
Force | SwitchParameter | Indicates that you want to overwrite any existing access control rules for the specified entity and cloud user. This parameter is only applicable when the User parameter is specified. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created CIAccessControlRule object

Notes

Examples

-------------- Example 1 --------------

New-CIAccessControlRule -Entity 'MyVApp' -User 'MyUser' -AccessLevel "FullControl"

Creates a new access control rule for the specified vApp. The access control rule provides the specified user with full control access privileges for the vApp.

-------------- Example 2 --------------

New-CIAccessControlRule -Entity 'MyCatalog' -EveryoneInOrg -AccessLevel "Read"

Creates a new access control rule for the specified catalog. The access control rule provides all users in the organization with read only privileges for the catalog.


New-CIVApp - vCloud Snapin Cmdlets Reference

New-CIVApp

Synopsis

This cmdlet creates a new vApp.

Syntax

New-CIVApp [-Name] <String> [-Description <String>] [-OrgVdc <OrgVdc>] [-RunAsync] [-RuntimeLease <TimeSpan>] [-Server <CIServer[]>] [-StorageLease <TimeSpan>] -VAppTemplate <CIVAppTemplate> [-WhatIf] [-Confirm] [<CommonParameters>]
New-CIVApp [-Name] <String> [-Description <String>] [-OrgVdc <OrgVdc>] [-RunAsync] [-RuntimeLease <TimeSpan>] [-Server <CIServer[]>] [-StorageLease <TimeSpan>] -VApp <CIVApp> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVApp
Import-CIVApp
Remove-CIVApp
Restart-CIVApp
Set-CIVApp
Start-CIVapp
Stop-CIVApp
Suspend-CIVapp

Detailed Description

This cmdlet creates a new vApp. You can clone an existing vApp or create the vApp from a vApp template. By default, the state of the vApp is Powered Off and the vApp is not deployed.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies a name for the vApp you want to create. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Description | String | Specifies a description for the vApp you want to create. | false | false |
OrgVdc | OrgVdc | Specifies the organization virtual datacenter (vDC) where you want to store the new vApp. | false | true (ByValue) | The organization vDC of the vApp
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
RuntimeLease | TimeSpan | Specifies the maximum running time for the vApp before vCloud Director stops it automatically. To specify that the lease is unlimited, pass $null. When creating a vApp from a vApp template, not specifying this parameter automatically applies the default organization settings. When cloning a vApp, not specifying this parameter automatically applies the source vApp settings. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
StorageLease | TimeSpan | Specifies the maximum amount of time for the vApp to remain stopped before vCloud Director automatically marks it as expired, or deletes it, depending on the organization policy. To specify that the lease is unlimited, pass $null. When creating a vApp from a vApp template, not specifying this parameter automatically applies the default organization settings. When cloning a vApp, not specifying this parameter automatically applies the source vApp settings. | false | false |
VApp | CIVApp | Specifies the vApp you want to clone. | true | true (ByValue) |
VAppTemplate | CIVAppTemplate | Specifies the vApp template from which you want to create the new vApp. | true | true (ByValue) |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created CIVApp object

Notes

Examples

-------------- Example 1 --------------

$myVApp = Get-CIVApp -Name 'MySourceVApp'
New-CIVApp -Name 'MyClonedVApp' -Description "This is my cloned vApp" -VApp $myVApp

Creates a new vApp by cloning the specified vApp.

-------------- Example 2 --------------

$myTemplate = Get-CIVAppTemplate -Name 'MySourceTemplate'
$myOrgVdc = Get-OrgVdc -Name 'MyOrgVdc'
New-CIVApp -Name 'MyNewVApp' -Description "This vApp is created from the vApp template named MySourceTemplate." -OrgVdc $myOrgVdc -VAppTemplate $myTemplate

Creates a new vApp from the specified vApp template and stores it in the specified organization vDC.


New-CIVAppNetwork - vCloud Snapin Cmdlets Reference

New-CIVAppNetwork

Synopsis

This cmdlet creates a new vApp network.

Syntax

New-CIVAppNetwork -Direct -ParentOrgNetwork <OrgNetwork> -VApp <CIVApp> [-RunAsync] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-CIVAppNetwork [-DisableFirewall] [-ParentOrgNetwork <OrgNetwork>] -VApp <CIVApp> [-RunAsync] [-Server <CIServer[]>] -Routed [-Description <String>] [-DnsSuffix <String>] -Gateway <IPAddress> -Name <String> -Netmask <IPAddress> [-PrimaryDns <IPAddress>] [-SecondaryDns <IPAddress>] [-StaticIPPool <IPRangeList>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVAppNetwork
Remove-CIVAppNetwork
Set-CIVAppNetwork

Detailed Description

This cmdlet creates a new vApp network.
* To create a direct vApp network, specify the Direct parameter.
* To create a routed vApp network, specify the Routed parameter.
* To create an isolated vApp network, specify the Routed parameter but do not specify the ParentOrgNetwork parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Description | String | Specifies a description for the vApp network that you want to create. | false | false |
Direct | SwitchParameter | Indicates that you want to create a vApp network that is directly connected to a parent organization network. When the Direct parameter is specified, you cannot specify the Routed parameter. | true | false |
DisableFirewall | SwitchParameter | Indicates that you want to create a vApp network with a disabled firewall service. By default, when the Routed parameter is specified, the vApp network is created with an enabled firewall service. | false | false |
DnsSuffix | String | Specifies a DNS suffix for the vApp network that you want to create. | false | false |
Gateway | IPAddress | Specifies the default gateway for the vApp network that you want to create. | true | false |
Name | String | Specifies a name for the vApp network that you want to create. | true | false |
Netmask | IPAddress | Specifies a network mask for the vApp network that you want to create. | true | false |
ParentOrgNetwork | OrgNetwork | Specifies the parent organization network to which the vApp network connects. Do not specify this parameter if you want to create an isolated vApp network. | true | false |
PrimaryDns | IPAddress | Specifies a primary DNS for the vApp network that you want to create. | false | false |
Routed | SwitchParameter | Indicates that you want to create a routed network. To create an isolated network, specify the Routed parameter but do not specify the ParentOrgParameter. When the Routed parameter is specified, you cannot specify the Direct parameter. | true | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
SecondaryDns | IPAddress | Specifies a secondary DNS for the vApp network you want to create. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
StaticIPPool | IPRangeList | Specifies a range of static IP addresses for the vApp network to allocate to virtual machines. For example, "192.168.10.0 - 192.168.10.50, 192.168.10.100 - 192.168.10.150". | false | false |
VApp | CIVApp | Specifies the vApp for which you want to create a vApp network. | true | true (ByValue) |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created CIVAppNetwork object

Notes

Examples

-------------- Example 1 --------------

$myVApp = Get-CIVApp -Name 'MyVApp'
$parentOrgNetwork = Get-OrgNetwork -Name 'MyParentOrganizationNetwork'
New-CIVAppNetwork -ParentOrgNetwork $parentOrgNetwork -VApp $myVApp -Routed -Description 'This is my routed network.' -DnsSuffix 'mydomain.com' -Gateway '192.168.3.3' -Name 'MyRoutedNetwork' -Netmask '255.255.255.0' -PrimaryDns '192.168.3.1' -SecondaryDns '192.168.3.2' -StaticIPPool '192.168.3.100 - 92.168.3.120'

Creates a new routed vApp network with the specified configuration.

-------------- Example 2 --------------

$myVApp = Get-CIVApp -Name 'MyVApp'
New-CIVAppNetwork -ParentOrgNetwork $null -VApp $myVApp -Routed -Description 'This is my isolated network.' -DnsSuffix 'mydomain.com' -Gateway '192.168.3.3' -Name 'MyIsolatedNetwork' -Netmask '255.255.255.0' -PrimaryDns '192.168.3.1' -SecondaryDns '192.168.3.2' -StaticIPPool '192.168.3.100 - 192.168.3.120'

Createsa new isolated vApp network with the specified configuration.

-------------- Example 3 --------------

$myVApp = Get-CIVApp -Name 'MyVApp'
$parentOrgNetwork = Get-OrgNetwork -Name 'MyParentOrganizationNetwork'
New-CIVAppNetwork -ParentOrgNetwork $parentOrgNetwork -VApp $myVApp ?Direct

Creates a new direct vApp network.


New-CIVAppTemplate - vCloud Snapin Cmdlets Reference

New-CIVAppTemplate

Synopsis

This cmdlet creates a new vApp template.

Syntax

New-CIVAppTemplate [-Name] <String> [-VApp] <CIVApp> [[-OrgVdc] <OrgVdc>] [-Catalog <Catalog>] [-Description <String>] [-RunAsync] [-CustomizeOnInstantiate] [-Server <CIServer[]>] [-StorageLease <TimeSpan>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVAppTemplate
Import-CIVAppTemplate
Remove-CIVAppTemplate
Set-CIVAppTemplate

Detailed Description

This cmdlet creates a new vApp template from the specified vApp.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies a name for the vApp template you want to create. | true | false |
VApp | CIVApp | Specifies the vApp from which you want to create the new vApp template. | true | true (ByValue) |
OrgVdc | OrgVdc | Specifies the organization virtual datacenter (vDC) where you want to store the new vApp template. | false | false | OrgVdc of the specified vApp
Catalog | Catalog | Specifies the catalog to which you want to add the new vApp template. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
CustomizeOnInstantiate | SwitchParameter | Indicates that every vApp created from the template must be customized upon instantiation. | false | false |
Description | String | Specifies a description for the vApp template you want to create. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
StorageLease | TimeSpan | Specifies the maximum amount of time for the vApp to remain stopped before vCloud Director automatically marks it as expired, or deletes it, depending on the organization policy. If you do not specify this parameter, the default storage lease setting of the organization is applied. To specify that the lease is unlimited, pass $null. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created CIVAppTemplate object

Notes

Examples

-------------- Example 1 --------------

Get-CIVApp 'MyVApp' | New-CIVAppTemplate -Name 'MyVAppTemplate' -OrgVdc 'MyOrgVdc' -Catalog 'MyCatalog' -Description "MyTemplateDescription"

Creates a new template from a cloud vApp, specifies name and description for the template, places it in the MyOrgVdc organization vDC, and shares it in the MyCatalog catalog.

-------------- Example 2 --------------

Get-CIVApp 'MyVApp' | New-CIVAppTemplate -Name 'MyVAppTemplate' -OrgVdc 'MyOrgVdc' -CustomizeOnInstantiate

Creates a new template from a cloud vApp, specifies name and destination organization vDC for the template, and enables customization upon instantiation when creating a vApp from the template.

-------------- Example 3 --------------

Get-CIVApp 'MyVApp' | New-CIVAppTemplate -Name 'MyVAppTemplate' -OrgVdc 'MyOrgVdc' -StorageLease 3.04:30:30 -RunAsync

Asynchronously creates a template from a cloud vApp, specifies name and destination organization vDC for the template, and sets the storage lease to 3 days, 4 hours, 30 minutes and 30 seconds.


New-Cluster - vSphere PowerCLI Cmdlets Reference

New-Cluster

Synopsis

This cmdlet creates a new cluster.

Syntax

New-Cluster [-HARestartPriority <HARestartPriority>] [-HAIsolationResponse <HAIsolationResponse>] [-VMSwapfilePolicy <VMSwapfilePolicy>] [-Name] <String> -Location <VIContainer> [-HAEnabled] [-HAAdmissionControlEnabled] [-HAFailoverLevel <Int32>] [-DrsEnabled] [-DrsMode <DrsMode>] [-DrsAutomationLevel <DrsAutomationLevel>] [-VsanDiskClaimMode <VsanDiskClaimMode>] [-VsanEnabled] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Cluster
Move-Cluster
Remove-Cluster
Set-Cluster

Detailed Description

This cmdlet creates a new cluster with the provided inputs, in the location that is specified by the Location parameter.
HAEnabled is automatically set to $true if some of the HA settings, HAAdmissionControlEnabled, HAFailoverLevel, HARestartPriority, HAIsolationResponse, are specified .
DrsEnabled is automatically set to $true if some of the DRS settings, DrsAutomationLevel, DrsMode, are specified .

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies the name of the new cluster. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
DrsAutomationLevel | DrsAutomationLevel | Specifies a DRS (Distributed Resource Scheduler) automation level. The valid values are FullyAutomated, Manual, and PartiallyAutomated. | false | false |
DrsEnabled | SwitchParameter | Indicates that VMware DRS (Distributed Resource Scheduler) is enabled. | false | false |
DrsMode | DrsMode | This parameter is deprecated and scheduled for removal. Use the DrsAutomationLevel parameter instead. Specifies a DRS (Distributed Resource Scheduler) mode. The valid values are FullyAutomated, Manual, and PartiallyAutomated. | false | false |
HAAdmissionControlEnabled | SwitchParameter | Indicates that virtual machines cannot be powered on if they violate availability constraints. | false | false |
HAEnabled | SwitchParameter | Indicates that VMware high availability is enabled. | false | false |
HAFailoverLevel | Int32 | Specifies a configured failover level. This is the number of physical host failures that can be tolerated without impacting the ability to meet minimum thresholds for all running virtual machines. The valid values range from 1 to 4. | false | false |
HAIsolationResponse | HAIsolationResponse | Indicates that the virtual machine should be powered off if a host determines that it is isolated from the rest of the compute resource. The valid values are PowerOff and DoNothing. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. | false | false |
HARestartPriority | HARestartPriority | Specifies the cluster HA restart priority. The valid values are Disabled, Low, Medium, and High. VMware HA is a feature that detects failed virtual machines and automatically restarts them on alternative ESX hosts. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. | false | false |
Location | VIContainer | Specifies the location where you want to place the new cluster. If a datacenter is specified for the Location parameter, the cluster is created in its "hostFolder" folder. The "hostFolder" is a system folder and is guaranteed to exist. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VMSwapfilePolicy | VMSwapfilePolicy | Specifies the swapfile placement policy. The following values are valid: InHostDataStore - Store the swapfile in the datastore that is specified by the VMSwapfileDatastoreID property of the virtual machine host. If the VMSwapfileDatastoreID property is not set or indicates a datastore with unsufficient free space, store the swapfile in the same directory as the virtual machine. This setting might degrade VMotion performance. WithVM - Store the swapfile in the same directory as the virtual machine. | false | false |
VsanDiskClaimMode | VsanDiskClaimMode | Specifies the mode by which disks are claimed by the Virtual SAN. If not specified and VsanEnabled is specified, the assumed value is Manual. | false | false |
VsanEnabled | SwitchParameter | Indicates that the Virtual SAN feature is enabled on this cluster. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created Cluster object

Notes

Examples

-------------- Example 1 --------------

$engineeringFolder = Get-Folder Engineering

New-Cluster -Location Folder -Name Cluster -DRSEnabled -DRSMode FullyAutomated

Creates a new cluster named Cluster in the Folder folder.


New-CustomAttribute - vSphere PowerCLI Cmdlets Reference

New-CustomAttribute

Synopsis

This cmdlet creates a new custom attribute.

Syntax

New-CustomAttribute [-Name] <String> [[-TargetType] <CustomAttributeTargetType[]>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CustomAttribute
Remove-CustomAttribute
Set-CustomAttribute
Get-Annotation
Set-Annotation

Detailed Description

This cmdlet creates a new custom attribute. A custom attribute is a user-defined description field of one or more vCenter Server objects.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies a name for the new custom attribute. | true | false |
TargetType | CustomAttributeTargetType[] | Specifies the type of the objects to which the new custom attribute applies. The valid values are VirtualMachine, ResourcePool, Folder, VMHost, Cluster, Datacenter, and $null. If the value is $null the custom attribute is global and applies to all target types. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created CustomAttribute object

Notes

Examples

-------------- Example 1 --------------

New-CustomAttribute -Name "CompanyName" -TargetType VMHost, VirtualMachine

Creates a new custom attribute named CompanyName for the virtual machines and hosts on the server.


New-CustomField - vSphere PowerCLI Cmdlets Reference

New-CustomField

Synopsis

This cmdlet creates a new custom field for a particular inventory item type.

Syntax

New-CustomField [-Entity] <InventoryItem> [-Name] <String> [[-Value] <String>] [-Global] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Remove-CustomField
Set-CustomField

Detailed Description

This cmdlet is deprecated and scheduled for removal.
This cmdlet creates a custom field for the object types that are provided by the Entity parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Entity | InventoryItem | Specifies the inventory objects for which you want to create a new custom field. | true | true (ByValue) |
Name | String | Specifies the name of the new custom field. | true | false |
Value | String | Specifies the value of the new custom field. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Global | SwitchParameter | Indicates that the new custom field applies to all types of objects. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The specified InventoryItem object

Notes

Examples

-------------- Example 1 --------------

New-CustomField -Entity VM -Name CPUMaxLoad -Value 300

Creates a custom field named CPUMaxLoad for the VM virtual machine, and sets it initial value to 300. The command returns the virtual machine VM, to which the new custom field belongs.


New-Datacenter - vSphere PowerCLI Cmdlets Reference

New-Datacenter

Synopsis

This cmdlet creates a new datacenter.

Syntax

New-Datacenter [-Location] <VIContainer> [-Name] <String> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Datacenter
Move-Datacenter
Remove-Datacenter
Set-Datacenter

Detailed Description

This cmdlet creates a new datacenter in the location that is specified by the Location parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies a name for the new datacenter. | true | false |
Location | VIContainer | Specifies the location where you want to create the new datacenter. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created Datacenter object

Notes

Examples

-------------- Example 1 --------------

$folder = Get-Folder -NoRecursion | New-Folder -Name Folder

New-Datacenter -Location $folder -Name Datacenter | fl

Gets the inventory root folder and create a new folder called Folder in it.
Creates a new datacenter called Datacenter in the Folder folder. The result is pipelined to the fl command to retrieve a flat view of the new datacenter properties.


New-Datastore - vSphere PowerCLI Cmdlets Reference

New-Datastore

Synopsis

This cmdlet creates a new datastore.

Syntax

New-Datastore [-Server <VIServer[]>] [-VMHost] <VMHost[]> [-Name] <String> -Path <String> [-Vmfs] [-BlockSizeMB <Int32>] [-FileSystemVersion <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-Datastore [-Server <VIServer[]>] [-VMHost] <VMHost[]> [-Name] <String> -Path <String> [-Nfs] -NfsHost <String> [-ReadOnly] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Datastore
Remove-Datastore
Set-Datastore
Move-Datastore

Detailed Description

This cmdlet creates a new datastore based on the provided parameters. The following characters cannot be used in a datastore name: slash (/), backslash (\), and percent (%).

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies a host where you want to create the new datastore. | true | true (ByValue) |
Name | String | Specifies a name for the new datastore. | true | false |
BlockSizeMB | Int32 | Specifies the maximum file size of VMFS in megabytes (MB). If no value is given, the maximum file size for the current system platform is used. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
FileSystemVersion | String | Specifies the file system you want to use on the new datastore. | false | false |
Nfs | SwitchParameter | Indicates that you want to create an NFS datastore. | false | false |
NfsHost | String | Specifies the NFS host where you want to create the new datastore. | true | false |
Path | String | If you want to create an NFS datastore, specify the remote path of the NFS mount point. If you want to create a VMFS datastore, specify the canonical name of the SCSI logical unit that will contain new VMFS datastores. | true | false |
ReadOnly | SwitchParameter | Indicates that the access mode for the mount point is ReadOnly. The default access mode is ReadWrite. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Vmfs | SwitchParameter | Indicates that you want to create a VMFS datastore. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The one or more newly created Datastore objects

Notes

Examples

-------------- Example 1 --------------

New-Datastore -VMHost $vmhost -Name Datastore -Path $scsiLun.CanonicalName -Vmfs -FileSystemVersion 3

Creates a VMFS datastore by specifying the file system type.

-------------- Example 2 --------------

New-Datastore -Nfs -VMHost 10.23.112.60 -Name NFSDatastore -Path /mynfs -NfsHost 10.23.84.73

Creates a NFS datastore.

-------------- Example 3 --------------

$vmhost1, $vmhost2 | New-Datastore -Nfs -Name NFS1 -Path "/mnt/nfs1/nfs11/test1" -NfsHost 10.23.113.55 -ReadOnly

Creates a read-only NFS datastore across multiple virtual machine hosts.


New-DatastoreCluster - vSphere PowerCLI Cmdlets Reference

New-DatastoreCluster

Synopsis

This cmdlet creates a new datastore cluster.

Syntax

New-DatastoreCluster [-Name] <String> -Location <VIContainer> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Unknown
Get-DatastoreCluster
Set-DatastoreCluster
Remove-DatastoreCluster

Detailed Description

This cmdlet creates a new datastore cluster. By default, Storage DRS is disabled. To enable Storage DRS, run Set-DatastoreCluster.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies a name for the datastore cluster that you want to create. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Location | VIContainer | Specifies a container object (Datacenter or Folder) where you want to place the new datastore cluster. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created DatastoreCluster object

Notes

Examples

-------------- Example 1 --------------

New-DatastoreCluster -Name 'MyDatastoreCluster' -Location 'MyDatacenter'

Creates a new datastore cluster on the specified datacenter.


New-DeployRule - vSphere Auto Deploy Reference

New-DeployRule

Synopsis

Creates a new rule.

Syntax

New-DeployRule [-Name] <String> -Pattern <String[]> -Item <VIObjectCore[]> [<CommonParameters>]
New-DeployRule [-Name] <String> -AllHosts -Item <VIObjectCore[]> [<CommonParameters>]

Related Commands

Add-DeployRule
Copy-DeployRule
Set-DeployRule

Detailed Description

Creates a new rule with the specified items and patterns. The items specify what should be associated with an ESXi host and the patterns specify which ESXi hosts the rule applies to. A rule on its own does not affect anything. The rule must first be added to the working rule set in order to place it in context with the other rules in the system. Since multiple rules can match a single host, the rule set is used to rank the rules. Items in higher ranking rules are preferred over items in lower ranking rules. Only one item of a particular type will be associated with the host. For example, if two rules in a rule set have host profiles, only the profile in the higher ranking rule will be used. Alternatively, if one rule has a host profile and the other rule has an image profile, both rules will have an affect.

You must have the "AutoDeploy.Rule.Create" privilege on the root folder of vCenter Server to use this cmdlet.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Name of the new rule. | true | false |
AllHosts | SwitchParameter | Specify AllHosts to apply the new rule to all hosts managed by VMware Auto Deploy. Hosts are managed by VMware Auto Deploy if the DHCP server directs them to the Auto Deploy TFTP configuration file. | true | false |
Item | VIObjectCore[] | Item the rule should apply to the hosts. Can be an image profile, a host profile, or a folder or cluster on the vCenter Server system to add the host to. | true | true (ByValue) |
Pattern | String[] | Set of hosts the new rule should apply to. Pattern strings use the following syntax: <attr>==<value> Adds a pattern that exactly matches the specified value against the specified attribute. Use this syntax if you need to match a string that contains a comma. <attr>=<Val1 >[,val2,... ,valN] Adds a pattern that matches against the comma-separated list of values. Supported value types are: string Exact string match <ip1>-<ip2> Range of IPv4 addresses. | true | false |

Return Type

VMware.DeployAutomation.Types.DeployRule

Notes

Examples

-------------- Example 1 --------------

C:\PS> $rule = New-DeployRule -Name "defaultFolder" -Item "NewHosts" -AllHosts

Create a rule that places all hosts in the folder named "NewHosts".

-------------- Example 2 --------------

C:\PS> $img = Get-ESXImageProfile -Name "My ESXi 5.0"

C:\PS> $rule = New-DeployRule -Name "testrule" -Item $img -Pattern  "vendor=Acme","vendor==VMware, Inc.","ipv4=192.168.1.10-192.168.1.20"

Create a rule that assigns the image profile named "My ESXi 5.0" to hosts that match a set of vendors and are in a particular IPv4 range.

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


New-DrsRule - vSphere PowerCLI Cmdlets Reference

New-DrsRule

Synopsis

This cmdlet creates a new DRS rule.

Syntax

New-DrsRule [-Name] <String> [-Cluster] <Cluster[]> [-Enabled [<Boolean>]] -KeepTogether [<Boolean>] -VM <VirtualMachine[]> [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-DrsRule
Remove-DrsRule
Set-DrsRule

Detailed Description

This cmdlet creates a new DRS rule. Each rule defines the virtual machines that can run on the same host (affinity rule) or must run on different hosts (anti-affinity rule).

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies a name for the new DRS rule. | true | false |
Cluster | Cluster[] | Specifies the clusters for which the new DRS rule applies. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Enabled | Boolean | If the value of this parameter is $true, the new DRS rule is enabled for the specified clusters. If the value is $false, it is disabled. | false | false |
KeepTogether | Boolean | If the value of this parameter is $true, the new DRS rule is an affinity rule. If the value is $false, the DRS rule is an anti-affinity rule. | true | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | true (ByValue) |
VM | VirtualMachine[] | Specifies the virtual machines that are referenced by the new DRS rule. | true | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created DrsVMAffinityRule object

Notes

Examples

-------------- Example 1 --------------

New-DrsRule -Cluster $cluster -Name antiAffinityRule1 -KeepTogether $false -VM $antiAffinityVMs

Creates a new DRS rule for the cluster saved in the $cluster variable with the specified parameters.


New-EsxImageProfile - vSphere Imagebuilder Reference

New-EsxImageProfile

Synopsis

Syntax

New-EsxImageProfile -NewProfile [-Name] <String> [-Vendor] <String> -SoftwarePackage <SoftwarePackage[]> [-AcceptanceLevel <AcceptanceLevels>] [-Description <String>] [-ReadOnly] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-EsxImageProfile -CloneProfile <ImageProfile> [-Name] <String> [-Vendor] <String> -SoftwarePackage <SoftwarePackage[]> [-AcceptanceLevel <AcceptanceLevels>] [-Description <String>] [-ReadOnly] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Detailed Description

Creates an image profile on the client machine, either by cloning or from scratch. Image Bulder performs the complete set of image profile validation tests on the new image profile and displays all errors found during validation. You pass the new image profile into the Set-EsxImageProfile, Export-EsxImageProfile, Add-EsxSoftwarePackage, and Remove-EsxSoftwarePackage cmdlets in the -ImageProfile parameter as follows:

*Use the image profile name, as specified in the -Name parameter.
*Pipe the output of New-EsxImageProfile to the commandlet.

The resulting image profile will be preserved for the current session only. To preserve an image profile across sessions, use the Export-EsxImageProfile cmdlet. The created image profile does not have to be assigned to a variable; it is preserved in memory automatically and will be listed with the Get-EsxImageProfile cmdlet.

Specify either -NewProfile or -CloneProfile, but not both.

If you want to edit an image profile published in a depot, you must clone the image profile before you edit it. When you clone an image profile, specify a Name parameter for the clone.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | (prompt) A short string that together with Creator uniquely describes the profile. Required to create a profile. | true | false |
Vendor | String | (prompt) A short string describing the organization that created the profile. Required to create a profile. | true | false |
AcceptanceLevel | AcceptanceLevels | Optional. Specifies the minimum acceptance level required for VIBs in the image profile. Defaults to "PartnerSupported". Must be one of the following values: *VMwareCertified *VMwareAccepted *PartnerSupported *CommunitySupported | false | false |
CloneProfile | ImageProfile | Specifies an image profile to clone from. Takes one of the following forms: *Name of an image profile, as displayed in the Name column of Get-EsxImageProfile, or from the Name property of any ImageProfile object *An ImageProfile object You must specify a -Name parameter that differs from the name of the original you create the clone from. You can also specify the -Vendor parameter to change the Vendor field of the clone. | true | true (ByValue, ByPropertyName) |
Confirm | SwitchParameter |  | false | false |
Description | String | Optional. A long string describing the contents or purpose of the image profile. | false | false |
NewProfile | SwitchParameter | Specify -NewProfile to create a new profile (as opposed to cloning an existing one. | true | false |
ReadOnly | SwitchParameter | Optional. Makes the image profile read only. If you make an image profile read only when you create it, you cannot make it modifyable later. | false | false |
SoftwarePackage | SoftwarePackage[] | (Pipeline input) One or more VIB software packages that the image profile should contain. Required to create a profile. The value can take one of the following forms: *Name of a VIB, as displayed in the Name column of Get-EsxSoftwarePackage, or in the Name property of any SoftwarePackage object. Image Builder selects the highest available version of the named package. *"<Name> <Version>", for adding a specific version of a VIB named Name to the image profile. *A SoftwarePackage object *The GUID of the VIB (from the Guid property of a SoftwarePackage) *A list containing a mix of any of the above elements You must include one of the "esx-base" packages to create a valid image profile. When cloning a profile, any VIBs you specify in this field replace the previous profile's SoftwarePackages field. Pipeline input is allowed when creating a new profile. | true | true (ByValue, ByPropertyName) |
WarningAction | ActionPreference |  | false | false |
WarningVariable | String |  | false | false |
WhatIf | SwitchParameter |  | false | false |

Return Type

Notes

Examples

---------- Example 1 ----------

New-EsxImageProfile -CloneProfile "ESX-5.0-234567-standard" \
-Name "My custom profile" -AcceptanceLevel CommunitySupported

Clone an image profile, give it a new name, and change the acceptance level. (NOTE: The '\' is used to continue the second line of input; either press ENTER after \ or enter everything on one line without the '\').

---------- Example 2 ----------

$ip = New-EsxImageProfile -NewProfile -Name "Built from scratch!" -Vendor "NotVmware" \
-SoftwarePackage esx-base,esx-tboot,misc-drivers

Create an image profile from scratch, assigning the result to a variable. Software packages are specified by name.

---------- Example 3 ----------

Get-EsxSoftwarePackage -Name esx-base,esx-tboot,misc-drivers |  \
New-EsxImageProfile -NewProfile -Name "Built from scratch!" -Vendor "NotVmware"

Create an image profile from scratch, passing in software packages via pipeline

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


New-FloppyDrive - vSphere PowerCLI Cmdlets Reference

New-FloppyDrive

Synopsis

This cmdlet creates a new virtual floppy drive.

Syntax

New-FloppyDrive [-FloppyImagePath <String>] [-NewFloppyImagePath <String>] [-HostDevice <String>] [-StartConnected] [-VM] <VirtualMachine[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-FloppyDrive
Remove-FloppyDrive
Set-FloppyDrive

Detailed Description

This cmdlet creates a new virtual floppy drive for each of the provided virtual machines. If a floppy image path is provided, sets the floppy drive to point to the image. If both the FloppyImagePath and HostDevice parameters are specified, an error is generated.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines to which you want to attach the new virtual floppy drive. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
FloppyImagePath | String | Specifies the datastore path to the floppy image file backing the virtual floppy drive. Do not use this parameter together with the HostDevice parameter. | false | false |
HostDevice | String | Specifies the path to the floppy drive on the host which will back this virtual floppy drive. Do not use this parameter together with the FloppyImagePath parameter. | false | false |
NewFloppyImagePath | String | Specifies a new datastore path to a floppy image file backing the virtual floppy drive. Do not use this parameter together with the HostDevice parameter. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
StartConnected | SwitchParameter | Indicates that the virtual floppy drive starts connected when its associated virtual machine powers on. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The one or more newly created FloppyDrive objects

Notes

Examples

-------------- Example 1 --------------

New-FloppyDrive -VM VM -HostDevice '/dev/fd0' -StartConnected

Creates a floppy drive backed by the client device /dev/fd0 and sets it to start connected when the virtual machine is powered on.


New-Folder - vSphere PowerCLI Cmdlets Reference

New-Folder

Synopsis

This cmdlet creates a new folder on a vCenter Server system.

Syntax

New-Folder [-Name] <String> [-Location] <VIContainer> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Folder
Move-Folder
Remove-Folder
Set-Folder

Detailed Description

This cmdlet creates a new folder on the specified location.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies a name for the new folder. | true | false |
Location | VIContainer | Specifies a container object (folder, datacenter, or cluster) where you want to place the new folder. If a datacenter is specified for the Location parameter, then the folder is created in its "hostFolder" folder and contains hosts and clusters. The "hostFolder" is a system folder and is guaranteed to exist. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created Folder object

Notes

Examples

-------------- Example 1 --------------

New-Folder -Name "Folder1" -Location (Get-Datacenter)[0]

Creates a new folder in a datacenter root.

-------------- Example 2 --------------

New-Folder -Name "Folder1" -Location (Get-Cluster)[0]

Creates a new folder in a cluster root.

-------------- Example 3 --------------

Get-Folder | Select -First 1 | New-Folder -Name "Folder2"

Creates a nested folder by using a pipeline command.


New-HardDisk - vSphere PowerCLI Cmdlets Reference

New-HardDisk

Synopsis

This cmdlet creates a new hard disk on the specified location.

Syntax

New-HardDisk [-AdvancedOption <AdvancedOption[]>] [[-Persistence] <String>] [-Controller <ScsiController>] [[-DiskType] <DiskType>] [-CapacityKB <Int64>] [-CapacityGB <Decimal>] [-Split] [-ThinProvisioned] [-StorageFormat <VirtualDiskStorageFormat>] [-DeviceName <String>] [-Datastore <StorageResource>] [-VM] <VirtualMachine[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-HardDisk [[-Persistence] <String>] [-Controller <ScsiController>] -DiskPath <String> [-VM] <VirtualMachine[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Copy-HardDisk
Get-HardDisk
Remove-HardDisk
Set-HardDisk
Move-HardDisk

Detailed Description

This cmdlet creates a new hard disk on the specified virtual machine or datastore. When a new virtual disk with raw disk mapping (RDM) backing is created, the compatibility mode of "virtual" or "physical" must be specified using the DiskType parameter. In "virtual" compatibility mode, the disk can use the specified disk modes. In "physical" compatibility mode, the disk modes are ignored and commands are passed directly to the backing Logical Unit Number (LUN). If "flat" mode is set by the DiskType parameter, the virtual disk backing is pre-allocated. If the hard disk is attached to no virtual machine, the value of the DiskType parameter might be Unknown, which means that no type is specified. Use the Persistence parameter to make the disk Persistent (changes are immediately and permanently written to the disk), Nonpersistent (changes to the disk are discarded when you power off or reset the virtual machine), IndependentPersistent, IndependentNonPersistent, or Undoable.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines to which you want to add the new disk. | true | true (ByValue)
Persistence | String | Specifies the disk persistence mode. The valid values are Persistent, NonPersistent, IndependentPersistent, IndependentNonPersistent, and Undoable. This parameter is supported only when the disk type is set to ?rawVirtual? or ?flat?. The 'NonPersistent' and 'Undoable' values are deprecated and scheduled for removal. Their usage is not recommended because they do not work with snapshots and are not supported on ESX 3.5 and later. | false | false
DiskType | DiskType | Specifies the type of file backing you want to use. The valid values are rawVirtual, rawPhysical, flat, and unknown. If the hard disk is attached to no virtual machine, the value of the DiskType parameter might be Unknown, which means that no type is specified. | false | false
AdvancedOption AdvancedOption[] Specifies advanced options for creating hard disks. Accepts only SdrsVMDiskAntiAffinityRule objects. You can define an anti-affinity SDRS rule for the disk by specifying a SdrsVMDiskAntiAffinityRule object to the AdvancedOption parameter and this will override any existing SdrsVMDiskAntiAffinityRule for the virtual machine.

The SdrsVMDiskAntiAffinityRule defines a Storage DRS intra-VM anti-affinity rule (vm disk anti-affinity rule). It is only applicable when creating a virtual machine or hard disk on a datastore cluster. An instance of the object is created by invoking its constructor. There are two constructors - "public SdrsVMDiskAntiAffinityRule(param string[] diskIdentifier)" and "public SdrsVMDiskAntiAffinityRule(param HardDisk[] disk)". For the first constructor, "diskIdentifier" can be either the disk key or the index of the disk in the disk array. The specified disks (and the disk to which the rule is applied) are placed in an anti-affinity rule on a DatastoreCluster. Only one such rule is supported per a virtual machine. You can pass the instance to the AdvancedOption parameter of the New-VM or New-HardDisk cmdlets.

The SDRS functionality is experimental. 		false false
CapacityGB | Decimal | Specifies the capacity of the new virtual disk in gigabytes (GB). You need to specify this parameter when you create hard disks of type Flat. | false | false
CapacityKB Int64 This parameter is obsolete. Use CapacityGB instead.
Specifies the capacity of the new virtual disk in kilobytes (KB). You need to specify this parameter when you create hard disks of type Flat. 		false false
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Controller | ScsiController | Specifies a SCSI controller to which you want to attach the new hard disk. | false | false
Datastore | StorageResource | Specifies the datastore where you want to place the new hard disk. If a DatastoreCluster object is passed to the Datastore parameter, the hard disk is added to the DatastoreCluster in an automated SDRS mode. You can define an anti-affinity SDRS rule for the disk by specifying an SdrsVMDiskAntiAffinityRule object to the AdvancedOption parameter and this will override any existing SdrsVMDiskAntiAffinityRule for the virtual machine. | false | false
DeviceName | String | Specifies the host-specific device the LUN is being accessed through. If the target LUN is not available on the host then it is empty. For example, this could happen if it has been masked out accidentally. Only supported when DiskType is set to ?rawVirtual? or ?rawPhysical?. The device name is visible in the vSphere Client through the new raw hard disk wizard or can be retrieved using PowerCLI views. | false | false
DiskPath | String | Specifies the path to the hard disk. | true | false
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false
Split SwitchParameter This parameter is deprecated and scheduled for removal. Use the StorageFormat instead.
Specifies the type of the virtual disk file - split or monolithic. If the value is $true, the virtual disk is stored in multiple files, each 2GB. If the value is $false, the virtual disk is stored in a single file. This parameter is supported only if the DiskType parameter is set to ?flat?. 		false false
StorageFormat | VirtualDiskStorageFormat | Specifies the storage format of the new hard disk. This parameter accepts Thin, Thick, and EagerZeroedThick values. | false | false
ThinProvisioned SwitchParameter This parameter is deprecated and scheduled for removal. Use the StorageFormat instead.
Indicates to the underlying file system, that the virtual disk backing file should be allocated lazily (using thin provisioning). This parameter is only used for file systems that support configuring the provisioning policy on a per file basis, such as VMFS3. This parameter is supported only if the DiskType parameter is set to ?flat?. 		false false
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false

Return Type

The one or more newly created HardDisk objects

Notes

Works only on ESX hosts. New-HardDisk cannot create undoable disks on powered-on virtual machines. On ESX versions later than 3.0, non-persistent and undoable disks are not s upported.

Examples

-------------- Example 1 --------------

$vm = Get-VM VM

$vm | New-HardDisk -CapacityGB 100 -Persistence persistent

Adds to the VM virtual machine a new hard disk in a persistent mode with capacity of 100 GB.

-------------- Example 2 --------------

$deviceName = ($vmhost | Get-ScsiLun | Where {$_.CanonicalName -match "naa"})[0].ConsoleDeviceName

New-HardDisk -VM $vm -DiskType RawPhysical -DeviceName $deviceName

Obtains a valid device name for Raw Disk Mapping. Then the command creates a RDM hard disk for the specified virtual machine, with the obtained device name.

-------------- Example 3 --------------

New-HardDisk -VM $vm -CapacityGB 100 -Persistence IndependentNonPersistent

Creates a non-persistent hard disk with the specified capacity.

-------------- Example 4 --------------

New-HardDisk -VM $vm -DiskPath "[storage1] OtherVM/OtherVM.vmdk"

Attaches an available disk from a *.vmdk file.

-------------- Example 5 --------------

$vm = Get-VM WebServerVM

$disk = $vm | Get-HardDisk

$antiAffinityRule = New-Object 'VMware.VimAutomation.ViCore.Types.V1.DatastoreManagement.SdrsVMDiskAntiAffinityRule' $disk

New-HardDisk -VM $vm -AdvancedOption $antiAffinityRule -CapacityGB 40 -Datastore DatastoreCluster1

First retrieves the existing disk which will be part of the VMDK anti affinity rule. Then, creates an object describing the rule and creates the new hard disk.


New-IScsiHbaTarget - vSphere PowerCLI Cmdlets Reference

New-IScsiHbaTarget

Synopsis

This cmdlet creates a new iSCSI HBA target.

Syntax

New-IScsiHbaTarget -IScsiHba <IScsiHba[]> [-Address] <String[]> [[-Port] <Int32>] [-Type <IScsiHbaTargetType>] [[-IScsiName] <String>] [-ChapType <ChapType>] [-ChapName <String>] [-ChapPassword <String>] [-MutualChapEnabled [<Boolean>]] [-MutualChapName <String>] [-MutualChapPassword <String>] [-InheritChap [<Boolean>]] [-InheritMutualChap [<Boolean>]] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-IScsiHbaTarget
Remove-IScsiHbaTarget
Set-IScsiHbaTarget
Get-VMHostHba
Set-VMHostHba

Detailed Description

This cmdlet creates a new iSCSI HBA target. The cmdlet also enables and configures the CHAP (Challenge Handshake Authentication Protocol) authentication settings of the new target.

The Address parameter supports both IPv4 and v6 and also supports the string representations of these types. e.g. ?<address>:<port>?.
The Port parameter is used only when the value of the Address parameter does not contain the port. The default port number is 3260.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Address | String[] | Specifies the address of the new iSCSI HBA target. | true | false |
Port | Int32 | Specifies the TCP port of the target. | false | false | 3260
IScsiName | String | Specifies the iSCSI name of the target. It can be specified only for Static targets. | false | false |
ChapName | String | Specifies a CHAP authentication name for the new target. | false | false | <initiator name>
ChapPassword | String | Specifies a CHAP authentication password for the new target. | false | false |
ChapType | ChapType | Specifies the type of the CHAP (Challenge Handshake Authentication Protocol) you want the new target to use. The valid values are Prohibited, Discouraged, Preferred, and Required. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
InheritChap | Boolean | Indicates that the CHAP setting is inherited from the iSCSI HBA. | false | false |
InheritMutualChap | Boolean | Indicates that the Mutual CHAP setting is inherited from the iSCSI HBA. | false | false |
IScsiHba | IScsiHba[] | Specifies the iSCSI HBA for which you want to create the new target. | true | true (ByValue) |
MutualChapEnabled | Boolean | Indicates that Mutual CHAP is enabled. | false | false |
MutualChapName | String | Specifies a Mutual CHAP authentication name for the new target. | false | false | <initiator name>
MutualChapPassword | String | Specifies a Mutual CHAP authentication password for the new target. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Type | IScsiHbaTargetType | Specifies the type of the target. The valid values are Static and Send. | false | false | Send
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created IScsiHbaTarget object

Notes

CHAP configuration is supported only on vCenter Server/ESX 4.0 and later.

Examples

-------------- Example 1 --------------

$hba = Get-VMHost | Get-VMHostHba -Type iScsi

New-IScsiHbaTarget -IScsiHba $hba -Address 10.23.84.73

Creates a new target with IP address 10.23.84.73 on the specified iSCSI HBA device.

-------------- Example 2 --------------

Get-VMHost | Get-VMHostHba -Type iScsi | New-IScsiHbaTarget -Address "10.23.84.73" -ChapType Preferred -ChapName user -ChapPassword pass

Creates a new target on the provided iSCSI HBA device and configures the CHAP settings of the target.


New-NetworkAdapter - vSphere PowerCLI Cmdlets Reference

New-NetworkAdapter

Synopsis

This cmdlet creates a new virtual network adapter.

Syntax

New-NetworkAdapter [-MacAddress <String>] -NetworkName <String> [-StartConnected] [-WakeOnLan] [-Type <VirtualNetworkAdapterType>] [-VM] <VirtualMachine[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-NetworkAdapter [-MacAddress <String>] [-StartConnected] [-WakeOnLan] [-Type <VirtualNetworkAdapterType>] -PortId <String> -DistributedSwitch <DistributedSwitch> [-VM] <VirtualMachine[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-NetworkAdapter [-MacAddress <String>] [-StartConnected] [-WakeOnLan] [-Type <VirtualNetworkAdapterType>] -Portgroup <VirtualPortGroupBase> [-VM] <VirtualMachine[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-NetworkAdapter
Remove-NetworkAdapter
Set-NetworkAdapter

Detailed Description

This cmdlet creates a new virtual network adapter for each of the provided virtual machines and sets the optional properties if provided.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines to which you want to attach the new virtual network adapter. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
DistributedSwitch | DistributedSwitch | Specifies a virtual switch to which you want to connect the network adapter. | true | false |
MacAddress | String | Specifies an optional MAC address for the new virtual network adapter. | false | false |
NetworkName | String | Specifies the name of the network to which you want to add the new virtual network adapter. Specifying a distributed port group name is obsolete. Use the Portgroup parameter instead. | true | false |
Portgroup | VirtualPortGroupBase | Specifies a standard or a distributed port group to which you want to connect the new network adapter. | true | false |
PortId | String | Specifies the port of the specified distributed switch to which you want to connect the network adapter. Use this parameter only if the DistributedSwitch parameter is specified. | true | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
StartConnected | SwitchParameter | Indicates that the virtual network adapter starts connected when the virtual machine associated with it powers on. | false | false |
Type | VirtualNetworkAdapterType | Specifies the type of the new network adapter. The valid types are e1000, Flexible, Vmxnet, EnhancedVmxnet, and Vmxnet3, and Unknown. If no value is given to the parameter, the new network adapter is of the type recommended by VMware for the given guest OS. | false | false |
WakeOnLan | SwitchParameter | Indicates that wake-on-LAN is enabled on the newly created virtual network adapter. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The one or more newly created NetworkAdapter objects

Notes

There are two special cases concerning the behavior of New-NetworkAdapter: - If you are directly connected to a standalone ESX host (that is not manag ed by a vCenter Server), the MAC address of the newly created network adapt er is generated after the associated virtual machine is powered on for a fi rst time. - If you are directly connected to an ESX host that is managed by a vCenter Server, the MAC address of the newly created network adapter is generated with a delay of several seconds.

Examples

-------------- Example 1 --------------

Get-VM VM | New-NetworkAdapter  -NetworkName "VM Network" -MacAddress '00:50:56:a1:00:00' -WakeOnLan -StartConnected -Type EnhancedVmxnet

Create a virtual network adapter with the specified parameters.

-------------- Example 2 --------------

$myVm = Get-VM -Name MyVM
$MyVDPortgroup = Get-VDPortgroup -Name MyVDPortGroup
New-NetworkAdapter -VM $myVM -Portgroup $MyVDPortgroup

Adds a new network adapter to the specified virtual machine and connects it to the specified distributed port group.

-------------- Example 3 --------------

$myVM = Get-VM -Name MyVM
$MyVDSwitch = Get-VDSwitch -Name MyVDSwitch
New-NetworkAdapter -VM $myVM -DistributedSwitch $MyVDSwitch -PortId 100

Adds a new network adapter to the specified virtual machine and connects it to the specified port on the specified vSphere distributed switch.


New-Org - vCloud Snapin Cmdlets Reference

New-Org

Synopsis

This cmdlet creates a new organization.

Syntax

New-Org -Name <String> -FullName <String> [-Description <String>] [-Server <CIServer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Org
Remove-Org
Set-Org

Detailed Description

This cmdlet creates a new organization. By default, the new organization is enabled. Note: This cmdlet is only available to Provider Administrators.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Description | String | Specifies a description for the organization that you want to create. | false | false |
FullName | String | Specifies a full name for the organization that you want to create. | true | false |
Name | String | Specifies a unique name identifier for the organization that you want to create. | true | false |
Server | CIServer | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | true (ByValue) |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created Organization object

Notes

Examples

-------------- Example 1 --------------

$myOrgName = "MyOrg"
$myOrganization = New-Org -Name $myOrgName -FullName "MyOrgFullName" -Description "MyOrgDescription"

Creates a new organization with the specified full name and description.


New-OrgNetwork - vCloud Snapin Cmdlets Reference

New-OrgNetwork

Synopsis

This cmdlet creates a new organization network on a vCloud Director server.

Syntax

New-OrgNetwork -Name <String> [-Description <String>] -Direct -Org <Org> -ExternalNetwork <ExternalNetwork> [-Server <CIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]
New-OrgNetwork -Name <String> [-Description <String>] -Internal -Org <Org> -NetworkPool <NetworkPool> -Gateway <IPAddress> -Netmask <IPAddress> [-DnsSuffix <String>] [-PrimaryDns <IPAddress>] [-SecondaryDns <IPAddress>] [-StaticIPPool <IPRangeList>] [-Server <CIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]
New-OrgNetwork -Name <String> [-Description <String>] -Routed -Org <Org> -ExternalNetwork <ExternalNetwork> -NetworkPool <NetworkPool> -Gateway <IPAddress> -Netmask <IPAddress> [-DnsSuffix <String>] [-PrimaryDns <IPAddress>] [-SecondaryDns <IPAddress>] [-StaticIPPool <IPRangeList>] [-Server <CIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-OrgNetwork
Remove-OrgNetwork
Set-OrgNetwork

Detailed Description

This cmdlet creates a new organization network on a vCloud Director server. Note: This cmdlet is only available to Provider Administrators.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Description | String | Specifies a description for the organization network that you want to create. | false | false |
Direct | SwitchParameter | Indicates that you want to create an organization network that is connected directly to an external network. | true | false |
DnsSuffix | String | Specifies the DNS suffix of the organization network that you want to create. | false | false |
ExternalNetwork | ExternalNetwork | Specifies the external network to which the organization network connects. This parameter is mandatory when the Direct or Routed parameter is specified. | true | true (ByValue) |
Gateway | IPAddress | Specifies the gateway of the organization network that you want to create. | true | false |
Internal | SwitchParameter | Indicates that you want to create an internal organization network. | true | false |
Name | String | Specifies a name for the organization network that you want to create. | true | false |
Netmask | IPAddress | Specifies the network mask of the organization network that you want to create. | true | false |
NetworkPool | NetworkPool | Specifies the network pool that allocates network resources for the organization network that you want to create. This parameter is mandatory when the Internal or Routed parameter is specified. | true | true (ByValue) |
Org | Org | Specifies the organization for which you want to create the organization network. | true | true (ByValue) |
PrimaryDns | IPAddress | Specifies the primary DNS of the organization network that you want to create. | false | false |
Routed | SwitchParameter | Indicates that you want to create a routed organization network. | true | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
SecondaryDns | IPAddress | Specifies the secondary DNS of the organization network that you want to create. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
StaticIPPool | IPRangeList | Specifies a range of static IP addresses that the organization network will allocate to virtual machines. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created OrgNetwork object

Notes

You can run this cmdlet only against vCloud Director 1.5.x environments.

Examples

-------------- Example 1 --------------

New-OrgNetwork -Direct -Name 'MyOrgDirectNetwork' -Org 'MyOrganization' -ExternalNetwork 'MyExternalNetwork' -Description "The network has direct connection to the internet. Do not store sensitive data on the virtual machines connected to the network."

Creates a new organization network that is directly connected to the specified external network.

-------------- Example 2 --------------

New-OrgNetwork -Internal -Name 'MyOrgInternalNetwork' -Org 'MyOrganization' -NetworkPool 'MyNetworkPool' -Gateway "192.166.10.10" -PrimaryDns "192.166.10.1" -Netmask "255.255.255.0" -Description "The network has no internet connection."

Creates a new internal organization network with a specified gateway, primary DNS, and network mask.

-------------- Example 3 --------------

New-OrgNetwork -Routed -Name 'MyOrgRoutedOrgNetwork' -Org 'MyOrg' -ExternalNetwork 'MyExternalNetwork' -NetworkPool 'MyNetworkPool' -Gateway "192.166.10.10" -PrimaryDns "192.166.10.1" -Netmask "255.255.255.0" -StaticIPPool "192.166.10.2-192.166.10.5" -Description "This network is secured with NAT routing. Network traffic can be monitored. The virtual machines connected to this organization network are protected from malware."

Creates a new routed organization network with a specified gateway, primary DNS, network mask, and a range of static IP addresses that will be allocated to the virtual machines in the network.


New-OrgVdc - vCloud Snapin Cmdlets Reference

New-OrgVdc

Synopsis

This cmdlet creates an organization virtual datacenter (vDC).

Syntax

New-OrgVdc [-Name] <String> -AllocationModelAllocationPool -CpuAllocationGHz <Double> [-Description <String>] -MemoryAllocationGB <Decimal> [-NetworkPool <NetworkPool>] -Org <Org> -ProviderVdc <ProviderVdc> [-Server <CIServer[]>] -StorageAllocationGB <Decimal> [-WhatIf] [-Confirm] [<CommonParameters>]
New-OrgVdc [-Name] <String> -AllocationModelPayAsYouGo [-Description <String>] [-NetworkPool <NetworkPool>] -Org <Org> -ProviderVdc <ProviderVdc> [-Server <CIServer[]>] [-StorageAllocationGB <Decimal>] -VMCpuCoreMHz <Int64> [-WhatIf] [-Confirm] [<CommonParameters>]
New-OrgVdc [-Name] <String> -AllocationModelReservationPool -CpuAllocationGHz <Double> [-Description <String>] -MemoryAllocationGB <Decimal> [-NetworkPool <NetworkPool>] -Org <Org> -ProviderVdc <ProviderVdc> [-Server <CIServer[]>] -StorageAllocationGB <Decimal> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Remove-OrgVdc
Get-OrgVdc
Set-OrgVdc

Detailed Description

This cmdlet creates an organization virtual datacenter (vDC). You can configure resource allocation for the organization vDC by specifying an allocation model and by configuring CPU, memory and storage allocation.
The organization vDC is created using a default configuration.
* VMMaxCount is set to 100.
* NetworkMaxCount is set to 1024.
* The vDC is automatically enabled.
* Thin provisioning is disabled.
* Fast provisioning is disabled.
* NicMaxCount is set to $null (unlimited).
When you set the AllocationModelAllocationPool parameter, by default MemoryGuaranteedPercent is set to 100 and CpuGuaranteedPercent is set to 0.
When you set the AllocationModelPayAsYouGo parameter, by default MemoryGuaranteedPercent is set to 100 and CpuGuaranteeedPercent is set to 0.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies a name for the organization vDC that you want to create. | true | false |
AllocationModelAllocationPool | SwitchParameter | Specifies that you want to use the Allocation Pool resource allocation model. The allocation model determines how and when the provider vDC compute and memory resources that you allocate are committed to the organization vDC. | true | false |
AllocationModelPayAsYouGo | SwitchParameter | Specifies that you want to use the Pay As You Go resource allocation model. The allocation model determines how and when the provider vDC compute and memory resources that you allocate are committed to the organization vDC. | true | false |
AllocationModelReservationPool | SwitchParameter | Specifies that you want to use the Reservation Pool resource allocation model. The allocation model determines how and when the provider vDC compute and memory resources that you allocate are committed to the organization vDC. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
CpuAllocationGHz | Double | Specifies the CPU resources in gigahertz (GHz) that you want to allocate to the organization vDC. | true | false |
Description | String | Specifies a description for the organization vDC that you want to create. | false | false |
MemoryAllocationGB | Decimal | Specifies the memory resources in gigabytes (GB) that you want to allocate to the organization vDC. | true | false |
NetworkPool | NetworkPool | Specifies a network pool that your organization vDC will have access to. | false | false |
Org | Org | Specifies the organization for which you want to create an organization vDC. | true | true (ByValue) |
ProviderVdc | ProviderVdc | Specifies the provider vDC that would provide the resources for your organization vDC. | true | true (ByValue) |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
StorageAllocationGB | Decimal | Specifies the storage resources in gigabytes (GB) that you want to allocate to the organization vDC. Note: To ensure backward compatibility, PowerCLI provides limited support for this parameter against vCloud Director 5.1 environments. When you develop new scripts for vCloud Director 5.1 environments, do not use this parameter. | true | false |
VMCpuCoreMHz | Int64 | Specifies a vCPU speed in megahertz (MHz). This value defines what a virtual machine with one vCPU will consume at maximum when running within this organization vDC. A virtual machine with two vCPUs would consume a maximum of twice this value. | true | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created OrgVdc object

Notes

Examples

-------------- Example 1 --------------

New-OrgVdc `
-AllocationModelAllocationPool `
-CpuAllocationGHz 2 `
-Description "Org VDC for org1" `
-MemoryAllocationGB 20 `
-Name "myOrgVdc1" `
-Org "organization1" `
-ProviderVdc "myProviderVdc" `
-StorageAllocationGB "100" `
-NetworkPool 'largeNetworkPool

Creates a new organization vDC using the Allocation Pool resource allocation model.

-------------- Example 2 --------------

New-OrgVdc `
-AllocationModelPayAsYouGo `
-Description "Org VDC for org1" `
-VMCpuCoreMHz 2 `
-Name "myPayAsYouGoOrgVdc" `
-Org "organization1" `
-ProviderVdc "myProviderVdc1" `
-StorageAllocationGB 100 `
-NetworkPool 'largeNetworkPool'

Creates a new organization vDC using the Pay As You Go resource allocation model.

-------------- Example 3 --------------

New-OrgVdc `
-AllocationModelReservationPool `
-CpuAllocationGHz 2 `
-Description "Org VDC for org1" `
-MemoryAllocationGB 20
-Name "myReservationPoolOrgVdc" `
-Org "organization1" `
-ProviderVdc "myProviderVdc1" `
-StorageAllocationGB 100 `
-NetworkPool 'largeNetworkPool'

Creates a new organization vDC using the Reservation Pool resource allocation model.


New-OSCustomizationNicMapping - vSphere PowerCLI Cmdlets Reference

New-OSCustomizationNicMapping

Synopsis

This cmdlet adds NIC settings mappings to the specified OS customization specifications.

Syntax

New-OSCustomizationNicMapping -OSCustomizationSpec <OSCustomizationSpec[]> [-Server <VIServer[]>] [-IpMode <OSCustomizationIPMode>] [-VCApplicationArgument <String>] [[-IpAddress] <String>] [[-SubnetMask] <String>] [[-DefaultGateway] <String>] [-AlternateGateway <String>] [[-Dns] <String[]>] [-Wins <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-OSCustomizationNicMapping -OSCustomizationSpec <OSCustomizationSpec[]> [-NetworkAdapterMac <String[]>] [-Server <VIServer[]>] [-IpMode <OSCustomizationIPMode>] [-VCApplicationArgument <String>] [[-IpAddress] <String>] [[-SubnetMask] <String>] [[-DefaultGateway] <String>] [-AlternateGateway <String>] [[-Dns] <String[]>] [-Wins <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-OSCustomizationNicMapping -OSCustomizationSpec <OSCustomizationSpec[]> [-Position <Int32[]>] [-Server <VIServer[]>] [-IpMode <OSCustomizationIPMode>] [-VCApplicationArgument <String>] [[-IpAddress] <String>] [[-SubnetMask] <String>] [[-DefaultGateway] <String>] [-AlternateGateway <String>] [[-Dns] <String[]>] [-Wins <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-OSCustomizationNicMapping
Set-OSCustomizationNicMapping

Detailed Description

This cmdlet adds NIC settings mappings to the specified OS customization specifications. If the given specification is server-side, it is updated on the server. If it is client-side, the reference that is kept in-memory is updated but the variable that is passed to the cmdlet is not modified.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
IpAddress | String | Specifies an IP address. Using this parameter automatically sets the IpMode parameter to UseStaticIp. | false | false |
SubnetMask | String | Specifies a subnet mask. | false | false |
DefaultGateway | String | Specifies a default gateway. | false | false |
Dns | String[] | Specifies a DNS address. This parameter applies only to Windows operating systems. | false | false |
AlternateGateway | String | Specifies an alternate gateway. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
IpMode | OSCustomizationIPMode | Specifies the IP configuration mode. The valid values are UseDhcp, PromptUser, UseVCApplication, and UseStaticIP. | false | false | UseDhcp
NetworkAdapterMac | String[] | Specifies the MAC addresses of the network adapters to which you want to map the new OS customization specifications. | false | false |
OSCustomizationSpec | OSCustomizationSpec[] | Specifies the OS customization specification to which you want to add the NIC setting mapping. | true | true (ByValue) |
Position | Int32[] | Specifies the position of the NIC to which you want to map the OS customization specification. | false | false | last
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VCApplicationArgument | String | Specifies an optional argument you want to pass to the vCenter Server to obtain an IP address. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |
Wins | String[] | Specifies WINS servers. This parameter applies only to Windows operating systems. | false | false |

Return Type

The one or more newly created OSCustomizationNicMapping objects

Notes

Examples

-------------- Example 1 --------------

New-OSCustomizationNicMapping -OSCustomizationSpec $spec -IpMode UseStaticIP -IPAddress 10.0.0.1 -SubnetMask 255.255.255.0 -DefaultGateway 10.0.0.253 -DnsServer 10.0.0.253

Creates a new NIC mapping for the OS customization spec stored in $spec.


New-OSCustomizationSpec - vSphere PowerCLI Cmdlets Reference

New-OSCustomizationSpec

Synopsis

This cmdlet creates a new OS customization specification.

Syntax

New-OSCustomizationSpec [-OSType <String>] [-Server <VIServer[]>] [-Name <String>] [-Type <OSCustomizationSpecType>] [-DnsServer <String[]>] [-DnsSuffix <String[]>] [-Domain <String>] [-NamingScheme <String>] [-NamingPrefix <String>] [-Description <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-OSCustomizationSpec -OSCustomizationSpec <OSCustomizationSpec> [-Server <VIServer[]>] [-Name <String>] [-Type <OSCustomizationSpecType>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-OSCustomizationSpec -FullName <String> -OrgName <String> [-OSType <String>] [-ChangeSid] [-DeleteAccounts] [-Server <VIServer[]>] [-Name <String>] [-Type <OSCustomizationSpecType>] [-DnsServer <String[]>] [-DnsSuffix <String[]>] [-GuiRunOnce <String[]>] [-AdminPassword <String>] [-TimeZone <String>] [-AutoLogonCount <Int32>] [-Domain <String>] [-Workgroup <String>] [-DomainCredentials <PSCredential>] [-DomainUsername <String>] [-DomainPassword <String>] [-ProductKey <String>] [-NamingScheme <String>] [-NamingPrefix <String>] [-Description <String>] [-LicenseMode <LicenseMode>] [-LicenseMaxConnections <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-OSCustomizationSpec
Set-OSCustomizationSpec

Detailed Description

This cmdlet creates a new OS customization specification or clones an existing one. If a name is provided, creates and adds the specified customization specification to the server. Otherwise, creates and returns the requested specification object. If the Name parameter is not specified, the OSCustomizationSpec object is not persisted on the server. Either the Domain or the Workgroup parameters should be provided if a Windows specification is created. If a Linux specification is created, the Domain parameter is mandatory. New-OSCustomizationSpec automatically creates a default NIC mapping.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
AdminPassword | String | Specifies a new OS administrator's password. This parameter applies only to Windows operating systems. | false | false
AutoLogonCount | Int32 | Specifies the number of times the virtual machine automatically logs in as administrator without prompting for user credentials. The valid values are in the range between 0 and Int32.MaxValue. Specifying 0 disables auto log-on. This parameter applies only to Windows operating systems. | false | false | 0
ChangeSid | SwitchParameter | Indicates that the customization should modify the system security identifier (SID). This parameter applies only to Windows operating systems. | false | false
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
DeleteAccounts | SwitchParameter | Indicates that you want to delete all user accounts. This parameter applies only to Windows operating systems. | false | false
Description | String | Provides a description for the new specification. | false | false | empty string
DnsServer | String[] | Specifies the DNS server settings. This parameter applies only to Linux operating systems. | false | false
DnsSuffix | String[] | Specifies the DNS suffix settings. This parameter applies only to Linux operating systems. | false | false
Domain | String | Specifies a domain name. | false | false | empty string
DomainCredentials | PSCredential | Specifies the credentials you want to use for domain authentication. This parameter applies only to Windows operating systems. | false | false
DomainPassword | String | Specifies the password you want to use for domain authentication. This parameter applies only to Windows operating systems. | false | false
DomainUsername | String | Specifies the user name you want to use for domain authentication. This parameter applies only to Windows operating systems. | false | false
FullName | String | Specifies the administrator's full name. This parameter applies only to Windows operating systems. | true | false
GuiRunOnce | String[] | Specifies a list of commands. These commands run when a user logs in for the first time after the customization completes. This parameter applies only to Windows operating systems. | false | false
LicenseMaxConnections | Int32 | Specifies the maximum connections for server license mode. Use this parameter only if the LicenseMode parameter is set to Perserver. This parameter applies only to Windows operating systems. | false | false | $null
LicenseMode | LicenseMode | Specifies the license mode of the Windows 2000/2003 guest operating system. The valid values are Perseat, Perserver, and Notspecified. If Perserver is set, use the LicenseMaxConnection parameter to define the maximum number of connections. This parameter applies only to Windows operating systems. | false | false | Notspecified
Name | String | Specifies a name for the new specification. | false | false
NamingPrefix | String | Depends on the customization naming scheme - Custom, NamingPrefix, or Prefix. If the "Custom" naming scheme is used, NamingPrefix is an optional argument that is passed to the utility for this IP address. The meaning of this field is user-defined in the script. If the "Fixed" naming scheme is used, NamingPrefix should indicate the name of the virtual machine. If the "Prefix" naming scheme is selected, NamingPrefix indicates the prefix to which a unique number is appended. | false | false | empty string
NamingScheme String Specifies the naming scheme for the virtual machine. The following values are valid:

Custom - Specifies that vCenter Server will launch an external application to generate the (hostname/IP). The command line for this application must be specified in the server configuration file (vpxd.cfg) in the vpxd/name-ip-generator key.

Fixed - Specifies that the name is fixed.

Prefix - Specifies that a unique name should be generated by concatenating the base string with a number. Virtual machine names are unique across the set of hosts and virtual machines known to the vCenter Server system. vCenter Server tracks the network names of virtual machines as well as hosts. VMware Tools runs in a guest operating system and reports information to vCenter Server, including the network name of the guest.

Vm - Specifies that vCenter Server should generate a virtual machine name from a base prefix comprising the virtual machine entity name. A number is appended, if necessary, to make it unique. Virtual machine names are unique across the set of hosts and virtual machines known to the vCenter Server system. VMware Tools reports the names of existing virtual machines. 		false false Vm
OrgName | String | Specifies the name of the organization to which the administrator belongs. | true | false
OSCustomizationSpec | OSCustomizationSpec | Specifies an OS customization specification that you want to clone. | true | true (ByValue)
OSType | String | Specifies the type of the operating system. The valid values are Linux and Windows. | false | false | Windows
ProductKey | String | Specifies the MS product key. If the guest OS version is earlier than Vista, this parameter is required in order to make the customization unattended. For Vista or later, the OS customization is unattended no matter if the ProductKey parameter is set. | false | false | empty string
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | true (ByValue)
TimeZone String Specifies the name or ID of the time zone for a Windows guest OS only. Using wildcards is supported. The following time zones are available:

000 Int'l Dateline
001 Samoa
002 Hawaii
003 Alaskan
004 Pacific
010 Mountain (U.S. and Canada)
015 U.S. Mountain: Arizona
020 Central (U.S. and Canada)
025 Canada Central
030 Mexico
033 Central America
035 Eastern (U.S. and Canada)
040 U.S. Eastern: Indiana (East)
045 S.A. Pacific
050 Atlantic (Canada)
055 S.A. Western
056 Pacific S.A.
060 Newfoundland
065 E. South America
070 S.A. Eastern
073 Greenland
075 Mid-Atlantic
080 Azores
083 Cape Verde Islands
085 GMT (Greenwich Mean Time)
090 GMT Greenwich
095 Central Europe
100 Central European
105 Romance
110 W. Europe
113 W. Central Africa
115 E. Europe
120 Egypt
125 EET (Helsinki, Riga, Tallinn)
130 EET (Athens, Istanbul, Minsk)
135 Israel: Jerusalem
140 S. Africa: Harare, Pretoria
145 Russian
150 Arab
155 E. Africa
160 Iran
165 Arabian
170 Caucasus Pacific (U.S. and Canada)
175 Afghanistan
180 Russia Yekaterinburg
185 W. Asia
190 India
193 Nepal
195 Central Asia
200 Sri Lanka
201 N. Central Asia
203 Myanmar: Rangoon
205 S.E. Asia
207 N. Asia
210 China
215 Singapore
220 Taipei
225 W. Australia
227 N. Asia East
230 Korea: Seoul
235 Tokyo
240 Sakha Yakutsk
245 A.U.S. Central: Darwin
250 Central Australia
255 A.U.S. Eastern
260 E. Australia
265 Tasmania
270 Vladivostok
275 W. Pacific
280 Central Pacific
285 Fiji
290 New Zealand
300 Tonga 		false false
Type | OSCustomizationSpecType | Specifies the type of the OS customization specification. The valid values are Persistent and NonPersistent. | false | false
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false
Workgroup | String | Specifies a workgroup. This parameter applies only to Windows operating systems. | false | false | empty string

Return Type

The newly created OSCustomizationSpec object

Notes

When the ProductKey parameter is not specified, the OS customization is una ttended only if the Windows guest operating system version is Vista or late r. This cmdlet is supported only in 32-bit PowerCLI mode.

Examples

-------------- Example 1 --------------

New-OSCustomizationSpec -Name Spec -OSType Windows -FullName Administrator -OrgName Organization -NamingScheme Fixed -NamingPrefix Computer -ProductKey "xxxx-xxxx" -LicenseMode PerSeat -Workgroup Workgroup -ChangeSid

Generates a new SID for the machine and sets the name of the machine to "Computer".

-------------- Example 2 --------------

New-OSCustomizationSpec -Name Spec -OSType Windows -Description "This spec adds a computer in a domain." -FullName Administrator -OrgName Organization -NamingScheme Fixed -NamingPrefix "Computer" -ProductKey "xxxx-xxxx" -LicenseMode Perserver -LicenseMaxConnections 30 -AdminPassword pass -Domain Domain -DomainUsername Root -DomainPassword pass

Creates a customization specification that adds a computer in the domain named "Domain".


New-ResourcePool - vSphere PowerCLI Cmdlets Reference

New-ResourcePool

Synopsis

This cmdlet creates a new resource pool.

Syntax

New-ResourcePool -Location <VIContainer> -Name <String> [-CpuExpandableReservation [<Boolean>]] [-CpuLimitMhz <Int64>] [-CpuReservationMhz <Int64>] [-CpuSharesLevel <SharesLevel>] [-MemExpandableReservation [<Boolean>]] [-MemLimitMB <Int64>] [-MemLimitGB <Decimal>] [-MemReservationMB <Int64>] [-MemReservationGB <Decimal>] [-MemSharesLevel <SharesLevel>] [-NumCpuShares <Int32>] [-NumMemShares <Int32>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-ResourcePool
Move-ResourcePool
Remove-ResourcePool
Set-ResourcePool

Detailed Description

This cmdlet creates a new resource pool with the provided inputs on the location that is specified by the Location parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
CpuExpandableReservation | Boolean | Indicates that the CPU reservation can grow beyond the specified value if the parent resource pool has unreserved resources. | false | false |
CpuLimitMhz | Int64 | Specifies a CPU usage limit in MHz. Utilization will not exceed this limit even if there are available resources. | false | false |
CpuReservationMhz | Int64 | Specifies the CPU size in MHz that is guaranteed to be available. | false | false |
CpuSharesLevel | SharesLevel | Specifies the CPU allocation level for this pool. This property is used in relative allocation between resource consumers. The valid values are Custom, High, Low, and Normal. | false | false | Normal
Location | VIContainer | Specifies a container object (ResourcePool, Cluster, or VMHost) where you want to place the new resource pool. If a host or a cluster is specified for the Location parameter, the resource pool is created in the "Resources" resource pool. The "Resources" resource pool is a system resource pool and is guaranteed to exist. | true | true (ByValue) |
MemExpandableReservation | Boolean | If the value is $true, the memory reservation can grow beyond the specified value if the parent resource pool has unreserved resources. | false | false |
MemLimitGB | Decimal | Specifies a memory usage limit in gigabytes (GB). If this parameter is set, utilization will not exceed the specified limit even if there are available resources. | false | false |
MemLimitMB | Int64 | This parameter is obsolete. Use MemLimitGB instead. Specifies a memory usage limit in megabytes (MB). If this parameter is set, utilization will not exceed the specified limit even if there are available resources. | false | false |
MemReservationGB | Decimal | Specifies the guaranteed available memory in gigabytes (GB). | false | false |
MemReservationMB | Int64 | This parameter is obsolete. Use MemReservationGB instead. Specifies the guaranteed available memory in megabytes (MB). | false | false |
MemSharesLevel | SharesLevel | Specifies the memory allocation level for this pool. This property is used in relative allocation between resource consumers. The valid values are Custom, High, Low, and Normal. | false | false | Normal
Name | String | Specifies a name for the new resource pool. | true | false |
NumCpuShares | Int32 | Specifies the CPU allocation level for this pool. This property is used in relative allocation between resource consumers. This parameter is ignored unless the CpuSharesLevel parameter is set to Custom. | false | false |
NumMemShares | Int32 | Specifies the memory allocation level for this pool. This property is used in relative allocation between resource consumers. This parameter is ignored unless the MemSharesLevel parameter is set to Custom. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created ResourcePool object

Notes

Examples

-------------- Example 1 --------------

$resourcepool1 = Get-ResourcePool -Location Cluster -Name ResourcePool1

New-ResourcePool -Location $resourcepool1 -Name ResourcePool2 -CpuExpandableReservation $true -CpuReservationMhz 500 -CpuSharesLevel high -MemExpandableReservation $true -MemReservationGB 5 -MemSharesLevel high

Creates a new resource pool named ResourcePool2 in the cluster's root resource pool ResourcePool1.


New-ScsiController - vSphere PowerCLI Cmdlets Reference

New-ScsiController

Synopsis

This cmdlet creates a new SCSI controller.

Syntax

New-ScsiController [-HardDisk] <HardDisk[]> [[-Type] <ScsiControllerType>] [[-BusSharingMode] <ScsiBusSharingMode>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-ScsiController
Set-ScsiController

Detailed Description

This cmdlet creates a new SCSI controller.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
HardDisk | HardDisk[] | Specifies the hard disks you want to attach to the new SCSI controller. | true | true (ByValue) |
Type | ScsiControllerType | Specifies the type of the SCSI controller. The valid values are ParaVirtual, VirtualBusLogic, VirtualLsiLogic, and VirtualLsiLogicSAS. | false | false |
BusSharingMode | ScsiBusSharingMode | Specifies the bus sharing mode of the SCSI controller. The valid values are NoSharing, Physical, and Virtual. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The one or more newly created ScsiController objects

Notes

Examples

-------------- Example 1 --------------

$vm = Get-VM VM | New-HardDisk -CapacityKB 10485760 | New-ScsiController

Creates a new 10GB hard disk and a new SCSI controller with default values for the BusSharingMode and Type properties.

-------------- Example 2 --------------

$disk = Get-HardDisk -VM VM | Select -First 2

New-ScsiController -HardDisk $disk -BusSharingMode Physical -Type VirtualLsiLogicSAS

Creates for the first two hard disks of VM a new SCSI controller of VirtualLsiLogicSAS type and with Physical bus sharing mode.


New-Snapshot - vSphere PowerCLI Cmdlets Reference

New-Snapshot

Synopsis

This cmdlet creates a new snapshot of a virtual machine.

Syntax

New-Snapshot [-VM] <VirtualMachine[]> [-Name] <String> [-Description <String>] [-Memory] [-Quiesce] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Snapshot
Remove-Snapshot
Set-Snapshot

Detailed Description

This cmdlet creates a new snapshot of a virtual machine with the provided inputs.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines you want to snapshot. | true | true (ByValue) |
Name | String | Specifies a name for the new snapshot. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Description | String | Provide a description of the new snapshot. | false | false |
Memory | SwitchParameter | If the value is $true and if the virtual machine is powered on, the virtual machine's memory state is preserved with the snapshot. | false | false |
Quiesce | SwitchParameter | If the value is $true and the virtual machine is powered on, VMware Tools are used to quiesce the file system of the virtual machine. This assures that a disk snapshot represents a consistent state of the guest file systems. If the virutal machine is powered off or VMware Tools are not available, the Quiesce parameter is ignored. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The one or more newly created Snapshot objects

Notes

Examples

-------------- Example 1 --------------

New-Snapshot -VM VM -Name BeforePatch

Creates a new snapshot of the VM virtual machine named BeforePatch.


New-StatInterval - vSphere PowerCLI Cmdlets Reference

New-StatInterval

Synopsis

This cmdlet creates a statistics interval with the specified parameters.

Syntax

New-StatInterval [-Name] <String> [-SamplingPeriodSecs] <Int32> [-StorageTimeSecs] <Int32> [[-Server] <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Stat
Get-StatType
Get-StatInterval
Remove-StatInterval
Set-StatInterval

Detailed Description

This cmdlet creates a statistics interval with the specified parameters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies a name for the new statistics interval. | true | false |
SamplingPeriodSecs | Int32 | Specifies a sampling period in seconds. | true | false |
StorageTimeSecs | Int32 | Specifies the length of time (in seconds) that the statistics information is kept in the database. | true | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created StatInterval object

Notes

Creation of statistics intervals is not supported on vCenter Server and ESX later than 2.0.

Examples

-------------- Example 1 --------------

New-StatInterval -Name Minute -SamplingPeriodSecs 60 -StorageTimeSecs 600

Creates a new statistics interval named Minute. Note that creating statistics intervals is allowed only on VirtualCenter 2.0.


New-TagAssignment - vSphere PowerCLI Cmdlets Reference

New-TagAssignment

Synopsis

This cmdlet assigns the specified tag to the specified entity.

Syntax

New-TagAssignment [-Tag] <Tag> [-Entity] <VIObjectCore> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Tag
Get-TagAssignment
Remove-TagAssignment

Detailed Description

This cmdlet assigns the specified tag to the specified entity.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Tag | Tag | Specifies the tag to be assigned to the entity. | true | false |
Entity | VIObjectCore | Specifies the object on which to assign the specified tag. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

One or more TagAssignment objects

Notes

Works only with vCenter Server 5.1 or later.

Examples

-------------- Example 1 --------------

$myTag = Get-Tag "MyTag"
Get-VM "*MyVM*" | New-TagAssignment -Tag $myTag

Assigns the "MyTag" tag to all virtual machines whose name contains the "*MyVM*" wildcard pattern.


New-Template - vSphere PowerCLI Cmdlets Reference

New-Template

Synopsis

This cmdlet creates a new virtual machine template.

Syntax

New-Template [-VM] <VirtualMachine> [-Name] <String> [-Location] <VIContainer> [-Datastore <StorageResource>] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]
New-Template [[-Name] <String>] [-Location <VIContainer>] [-VMHost <VMHost>] [-Datastore <StorageResource>] [-DiskStorageFormat <VirtualDiskStorageFormat>] -Template <Template> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]
New-Template [[-Name] <String>] [-Location <VIContainer>] -VMHost <VMHost> [-TemplateFilePath] <String> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Template
Remove-Template
Set-Template

Detailed Description

This cmdlet creates a new template based on the specified virtual machine.
You can also create a new template by cloning an existing one. You can also register an existing template to the vCenter Server inventory.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies a name for the new template. | true | false |
TemplateFilePath | String | Specifies the datastore path to the file you want to use to register the new template. | true | false |
VM | VirtualMachine | Specifies the virtual machine from which you want to create the new template. | true | true (ByValue) |
Location | VIContainer | Specifies the location where you want to place the new template. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Datastore | StorageResource | Specifies the datastore or the datastore cluster where you want to store the new template. | false | false |
DiskStorageFormat | VirtualDiskStorageFormat | Specifies the disk storage format of the new template. This parameter accepts Thin, Thick, and EagerZeroedThick values. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Template | Template | Specifies a template you want to clone. | true | true (ByValue) |
VMHost | VMHost | Specifies the host where you want to create the new template. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created Template object

Notes

Examples

-------------- Example 1 --------------

$myVM = Get-VM -Name "MyVM1"
$drsCluster=Get-DatastoreCluster "MyDatastoreCluster"
New-Template -VM $myVM -Name "MyTemplate" -Datastore $drsCluster -Location Datacenter2

Creates a template named MyTemplate from the MyVM1 virtual machine and stores it in the MyDatastoreCluster datastore cluster in the Datacenter2 datacenter.

-------------- Example 2 --------------

$myFolder = Get-Folder -Name "MyFolder1"
New-Template -Name "MyTemplate1" -TemplateFilePath "[Storage1] templatefolder/template.vmtx" -Location $myFolder -VMHost (Get-VMHost)

Registers the existing MyTemplate1 template to a vCenter Server inventory folder by using the specified template file.

-------------- Example 3 --------------

$myTemplate = Get-Template -Name "MyTemplate1"
$myDs = Get-Datastore -Name "MyDatastore1"
New-Template -Template $myTemplate -Name "MyTemplate2" -Datastore $myDs -Location "Datacenter2"

Creates the MyTemplate2 template by cloning an existing template and stores the new template in the specified datastore in the Datacenter2 datacenter.


New-VApp - vSphere PowerCLI Cmdlets Reference

New-VApp

Synopsis

This creates a new vApp.

Syntax

New-VApp -Location <VIContainer> [-Name] <String> [-CpuExpandableReservation [<Boolean>]] [-CpuLimitMhz <Int64>] [-CpuReservationMhz <Int64>] [-CpuSharesLevel <SharesLevel>] [-MemExpandableReservation [<Boolean>]] [-MemLimitMB <Int64>] [-MemLimitGB <Decimal>] [-MemReservationMB <Int64>] [-MemReservationGB <Decimal>] [-MemSharesLevel <SharesLevel>] [-NumCpuShares <Int32>] [-NumMemShares <Int32>] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]
New-VApp -Location <VIContainer> [[-Name] <String>] -VApp <VApp> [-VMHost <VMHost>] [-Datastore <Datastore>] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Export-VApp
Get-VApp
Import-VApp
Remove-VApp
Set-VApp
Start-VApp
Stop-VApp
Move-VApp

Detailed Description

This creates a new vApp.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies a name for the new vApp. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
CpuExpandableReservation | Boolean | Indicates that the CPU reservation can grow beyond the specified value if there are available resources. | false | false |
CpuLimitMhz | Int64 | Specifies a CPU usage limit in MHz. Utilization will not exceed this limit even if there are available resources. | false | false |
CpuReservationMhz | Int64 | Specifies the CPU size in MHz that is guaranteed to be available. | false | false |
CpuSharesLevel | SharesLevel | Specifies the CPU allocation level for this vApp. This property is used in relative allocation between resource consumers. The valid values are Custom, High, Low, and Normal. | false | false |
Datastore | Datastore | Specifies the datastore where you want to store the copied vApp. If you do not specify a datastore, the cmdlet takes the first datastore of the host or cluster. | false | false |
Location | VIContainer | Specifies a VApp, ResourcePool, VMHost, or Cluster object where you want to place the new vApp. | true | true (ByValue) |
MemExpandableReservation | Boolean | If the value is $true, the memory reservation can grow beyond the specified value if there are available resources. | false | false |
MemLimitGB | Decimal | Specifies a memory usage limit in gigabytes (GB). If this parameter is set, utilization will not exceed the specified limit even if there are available resources. | false | false |
MemLimitMB | Int64 | This parameter is obsolete. Use MemLimitGB instead. Specifies a memory usage limit in megabytes (MB). If this parameter is set, utilization will not exceed the specified limit even if there are available resources. | false | false |
MemReservationGB | Decimal | Specifies the guaranteed available memory in gigabytes (GB). | false | false |
MemReservationMB | Int64 | This parameter is obsolete. Use MemReservationGB instead. Specifies the guaranteed available memory in megabytes (MB). | false | false |
MemSharesLevel | SharesLevel | Specifies the memory allocation level for this vApp. This property is used in relative allocation between resource consumers. The valid values are Custom, High, Low, and Normal. | false | false |
NumCpuShares | Int32 | Specifies the CPU allocation level for this vApp. This property is used in relative allocation between resource consumers. This parameter is ignored unless the CpuSharesLevel parameter is set to Custom. | false | false |
NumMemShares | Int32 | Specifies the memory allocation level for this vApp. This property is used in relative allocation between resource consumers. This parameter is ignored unless the MemSharesLevel parameter is set to Custom. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the Center Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VApp | VApp | Specifies a vApp you want to copy. | true | true (ByValue) |
VMHost | VMHost | Specifies the host where you want to run the copied vApp. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created VApp object

Notes

Examples

-------------- Example 1 --------------

New-VApp -Name MyVApp1 -CpuLimitMhz 4000 -CpuReservationMhz 1000 -Location MyVMHost1

Creates a new vApp on the MyVMHost1 host.


New-VDPortgroup - vSphere PowerCLI Cmdlets Reference

New-VDPortgroup

Synopsis

This cmdlet creates distributed port groups.

Syntax

New-VDPortgroup [-VDSwitch] <VDSwitch> -Name <String> [-Notes <String>] [-NumPorts <Int32>] [-VlanId <Int32>] [-VlanTrunkRange <VlanRangeList>] [-PortBinding <DistributedPortGroupPortBinding>] [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-VDPortgroup [-VDSwitch] <VDSwitch> [-Name <String>] -BackupPath <String> [-KeepIdentifiers] [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-VDPortgroup [-VDSwitch] <VDSwitch> [-Name <String>] -ReferencePortgroup <VDPortgroup> [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VDPortgroup
Set-VDPortgroup
Remove-VDPortgroup
Export-VDPortgroup

Detailed Description

This cmdlet creates distributed port groups. You can create a new distributed port group with custom properties, specify a reference port group to clone its properties, or provide a backup profile to import the port group configuration.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VDSwitch | VDSwitch | Specifies the vSphere distributed switch on which you want to create the new distributed port group. | true | true (ByValue) |
BackupPath | String | Specifies the full file path to the .zip file containing the backup configuration that you want to import. Only .zip files created with the Export-VDPortgroup cmdlet are supported. Note: This parameter is supported only on vSphere 5.1 and later. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
KeepIdentifiers | SwitchParameter | Indicates that the original vSphere distributed port group identifiers will be preserved. Note: This parameter is supported only on vSphere 5.1 and later. | false | false |
Name | String | Specifies the name of the new distributed port group that you want to create. | true | false |
Notes | String | Specifies a description for the new distributed port group that you want to create. | false | false |
NumPorts | Int32 | Specifies the number of ports that the distributed port group will have. If you do not set this parameter, the number of ports for the new distributed port group is set to 128 ports. | false | false |
PortBinding | DistributedPortGroupPortBinding | Specifies the port binding setting for the distributed port group that you want to create. This parameter accepts Static, Dynamic, and Ephemeral values. Note: Dynamic port binding is deprecated. For better performance, static port binding is recommended. | false | false | Static
ReferencePortgroup | VDPortgroup | Specifies a reference distributed port group. The properties of the new distributed port group will be cloned from the reference distributed port group. Note: This parameter is supported only on vSphere 5.1 and later. | true | true (ByValue) |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VlanId | Int32 | Specifies the VLAN ID of the distributed port group that you want to create. Valid values are integers in the range of 1 to 4094. | false | false |
VlanTrunkRange | VlanRangeList | Specifies the VLAN trunk range for the distributed port group that you want to create. Valid values are strings representing ranges of IDs. For example, "1-4, 6, 8-9". | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created VDPortgroup object

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitch -Name "MyVDSwitch" | New-VDPortgroup -Name "MyVDPortGroup" -NumPorts 8 -VLanId 4

Creates a new distributed port group on the specified vSphere distributed switch with the specified number of ports and VLAN ID.

-------------- Example 2 --------------

$myReferncePortroup = Get-VDPortgroup -Name "MyReferencePortGroup"
Get-VDSwitch -Name "MyVDSwitch" | New-VDPortgroup -Name "MyVDPortGroup" -ReferencePortgroup $myReferncePortroup

Creates a new distributed port group on the specified vSphere distributed switch by cloning the configuration of the distributed port group named "MyReferencePortGroup".

-------------- Example 3 --------------

Get-VDSwitch -Name "MyVDSwitch" | New-VDPortgroup -Name "MyVDPortGroup" -RunAsync

Creates asynchronously a new distributed port group on the specified vSphere distributed switch.

-------------- Example 4 --------------

$myBackupFilePath = 'c:\Backup.zip'
Get-VDSwitch -Name "MyVDSwitch" | New-VDPortgroup -Name "MyVDPortgroup" -BakupPath $myBackupFilePath

Creates a new distributed port group on the specified vSphere distributed switch by importing the specified backup profile.

-------------- Example 5 --------------

Get-VDSwitch -Name "MyVDSwitch" | New-VDPortgroup -Name "MyVDPortGroup" -VlanTrunkRange "1-5, 10-20"

Creates a new distributed port group on the specified vSphere distributed switch with the specified name and VLAN trunk range settings.


New-VDSwitch - vSphere PowerCLI Cmdlets Reference

New-VDSwitch

Synopsis

This cmdlet creates vSphere distributed switches.

Syntax

New-VDSwitch [-ContactDetails <String>] [-ContactName <String>] [-LinkDiscoveryProtocol <LinkDiscoveryProtocol>] [-LinkDiscoveryProtocolOperation <LinkDiscoveryOperation>] [-MaxPorts <Int32>] [-Mtu <Int32>] [-Notes <String>] [-NumUplinkPorts <Int32>] [-Version <String>] -Name <String> -Location <VIContainer> [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-VDSwitch -ReferenceVDSwitch <VDSwitch> -Name <String> -Location <VIContainer> [-WithoutPortGroups] [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-VDSwitch -BackupPath <String> [-KeepIdentifiers] [-Name <String>] -Location <VIContainer> [-WithoutPortGroups] [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VDSwitch
Remove-VDSwitch
Set-VDSwitch
Export-VDSwitch
Unknown

Detailed Description

This cmdlet creates vSphere distributed switches. You can create a new vSphere distributed switch with custom properties, specify a reference vSphere distributed switch to clone its configuration, or provide a backup profile to import the switch configuration.

Note: Creating vSphere distributed switches from a reference switch or a backup profile requires vCenter Server 5.1 or later.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
BackupPath | String | Specifies the full file path to the .zip file containing the backup configuration that you want to import. Only .zip files created with the Export-VDSwitch cmdlet are supported. Note: This parameter is supported only on vSphere 5.1 and later. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
ContactDetails | String | Specifies the contact details of the vSphere distributed switch administrator. | false | false |
ContactName | String | Specifies the name of the vSphere distributed switch administrator. | false | false |
KeepIdentifiers | SwitchParameter | Indicates that the original vSphere distributed switch and port group identifiers will be preserved. You cannot specify this parameter, when the Name parameter is specified. Note: This parameter is supported only on vSphere 5.1 and later. | false | false |
LinkDiscoveryProtocol | LinkDiscoveryProtocol | Specifies the discovery protocol type of the vSphere distributed switch that you want to create. This parameter accepts CDP and LLDP values. If you do not set a value for this parameter, the default server setting is used. | false | false |
LinkDiscoveryProtocolOperation | LinkDiscoveryOperation | Specifies the link discovery protocol operation for the vSphere distributed switch that you want to create. This parameter accepts Advertise, Listen, Both, and Disabled values. If you do not set a value for this parameter, the default server setting is used. | false | false |
Location | VIContainer | Specifies the location where you want to create the vSphere distributed switch. This parameter accepts Datacenter and Folder objects. Note: You cannot create distributed port groups with identical names in the same location. If you want to import or clone a vSphere distributed switch with its distributed port groups, you need to specify a location that does not contain identically named distributed port groups. | true | false |
MaxPorts | Int32 | Specifies the maximum number of ports allowed on the vSphere distributed switch that you want to create. | false | false |
Mtu | Int32 | Specifies the maximum MTU size for the vSphere distributed switch that you want to create. Valid values are positive integers only. | false | false |
Name | String | Specifies a name for the new vSphere distributed switch that you want to create. You cannot specify this parameter, when the KeepIdentifiers parameter is specified. | true | false |
Notes | String | Specifies a description for the vSphere distributed switch that you want to create. | false | false |
NumUplinkPorts | Int32 | Specifies the number of uplink ports on the vSphere distributed switch that you want to create. | false | false |
ReferenceVDSwitch | VDSwitch | Specifies a reference vSphere distributed switch. The properties of the new vSphere distributed switch will be cloned from the reference vSphere distributed switch. Note: This parameter is supported only on vSphere 5.1 and later. | true | true (ByValue) |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Version | String | Specifies the version of the vSphere distributed switch that you want to create. This parameter accepts 4.0, 4.1.0, 5.0.0, and 5.1.0 values. You cannot specify a version that is incompatible with the version of the vCenter Server system you are connected to. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |
WithoutPortGroups | SwitchParameter | Indicates that the new vSphere distributed switch will be created without importing the port groups from the specified backup file or reference vSphere distributed switch. | false | false |

Return Type

The newly created VDSwitch object

Notes

Examples

-------------- Example 1 --------------

$myDatacenter = Get-Datacenter -Name "MyDatacenter"
New-VDSwitch -Name "MyVDSwitch" -Location $myDatacenter -LinkDiscoveryProtocol "LLDP" -LinkDiscoveryProtocolOperation "Listen" -MaxPorts 256 -Version "5.0.0"

Creates a new vSphere distributed switch with the specified name, version, maximum number of ports, and link discovery protocol settings in the specified datacenter.

-------------- Example 2 --------------

$myFolder = Get-Folder -Name "MyFolder"
Get-VDSwitch -Name "MyReferenceSwitch" | New-VDSwitch -Name "MyVDSwitch" -Location $myFolder -WithoutPortGroups

Creates a new vSphere distributed switch by cloning the configuration of the existing vSphere distributed switch named "MyReferenceSwitch". The new vSphere distributed switch is created without cloning the existing port groups and is stored in the specified folder.

-------------- Example 3 --------------

$myFolder = Get-Folder -Name "MyFolder"
New-VDSwitch -Name "MyVDSwitch" -Location $myFolder -WithoutPortGroups -BackupPath "c:\MyDistributedSwitchProfile.zip"

Creates a new vSphere distributed switch by importing the specified backup profile.


New-VDSwitchPrivateVlan - vSphere PowerCLI Cmdlets Reference

New-VDSwitchPrivateVlan

Synopsis

This cmdlet creates private VLAN configuration entries on a vSphere distributed switch.

Syntax

New-VDSwitchPrivateVlan [-VDSwitch] <VDSwitch> -PrimaryVlanId <Int32> -SecondaryVlanId <Int32> -PrivateVlanType <PrivateVlanType> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet creates private VLAN configuration entries on a vSphere distributed switch.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VDSwitch | VDSwitch | Specifies the vSphere distributed switch on which to create a private VLAN configuration. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
PrimaryVlanId | Int32 | Specifies the primary VLAN ID. The VLAN IDs of 0 and 4095 are reserved and cannot be used. | true | false |
PrivateVlanType | PrivateVlanType | Specifies the private VLAN port type: community, isolated, or promiscuous. | true | false |
SecondaryVlanId | Int32 | Specifies the secondary VLAN ID. The VLAN IDs of 0 and 4095 are reserved and cannot be used. | true | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created VDSwitchPrivateVlan object

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitch "MyVDSwitch" | New-VDSwitchPrivateVlan -PrimaryVlanId 1 -SecondaryVlanId 1 -PrivateVlanType Promiscuous

Creates a private VLAN inside a specific vSphere distributed switch with a promiscuous VLAN port type.


New-VICredentialStoreItem - vSphere PowerCLI Cmdlets Reference

New-VICredentialStoreItem

Synopsis

This cmdlet creates a new entry in the credential store.

Syntax

New-VICredentialStoreItem [-Host] <String> [-User] <String> [[-Password] <String>] [[-File] <String>] [<CommonParameters>]

Related Commands

Online version
Get-VICredentialStoreItem
Remove-VICredentialStoreItem

Detailed Description

This cmdlet creates a new entry in the credential store. If there is an existing entry for the specified host and user, it is overwritten. If the credential store file does not exist, it is created (along with its directory if needed). If no file is specified, the item is created in the default credential store file %APPDATA%\VMware\credstore\vicredentials.xml. Credential store items for vCloud Director servers must contain user name and organization in the following format: user_name:organization_name, where both names are lower-cased.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Host | String | Specifies the host for which you want to create the new credentials item. | true | false |
User | String | Specifies a user name. | true | false |
Password | String | Specifies a password. | false | false |
File | String | Specifies a file path where you want to store the new credentials. | false | false |

Return Type

The newly created VICredentialStoreItem object

Notes

Examples

-------------- Example 1 --------------

New-VICredentialStoreItem -Host 192.168.1.10 -User Admin -Password pass

Adds a new item in the default credential store file.


New-VIPermission - vSphere PowerCLI Cmdlets Reference

New-VIPermission

Synopsis

This cmdlet creates new permissions on the specified inventory objects for the provided users and groups in the role.

Syntax

New-VIPermission [-Entity] <VIObject[]> [-Principal] <VIAccount[]> [-Role] <Role> [-Propagate [<Boolean>]] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VIPermission
Remove-VIPermission
Set-VIPermission
Get-VIPrivilege
Get-VIRole
New-VIRole
Remove-VIRole
Set-VIRole

Detailed Description

This cmdlet creates new permissions on the specified inventory objects for the provided users and groups in the role. By default, new permissions are propagated down the hierarchy to sub-entities. You cannot create new permissions for the following objects:
- direct child folders of a datacenter
- root resource pools of clusters and standalone hosts.
These objects always inherit the permissions of their parent.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Principal | VIAccount[] | Specifies users and groups to which you want to apply the new permissions. If you specify principal names by using the "domain\name" syntax, wildcards are not supported. | true | false |
Role | Role | Specifies the roles for which you want to create new permissions. | true | false |
Entity | VIObject[] | Specifies the inventory objects for which you want to create new permissions. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Propagate | Boolean | Indicates that you want to propagate the new permissions to the child inventory objects. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The one or more newly created Permission objects

Notes

You can specify permissions to a datastore only on vSphere 4.0 and later.

Examples

-------------- Example 1 --------------

New-VIRole -Name Role -Server $server -Privilege (Get-VIPrivilege -PrivilegeGroup)

$permission = New-VIPermission -Role Role -Principal Administrator -Entity (Get-Datacenter)

Creates a permission on the provided server for a role with the specified privileges.


New-VIProperty - vSphere PowerCLI Cmdlets Reference

New-VIProperty

Synopsis

This cmdlet creates a new extension property on the specified object type.

Syntax

New-VIProperty [-Name] <String> [-ObjectType] <String[]> [-Value] <ScriptBlock> [-Force] [-BasedOnExtensionProperty <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-VIProperty [-Name] <String> [-ObjectType] <String[]> [-Force] [-ValueFromExtensionProperty] <String> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VIProperty
Remove-VIProperty

Detailed Description

This cmdlet creates a new extension property on the specified object type. Changes take effect upon the next retrieval of the corresponding objects.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies a name for the new extension property. Names are case-sensitive and can include only letters, numbers, and the underscore symbol. The name of a property must start with a letter or underscore. | true | false |
ObjectType | String[] | Specifies the object types to which you want to append the new property. All PowerCLI object types are supported. | true | false |
Value | ScriptBlock | Specifies a script block you want to use to compute the value of the new extended property. | true | false |
ValueFromExtensionProperty | String | Specifies a string that maps a property of the $this.ExtensionData object. This parameter is case-sensitive. | true | false |
BasedOnExtensionProperty | String[] | Specifies a list of strings that maps the properties of the $this.ExtensionData object. Use this parameter to specify which members of ExtensionData are used by the script block provided for the Value parameter. This parameter is case-sensitive. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Force | SwitchParameter | Indicates that you want to create the new property even if another property with the same name exists for the specified object type. This parameter is not applicable for core properties of an object type. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created VIProperty object

Notes

In PowerShell 2.0, errors in evaluating values of new properties are not di splayed. You can find information about these errors in the $Error environm ent variable.

Examples

-------------- Example 1 --------------

New-VIProperty -ObjectType VirtualMachine -Name CommittedSpaceMB -Value { $vm = $args[0]; $sum = 0; $vm.ExtensionData.Storage.PerDatastoreUsage | foreach { $sum += $_.Committed} ; $sum = [int]($sum / 1024 / 1024); return $sum }

Get-VM | select Name, CommittedSpaceMB

Creates a script-based property for the VirtualMachine object type that calculates the committed space of a virtual machine.

-------------- Example 2 --------------

New-VIProperty -ObjectType VirtualMachine -Name CommittedSpaceMB -Value { $vm = $args[0]; $sum = 0; $vm.ExtensionData.Storage.PerDatastoreUsage | foreach { $sum += $_.Committed} ; $sum = [int]($sum / 1024 / 1024); return $sum } -BasedOnExtensionProperty 'Storage.PerDatastoreUsage.Committed' -Force

Get-VM | select Name, CommittedSpaceMB

Creates a property that calculates the committed space of a virtual machine. The cmdlet uses the BasedOnExtensionProperty parameter to specify which ExtensionData member is used by the script block. This mean that during the creation of each virtual machine, only the specified property of extension data - Storage.PerDatastoreUsage.Committed will be filled up.

-------------- Example 3 --------------

New-VIProperty -ObjectType VirtualMachine -Name CommittedSpace -ValueFromExtensionProperty 'SUM Storage.PerDatastoreUsage.Committed'

Creates a new property that calculates the committed storage based on the property and aggregation function SUM specified by the ValueFromExtensionProperty parameter.

-------------- Example 4 --------------

New-VIProperty -ObjectType InventoryItem -Name OverallStatus -ValueFromExtensionProperty 'OverallStatus'

Get-VM | select Name, OverallStatus

Get-VMHost | select Name, OverallStatus

Creates a new property based on the OverallStatus property for all inventory types.

-------------- Example 5 --------------

New-VIProperty -ObjectType VIObjectCore -Value { if ( $args[0].UId -match "/VIserver=[\w]+@(.*):.*" ) { $matches[1] } else { " } } -Name VIServerName

Get-Inventory | select Name, VIServerName

Creates a script-based property to VIObjectCore that parses the UId property and extracts the name of the server to which a given object belongs.


New-VIRole - vSphere PowerCLI Cmdlets Reference

New-VIRole

Synopsis

This cmdlet creates a new role on the specified servers and applies the provided privileges.

Syntax

New-VIRole [-Name] <String> [[-Privilege] <Privilege[]>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VIRole
Remove-VIRole
Set-VIRole
Get-VIPrivilege
Get-VIPermission
New-VIPermission
Remove-VIPermission
Set-VIPermission

Detailed Description

This cmdlet creates a new role on the specified servers and applies the provided privileges.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies a name for the new role. | true | false |
Privilege | Privilege[] | Specifies the privileges you want to apply to the new role. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created Role object

Notes

Examples

-------------- Example 1 --------------

New-VIRole -Name Role -Privilege (Get-VIPrivilege -PrivilegeGroup)

Creates a new role with the provided group privileges.


New-VirtualPortGroup - vSphere PowerCLI Cmdlets Reference

New-VirtualPortGroup

Synopsis

This cmdlet creates a new port group on the specified host.

Syntax

New-VirtualPortGroup [-Name] <String> [-VirtualSwitch] <VirtualSwitch> [-VLanId <Int32>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Remove-VirtualPortGroup
Set-VirtualPortGroup
Get-VirtualPortGroup

Detailed Description

This cmdlet creates a new port group on the host using the provided parameters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies a name for the new port group. | true | false |
VirtualSwitch | VirtualSwitch | Specifies the virtual switch for which you want to create a new port group. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VLanId | Int32 | Specifies the VLAN ID for ports using this port group. The following values are valid: 0 - specifies that you do not want to associate the port group with a VLAN. 1 to 4094 - specifies a VLAN ID for the port group. 4095 - specifies that the port group should use trunk mode, which allows the guest operating system to manage its own VLAN tags. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created VirtualPortGroup object

Notes

Examples

-------------- Example 1 --------------

$vswitch =  New-VirtualSwitch -VMHost 10.23.114.234 -Name VSwitch

$vportgroup =  New-VirtualPortGroup -VirtualSwitch $vswitch  -Name VPortGroup

Creates a virtual port group named VPortGroup on the virtual switch VSwitch.


New-VirtualSwitch - vSphere PowerCLI Cmdlets Reference

New-VirtualSwitch

Synopsis

This cmdlet creates a new virtual switch.

Syntax

New-VirtualSwitch [-VMHost] <VMHost> [-Name] <String> [[-NumPorts] <Int32>] [[-Nic] <PhysicalNic[]>] [[-Mtu] <Int32>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VirtualSwitch

Detailed Description

This cmdlet creates a new virtual switch on the host that is specified by the VMHost parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost | Specifies the host on which you want to create the new virtual switch. | true | true (ByValue) |
Name | String | Specifies a name for the new virtual switch. | true | false |
NumPorts | Int32 | Specifies the virtual switch port number. The value is rounded to the closest exact power of two that is greater than the given number (for example, if the user specifies 67, this number is rounded to 128). The value range is between 1 and 1024. Note that the port number displayed in the vSphere Client might differ from the value that you specified for the NumPorts parameter. Note: In ESX 5.5 or later, standard virtual switches are always elastic, so the NumPorts parameter is no longer applicable and its value is ignored. | false | false |
Nic | PhysicalNic[] | Specifies the physical network interface cards you want to add to the Active NICs of the new virtual switch. This parameter accepts both objects and strings. | false | false |
Mtu | Int32 | Specifies the maximum transmission unit (MTU) associated with the specified virtual switch (in bytes). The MTU value is always greater than 0. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created VirtualSwitch object

Notes

NumPorts are at least as many as the user specified. (The server rounds it up to the closest exact power of two, greater than the given number) The MTU field is only available on VPX 2.5 and ESX 3.5. For older VPX vers ions, this field is expected to be null.

Examples

-------------- Example 1 --------------

$vswitch =  New-VirtualSwitch -VMHost 10.23.112.234 -Name VSwitch

Creates a new virtual switch named VSwitch on the virtual machine host with IP address 10.23.112.234.

-------------- Example 2 --------------

$network = Get-VMHostNetwork -VMHost 10.23.112.234

$phNic = $network.PhysicalNic[0].DeviceName

$vswitch = New-VirtualSwitch -VMHost 10.23.112.234 -Name VSwitch -Nic $phNic

Creates a new virtual switch named VSwitch on the virtual machine host with IP address 10.23.112.234 with a physical network adapter.

-------------- Example 3 --------------

Get-VMHost *.128 | New-VirtualSwitch -Name VSwitch -Nic vmnic5,vmnic6

Create a virtual switch named VSwitch with two physical network adapters - 'vmnic5' and 'vmnic6'. Note that the 'vmnic5' and 'vmnic6' adapters must not be assigned to other virtual switches.


New-VM - vSphere PowerCLI Cmdlets Reference

New-VM

Synopsis

This cmdlet creates a new virtual machine.

Syntax

New-VM [-AdvancedOption <AdvancedOption[]>] [[-VMHost] <VMHost>] [-Version <VMVersion>] -Name <String> [-ResourcePool <VIContainer>] [-VApp <VApp>] [-Location <Folder>] [-Datastore <StorageResource>] [-DiskMB <Int64[]>] [-DiskGB <Decimal[]>] [-DiskPath <String[]>] [-DiskStorageFormat <VirtualDiskStorageFormat>] [-MemoryMB <Int64>] [-MemoryGB <Decimal>] [-NumCpu <Int32>] [-Floppy] [-CD] [-GuestId <String>] [-AlternateGuestName <String>] [-NetworkName <String[]>] [-Portgroup <VirtualPortGroupBase[]>] [-HARestartPriority <HARestartPriority>] [-HAIsolationResponse <HAIsolationResponse>] [-DrsAutomationLevel <DrsAutomationLevel>] [-VMSwapfilePolicy <VMSwapfilePolicy>] [-Server <VIServer[]>] [-RunAsync] [-Notes <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-VM [-AdvancedOption <AdvancedOption[]>] [[-VMHost] <VMHost>] -Name <String> [-ResourcePool <VIContainer>] [-VApp <VApp>] [-Location <Folder>] [-Datastore <StorageResource>] [-Template] <Template> [-DiskStorageFormat <VirtualDiskStorageFormat>] [-OSCustomizationSpec <OSCustomizationSpec>] [-HARestartPriority <HARestartPriority>] [-HAIsolationResponse <HAIsolationResponse>] [-DrsAutomationLevel <DrsAutomationLevel>] [-Server <VIServer[]>] [-RunAsync] [-Notes <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-VM [-AdvancedOption <AdvancedOption[]>] [[-VMHost] <VMHost>] [-Name <String>] [-ResourcePool <VIContainer>] [-VApp <VApp>] [-Location <Folder>] [-Datastore <StorageResource>] [-DiskStorageFormat <VirtualDiskStorageFormat>] [-OSCustomizationSpec <OSCustomizationSpec>] [-HARestartPriority <HARestartPriority>] [-HAIsolationResponse <HAIsolationResponse>] [-DrsAutomationLevel <DrsAutomationLevel>] [-LinkedClone] [-ReferenceSnapshot <Snapshot>] [-Server <VIServer[]>] [-RunAsync] [-Notes <String>] -VM <VirtualMachine[]> [-WhatIf] [-Confirm] [<CommonParameters>]
New-VM [[-VMHost] <VMHost>] [-Name <String>] [-ResourcePool <VIContainer>] [-VApp <VApp>] [-Location <Folder>] [-HARestartPriority <HARestartPriority>] [-HAIsolationResponse <HAIsolationResponse>] [-DrsAutomationLevel <DrsAutomationLevel>] -VMFilePath <String> [-Server <VIServer[]>] [-RunAsync] [-Notes <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VM
Move-VM
Remove-VM
Set-VM
Start-VM
Stop-VM
Suspend-VM
Restart-VM

Detailed Description

This cmdlet creates a new virtual machine with the provided parameters. The network adapter and the SCSI adapter of the new virtual machine are created of the recommended type for the OS that is specified by the GuestId parameter. If the OSCustomizationSpec parameter is used, the virtual machine is customized according to the spec. You must specify values for at least one of the ResourcePool, VMHost, and VApp parameters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost | Specifies the host on which you want to create the new virtual machine. | false | true (ByValue)
Template | Template | Specifies the virtual machine template you want to use for the creation of the new virtual machine. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. | true | true (ByValue)
AdvancedOption AdvancedOption[] Specifies advanced options for creating virtual machines. Accepts only SdrsVMDiskAntiAffinityRule and SdrsVMAntiAffinityRule objects.

The SdrsVMDiskAntiAffinityRule defines a Storage DRS intra-VM anti-affinity rule (vm disk anti-affinity rule). It is only applicable when creating a virtual machine or hard disk on a datastore cluster. An instance of the object is created by invoking its constructor. There are two constructors - "public SdrsVMDiskAntiAffinityRule(param string[] diskIdentifier)" and "public SdrsVMDiskAntiAffinityRule(param HardDisk[] disk)". For the first constructor, "diskIdentifier" can be either the disk key or the index of the disk in the disk array. The specified disks (and the disk to which the rule is applied) are placed in an anti-affinity rule on a DatastoreCluster. Only one such rule is supported per a virtual machine. You can pass the instance to the AdvancedOption parameter of the New-VM or New-HardDisk cmdlets.

The SdrsVMAntiAffinityRule defines a Storage DRS inter-VM anti-affinity rule. It is only applicable when creating a virtual machine on a DatastoreCluster. An instance of the object is created by invoking its constructor. The constructor has one parameter - an array of virtual machines - "public SdrsVMAntiAffinityRule(param VirtualMachine[] vm)". Then, you can pass the instance to the AdvancedOption parameter of the New-VM cmdlet. This will place the new virtual machine and the virtual machines specified in the constructor in an inter-VM anti-affinity rule on a DatastoreCluster.

The SDRS functionality is experimental. 		false false
AlternateGuestName | String | Specifies the full OS name of the new virtual machine. Use this parameter if the GuestID parameter is set to otherGuest or otherGuest64. | false | false
CD | SwitchParameter | Indicates that you want to add a CD drive to the new virtual machine. | false | false
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Datastore | StorageResource | Specifies the datastore where you want to place the new virtual machine. If a DatastoreCluster is passed to the Datastore parameter, the virtual machine is placed in the DatastoreCluster in an automated SDRS mode and with enabled intra-VM affinity rule (unless another rule is specified). You can specify a SDRS rule when creating the virtual machine in a DatastoreCluster by passing either a SdrsVMDiskAntiAffinityRule or SdrsVMAntiAffinityRule objects to the AdvancedOption parameter. These two rules are mutually exclusive. | false | false
DiskGB | Decimal[] | Specifies the size in gigabytes (GB) of the disks that you want to create and add to the new virtual machine. | false | false
DiskMB Int64[] This parameter is obsolete. Use DiskGB instead.
Specifies the size in megabytes (MB) of the disks that you want to create and add to the new virtual machine. 		false false 4096
DiskPath | String[] | Specifies paths to virtual disks you want to add to the new virtual machine. | false | false
DiskStorageFormat | VirtualDiskStorageFormat | Specifies the storage format of the disks of the virtual machine. This parameter accepts Thin, Thick, and EagerZeroedThick values. | false | false
DrsAutomationLevel | DrsAutomationLevel | Specifies a DRS (Distributed Resource Scheduler) automation level. The valid values are FullyAutomated, Manual, PartiallyAutomated, AsSpecifiedByCluster, and Disabled. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. Specifying this parameter is only supported when the virtual machine is inside a cluster. Otherwise, an error is generated. | false | false
Floppy | SwitchParameter | Indicates that you want to add a floppy drive to the new virtual machine. | false | false
GuestId | String | Specifies the guest operating system of the new virtual machine. The valid values for specific ESX versions are listed in the description of the VirtualMachineGuestOsIdentifier enumeration type in the vSphere API Reference available at http://www.vmware.com/support/developer/vc-sdk/. Depending on the hardware configuration of the host, some of the guest operating systems might be inapplicable. | false | false
HAIsolationResponse | HAIsolationResponse | Indicates whether the virtual machine should be powered off if a host determines that it is isolated from the rest of the compute resource. The available values are AsSpecifiedByCluster, PowerOff, and DoNothing. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. Specifying this parameter is only supported when the virtual machine is inside a cluster. Otherwise, an error is generated. | false | false
HARestartPriority | HARestartPriority | Specifies the HA restart priority of the new virtual machine. The valid values are Disabled, Low, Medium, High, and ClusterRestartPriority. VMware HA is a feature that detects failed virtual machines and automatically restarts them on alternative ESX hosts. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. Specifiesing this parameter is only supported when the virtual machine is inside a cluster. Otherwise, an error is generated. | false | false
LinkedClone | SwitchParameter | Indicates that you want to create a linked clone. When you set the LinkedClone parameter, the ReferenceSnapshot parameter becomes mandatory. | false | false
Location | Folder | Specifies the folder where you want to place the new virtual machine. | false | false
MemoryGB | Decimal | Specifies the memory size in gigabytes (GB) of the new virtual machine. | false | false
MemoryMB Int64 This parameter is obsolete. Use MemoryGB instead.
Specifies the memory size in megabytes (MB) of the new virtual machine. 		false false 256
Name | String | Specifies a name for the new virtual machine. If you are registering or cloning an existing virtual machine, this parameter is not mandatory. | true | false
NetworkName | String[] | Specifies the networks to which you want to connect the new virtual machine. Specifying a distributed port group name is obsolete. Use the Portgroup parameter instead. | false | false
Notes | String | Provides a description of the new virtual machine. The alias of this parameter is Description. | false | false
NumCpu | Int32 | Specifies the number of the virtual CPUs of the new virtual machine. | false | false | 1
OSCustomizationSpec | OSCustomizationSpec | Specifies a customization specification that is to be applied to the new virtual machine. This works only in 32-bit mode. | false | false
Portgroup | VirtualPortGroupBase[] | Specifies standard or distributed port groups to which you want to connect the virtual machine. For each specified port group, a new network adapter is created. | false | false
ReferenceSnapshot | Snapshot | Specifies a source snapshot for the linked clone that you want to create. When you set the LinkedClone parameter, the ReferenceSnapshot parameter becomes mandatory. | false | false
ResourcePool | VIContainer | Specifies where you want to place the new virtual machine. The parameter accepts VMHost, Cluster, ResourcePool, and VApp objects. If no value is specified, the virtual machine is added to the resource pool of its host. | false | true (ByValue)
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false
VApp VApp This parameter is deprecated. Use the ResourcePool parameter instead.
Specifies the vApp where you want to create the new virtual machine. 		false true (ByValue)
Version | VMVersion | Specifies the version of the new virtual machine. The valid values are v4, v7, and v8. By default, the new virtual machine is created with the highest available version. | false | false
VM | VirtualMachine[] | Specifies a virtual machine to clone. | true | true (ByValue)
VMFilePath | String | Specifies a path to the virtual machine you want to register. | true | false
VMSwapfilePolicy VMSwapfilePolicy Specifies the swapfile placement policy. The following values are valid:

InHostDataStore - Stores the swapfile in the datastore specified by the VMSwapfileDatastoreID property of the virtual machine host. If the VMSwapfileDatastoreID property is not set or indicates a datastore with insufficient free space, the swapfile is stored in the same directory as the virtual machine. This setting might degrade the VMotion performance.

WithVM - Stores the swapfile in the same directory as the virtual machine. 		false false
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false

Return Type

The newly created VirtualMachine object

Notes

Applying customization specs works only in 32-bit mode.

Examples

-------------- Example 1 --------------

$myTargetVMHost = Get-VMHost -Name MyVMHost1
New-VM -Name MyVM1 -ResourcePool $myTargetVMHost -Datastore MyDatastore1 -NumCPU 2 -MemoryGB 4 -DiskGB 40 -NetworkName "VM Network" -Floppy -CD -DiskStorageFormat Thin -GuestID winNetDatacenterGuest

Creates a virtual machine by specifying a target host, a target datastore, and a network to connect to, and configures the settings for the virtual machine.

-------------- Example 2 --------------

$myCluster = Get-Cluster -Name MyCluster1
New-VM -Name MyVM1 -ResourcePool $myCluster

Creates a virtual machine by specifying a cluster. The ResourcePool parameter accepts ResourcePool, Cluster, VApp, and standalone VMHost objects.

-------------- Example 3 --------------

$vmhost = Get-VMHost -Name MyVMHost1
$myCluster = Get-Cluster -Name MyCluster1
New-VM -Name MyVM1 -VMHost $vmhost -ResourcePool $myCluster -DiskGB 4 -MemoryGB 1

Creates a virtual machine by specifying a cluster and explicitly selecting the host, instead of allowing auto-selection of a target host.

-------------- Example 4 --------------

$vmhost = Get-VMHost -Name MyVMHost1
New-VM -Name MyVM1 -ResourePool $vmhost -DiskGB 40,100

Creates a virtual machine with multiple disks.

-------------- Example 5 --------------

$vmhost = Get-VMHost -Name MyVMHost1
New-VM -Name MyVM1 -ResourcePool $vmhost -DiskPath "[Storage1] WindowsXP/WindowsXP.vmdk"

Creates a virtual machine by specifying an existing disk.

-------------- Example 6 --------------

$vmhost = Get-VMHost -Name MyVMHost1
New-VM -Name MyVM1 -ResourcePool $vmhost -Version v4

Creates a virtual machine by explicitly specifying the version of the virtual machine hardware through the Version parameter.

-------------- Example 7 --------------

$myDatastore = Get-Datastore -Name MyDatastore1
$vmhost = Get-VMHost -Name MyVMHost1
New-VM -Name MyVM2 -VM MyVM1 -Datastore $myDatastore -VMHost $vmhost

Creates a new virtual machine named MyVM2 by cloning the MyVM1 virtual machine on the specified datastore and host.

-------------- Example 8 --------------

New-VM -VM MyVM1, MyVM2 -Location MyFolder1 -VMHost MyHost1

Copies the MyVM1 and MyVM2 virtual machines to the MyFolder1 folder on the MyHost1 host.

-------------- Example 9 --------------

$myResourcePool = Get-ResourcePool -Name MyResourcePool1
$mySpecification = Get-OSCustomizationSpec -Name WindowsSpec
New-VM -VM MyVM1 -Name MyVM2 -OSCustomizationSpec $mySpecification -ResourcePool $myResourcePool

Clones the virtual machine MyVM1 to MyVM2 and applies a customization specification on the cloned virtual machine.

-------------- Example 10 --------------

$myResourcePool = Get-ResourcePool -Name MyResourcePool1
$myTemplate = Get-Template -Name WindowsTemplate
$mySpecification = Get-OSCustomizationSpec -Name WindowsSpec
New-VM -Name MyVM2 -Template $myTemplate -ResourcePool $myResourcePool -OSCustomizationSpec $mySpecification

Creates a virtual machine from the specified template and applies the specified customization specification.

-------------- Example 11 --------------

cd vmstores:\myserver@443\Datacenter\Storage1\MyVM1\
$vmxFile = Get-Item MyVM1.vmx
$vmhost = Get-VMHost -Name MyVMHost1
New-VM -VMHost $vmhost -VMFilePath $vmxFile.DatastoreFullPath

Retrieves the specified configuration file for the MyVM1 virtual machine and registers the MyVM1 virtual machine on the specified host.

-------------- Example 12 --------------

$vmhost = Get-VMHost -Name MyVMHost1
$myDatastoreCluster = Get-DatastoreCluster -Name MyStorageCluster1
New-VM -Name MyVM1 -DiskGB 40,40 -Datastore $myDatastoreCluster -ResourcePool $vmhost

Creates a virtual machine on a datastore cluster. By default, the new virtual machine has an intra-VM affinity rule.

-------------- Example 13 --------------

$vmhost = Get-VMHost -Name MyVMHost1
$myDatastoreCluster = Get-DatastoreCluster -Name MyStorageCluster1
$myAdvancedOption = New-Object 'VMware.VimAutomation.ViCore.Types.V1.DatastoreManagement.SdrsVMDiskAntiAffinityRule' 1,2
New-VM -Name MyVM1 -DiskGB 40,40,40 -Datastore $myDatastoreCluster -AdvancedOption $myAdvancedOption -ResourcePool $vmhost

Creates a virtual machine on a datastore cluster. The machine has three hard disks. For the first two disks, intra-VM anti-affinity rule is specified and they will be placed on a datastore different from the datastore cluster. Identifying the hard disk in the Intra-VM anti-affinity happens by indexing the disks starting from 1.

-------------- Example 14 --------------

$myVM1 = Get-VM -Name WindowsXP
$myResourcePool = Get-ResourcePool -Name MyResourcePool1
$myAdvancedOption = New-Object 'VMware.VimAutomation.ViCore.Types.V1.DatastoreManagement.SdrsVMAntiAffinityRule' $myVM1
$myDatastoreCluster = Get-DatastoreCluster -Name MyStorageCluster1
New-VM -Name MyVM1 -DiskGB 40,40,40 -Datastore $myDatastoreCluster -AdvancedOption $myAdvancedOption -ResourcePool $myResourcePool

Creates a virtual machine on a datastore cluster and specifies a VM anti-affinity rule between the new virtual machine and an existing virtual machine.

-------------- Example 15 --------------

$mySourceVM = Get-VM -Name MySourceVM1
$vmhost = Get-VMHost -Name MyVMHost1
$hardDiskList = Get-HardDisk -VM $vm | select -First 2
$myDatastoreCluster = Get-DatastoreCluster -Name MyStorageCluster1
$myAdvancedOption = New-Object 'VMware.VimAutomation.ViCore.Types.V1.DatastoreManagement.SdrsVMDiskAntiAffinityRule' $hardDiskList
New-VM -Name MyVM1 -VM $mySourceVM -Datastore $myDatastoreCluster -AdvancedOption $myAdvancedOption -ResourcePool $vmhost

Clones a virtual machine on a datastore cluster and specifies an intra-VM anti-affinity rule by using references to the hard disks of the source virtual machine. When you apply this rule to the AdvancedOption parameter of New-VM, the first and second disk of the new virtual machine will be placed on different datastores within the specified datastore cluster.

-------------- Example 16 --------------

$mySourceVM = Get-VM -Name MySourceVM1
$myVM1 = Get-VM -Name WindowsXP
$myAdvancedOption = New-Object 'VMware.VimAutomation.ViCore.Types.V1.DatastoreManagement.SdrsVMAntiAffinityRule' $myVM1
$myDatastoreCluster = Get-DatastoreCluster -Name MyStorageCluster1
$vmhost = Get-VMHost -Name MyVMHost1
New-VM -Name MyVM2 -VM $mySourceVM -Datastore $myDatastoreCluster -AdvancedOption $myAdvancedOption -ResourcePool $vmhost

Clones a virtual machine on a datastore cluster and specifies a VM anti-afffinity rule between the new virtual machine and an existing virtual machine. When you apply this rule to the AdvancedOption parameter of New-VM, the new virtual machine and the WindowsXP virtual machine will be placed on different datastores within the specified datastore cluster.

-------------- Example 17 --------------

$mySourceTemplate = Get-Template -Name WindowsTemplate
$myDatastoreCluster = Get-DatastoreCluster -Name MyStorageCluster
$myAdvancedOption = New-Object 'VMware.VimAutomation.ViCore.Types.V1.DatastoreManagement.SdrsVMDiskAntiAffinityRule' $hardDiskList
$vmhost = Get-VMHost -Name MyVMHost1
New-VM -Name MyVM1 -Template $mySourceTemplate -Datastore $myDatastoreCluster -AdvancedOption $myAdvancedOption -ResourcePool $vmhost

Creates a virtual machine from a template, specifies a VM anti-affinity rule, and stores the virtual machine on a specified datastore cluster.

-------------- Example 18 --------------

$vmhost = Get-VMHost -Name MyVMHost1
$myVM = Get-VM -Name WindowsXP
$mySourceTemplate = Get-Template -Name WindowsTemplate
$myDatastoreCluster = Get-DatastoreCluster -Name MyStorageCluster1
$myAdvancedOption = New-Object 'VMware.VimAutomation.ViCore.Types.V1.DatastoreManagement.SdrsVMAntiAffinityRule' $myVM
New-VM -Name VM -Template $mySourceTemplate -Datastore $myDatastoreCluster -AdvancedOption $myAdvancedOption -ResourcePool $vmhost

Creates a virtual machine from a template, specifies a VM anti-affinity rule, and stores the virtual machine on a specified datastore cluster.

-------------- Example 19 --------------

$mySourceVM = Get-VM -Name MySourceVM1
$myReferenceSnapshot = Get-Snapshot -VM $mySourceVM -Name "InitialState"
$vmhost = Get-VMHost -Name MyVMHost1
$myDatastore = Get-Datastore -Name MyDatastore1
New-VM -Name MyLinkedCloneVM1 -VM $mySourceVM -LinkedClone -ReferenceSnapshot $myReferenceSnapshot -ResourcePool $vmhost -Datastore $myDatastore

Creates a linked clone from the specified snapshot of the parent virtual machine. The linked clone is stored to the specified VM host and datastore.

-------------- Example 20 --------------

$myCluster = Get-Cluster -Name "MyCluster"
$myVDPortGroup = Get-VDPortgroup -Name "MyVDPortGroup"
$mySharedDatastore = Get-Datastore -Name "MySharedDatastore"
New-VM -Name MyVM -ResourcePool $myCluster -Portgroup $myVDPortGroup -DiskGB 40 -MemoryGB 4 -Datastore $mySharedDatastore

Creates a new virtual machine with the specified configuration and connects it to the specified distributed port group.


New-VMGuestRoute - vSphere PowerCLI Cmdlets Reference

New-VMGuestRoute

Synopsis

This cmdlet adds a new route to the routing table of the provided virtual machines and guests.

Syntax

New-VMGuestRoute [-VM <VirtualMachine[]>] [-Destination] <IPAddress> [[-Netmask] <String>] [-Gateway] <IPAddress> [-Interface <Object>] [-VMGuest <VMGuest[]>] [-Server <VIServer[]>] [-ToolsWaitSecs <Int32>] [-GuestPassword <SecureString>] [-GuestUser <String>] [-GuestCredential <PSCredential>] [-HostPassword <SecureString>] [-HostUser <String>] [-HostCredential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMGuestRoute
Remove-VMGuestRoute

Detailed Description

This cmdlet adds a new route to the routing table of the provided virtual machines and guests. The cmdlet adds only persistent routes. This cmdlet supports only Windows XP 32 SP3, Windows Server 2003 32bit SP2, Windows Server 2003 64bit SP2, Windows 7 64 bit, Windows Server 2008 R2 64bit and Redhat Enterprise 5 operating systems.

To run this cmdlet against vCenter Server/ESX/ESXi versions earlier than 5.0, you need to meet the following requirements:
*You must run the cmdlet on the 32-bit version of Windows PowerShell.
*You must have access to the ESX that hosts the virtual machine over TCP port 902.
*For vCenter Server/ESX/ESXi versions earlier than 4.1, you need VirtualMachine.Interact.ConsoleInteract privilege. For vCenter Server/ESX/ESXi 4.1 and later, you need VirtualMachine.Interact.GuestControl privilege.

To run this cmdlet against vCenter Server/ESXi 5.0 and later, you need VirtualMachine.GuestOperations.Execute and VirtualMachine.GuestOperations.Modify privileges.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Destination | IPAddress | Specifies a destination IP address for the new route. | true | false |
Netmask | String | Specifies a network mask for the new route. | false | false |
Gateway | IPAddress | Specifies a gateway for the new route. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
GuestCredential | PSCredential | Specifies a PSCredential object that contains credentials for authenticating with the guest OS. Do not use this parameter if the GuestUser and GuestPassword parameters are used. | false | false |
GuestPassword | SecureString | Specifies the password you want to use for authenticating with the guest OS. | false | false |
GuestUser | String | Specifies the user name you want to use for authenticating with the guest OS. | false | false |
HostCredential | PSCredential | Specifies a PSCredential object that contains credentials for authenticating with the host. Do not use this parameter if the HostUser and HostPassword parameters are used. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
HostPassword | SecureString | Specifies the password you want to use for authenticating with the host. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
HostUser | String | Specifies the user name you want to use for authenticating with the host. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
Interface | Object | Specifies a network interface for the new route. For Linux guest operating systems, this parameter is mandatory. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
ToolsWaitSecs | Int32 | Specifies the time in seconds to wait for a response from VMware Tools. If a non-positive value is provided, the system waits infinitely long time. | false | false |
VM | VirtualMachine[] | Specifies the virtual machines to which you want to add the new route. | false | true (ByValue) |
VMGuest | VMGuest[] | Specifies the guests to which you want to add the new route. | false | true (ByValue) |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created VMGuestRoute object

Notes

Consider that New-VMGuestRoute might behave inconsistently and create diff erent types of routes depending on the OS type - Windows or Linux. This cmdlet is experimental and might be changed or removed in a future rel ease.

Examples

-------------- Example 1 --------------

New-VMGuestRoute -GuestUser user -GuestPassword pass2 -VM $vm -Destination '192.168.100.10' -Netmask '255.255.255.255' -Gateway '10.23.112.58'

Creates a new guest route with the specified parameters.


New-VMHostAccount - vSphere PowerCLI Cmdlets Reference

New-VMHostAccount

Synopsis

This cmdlet creates a new host user or group account.

Syntax

New-VMHostAccount [-Id] <String> [-Password] <String> [-Description <String>] [-UserAccount] [-AssignGroups <String[]>] [-GrantShellAccess] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-VMHostAccount [-Id] <String> [-GroupAccount] [-AssignUsers <String[]>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Set-VMHostAccount
Get-VIAccount
Remove-VMHostAccount

Detailed Description

This cmdlet creates a new host user or group account using the provided parameters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Id | String | Specifies an ID for the new host account. | true | false |
Password | String | Specifies a password for the new host account. | true | false |
AssignGroups | String[] | If the UserAccount parameter is set to $true, use AssignGroups to specify the groups to which the newly created user belongs. | false | false |
AssignUsers | String[] | If the GroupAccount parameter is set to $true, use AssignUsers to specify the users that belong to the newly created group account. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Description | String | Provide a description of the new host account. The maximum length of the text is 255 symbols. | false | false |
GrantShellAccess | SwitchParameter | Indicates that the new account is allowed to access the ESX shell. | false | false |
GroupAccount | SwitchParameter | Indicates that the new host account is a group account. Starting with ESXi 5.1, this parameter is not supported. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. | false | true (ByValue) |
UserAccount | SwitchParameter | Indicates that the new host account is a user account. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created HostUserAccount or HostGroupAccount object

Notes

Starting with ESXi 5.1, you cannot create group host accounts.

Examples

-------------- Example 1 --------------

New-VMHostAccount -ID MyUser1 -Password MyPassword1 -UserAccount

Creates a user account with a specified user ID and password. The user account is created on the default server.

-------------- Example 2 --------------

$myUser1 = Get-VMHostAccount -ID MyUser1 -User
New-VMHostAccount -Id MyGroup1 -GroupAccount -AssignUsers $myUser1

Creates a group account with a specified ID and assigns a specified user to the group account. Starting with ESXi 5.1, you cannot create group host accounts.


New-VMHostNetworkAdapter - vSphere PowerCLI Cmdlets Reference

New-VMHostNetworkAdapter

Synopsis

This cmdlet creates a new HostVirtualNIC (Service Console or VMKernel) on the specified host.

Syntax

New-VMHostNetworkAdapter [[-VMHost] <VMHost>] [[-PortGroup] <String>] [-PortId <String>] [-VirtualSwitch] <VirtualSwitchBase> [[-IP] <String>] [[-SubnetMask] <String>] [[-Mac] <String>] [-Mtu <Int32>] [-ConsoleNic] [-VMotionEnabled [<Boolean>]] [-FaultToleranceLoggingEnabled [<Boolean>]] [-IPv6ThroughDhcp] [-AutomaticIPv6] [-IPv6 <String[]>] [-ManagementTrafficEnabled [<Boolean>]] [-VsanTrafficEnabled [<Boolean>]] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Remove-VMHostNetworkAdapter
Set-VMHostNetworkAdapter

Detailed Description

This cmdlet creates a new HostVirtualNIC (Service Console or VMKernel) on the specified host. Creates a port group with a name specified by the PortGroup parameter on the virtual switch passed through the VirtualSwitch parameter. Adds either a Console NIC if ConsoleNIC is set, or a VMKernel NIC otherwise.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost | Specifies the host to which you want to add the new adapter. This parameter is mandatory when creating a network adapter on a distributed switch. | false | true (ByValue) |
PortGroup | String | Specifies the port group to which you want to add the new adapter. If a distributed switch is passed to the VirtualSwitch parameter, an existing port group name should be specified. For standard virtual switches, if the port group is non-existent, a new port group with the specified name will be created and the new adapter will be added to the port group. | false | false |
VirtualSwitch | VirtualSwitchBase | Specifies the virtual switch to which you want to add the new network adapter. | true | false |
IP | String | Specifies an IP address for the new network adapter. All IP addresses are specified using IPv4 dot notation. If IP is not specified, DHCP mode is enabled. For VMKernel network adapters, the DHCP mode is supported only on vCenter Server 4.0, ESX 4.0, and later. | false | false |
SubnetMask | String | Specifies a subnet mask for the new network adapter. | false | false |
Mac | String | Specifies a media access control (MAC) address for the new virtual network adapter. | false | false |
AutomaticIPv6 | SwitchParameter | Indicates that the IPv6 address is obtained through a router advertisement. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
ConsoleNic | SwitchParameter | If the value is $true, indicates that you want to create a service console virtual network adapter. If the value is $false, indicates that you want to create a virtual host/VMkernel network adapter. Not supported on ESXi. | false | false |
FaultToleranceLoggingEnabled | Boolean | Indicates that the network adapter is enabled for Fault Tolerance (FT) logging. This parameter is supported only on ESX/vCenter Server 4.0 and later. | false | false |
IPv6 | String[] | Specifies multiple static addresses using the following format: <IPv6>/<subnet_prefix_length> or <IPv6>. If you skip <subnet_prefix_length>, the default value of 64 is used. | false | false |
IPv6ThroughDhcp | SwitchParameter | Indicates that the IPv6 address is obtained through DHCP. | false | false |
ManagementTrafficEnabled | Boolean | Indicates that you want to enable the network adapter for management traffic. This parameter is supported only on ESX/ESXi/vCenter Server 4.0 and later. | false | false |
Mtu | Int32 | Specifies the MTU size. This parameter is supported only on ESX/vCenter Server 4.0 and later. | false | false |
PortId | String | Specifies the port of the specified distributed switch to which you want to connect the network adapter. Use this parameter only if a distributed switch is passed to the VirtualSwitch parameter. | false | false |
Server | VIServer[] | The Server parameter is required when the host is specified by name. In this case, the host with the specified name is searched for on the specified Servers and a network adapter is added to it. If a VMHost object is passed to the VMHost parameter, the Server parameter is not used. | false | false |
VMotionEnabled | Boolean | Indicates that you want to use the new virtual host/VMKernel network adapter for VMotion. | false | false |
VsanTrafficEnabled | Boolean | Indicates that Virtual SAN traffic is enabled on this network adapter. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created HostVirtualNic object

Notes

To configure IPv6 settings, you must be working on ESX 4.0 or later and IPv 6 must be enabled on the ESX system.

Examples

-------------- Example 1 --------------

$vmhost = Get-VMHost -Name MyVMHost1
$myVirtualSwitch = Get-VirtualSwitch -VMHost $vmhost -Name MyVirtualSwitch1
New-VMHostNetworkAdapter -VMHost $vmhost -PortGroup MyVMKernelPortGroup1 -VirtualSwitch $myVirtualSwitch -Mtu 4000

Creates a VMKernel port group at the MyVirtualSwitch1 virtual switch. The IP address is obtained via DHCP.

-------------- Example 2 --------------

$vmhost = Get-VMHost -Name MyVMHost1
$myVirtualSwitch = Get-VirtualSwitch -VMHost $vmhost -Name MyVirtualSwitch1
New-VMHostNetworkAdapter -VMHost $vmhost -PortGroup MyVMKernelPortGroup1 -VirtualSwitch $myVirtualSwitch -IP 192.168.168.110 -SubnetMask 255.255.255.0

Creates a VMKernel port group at the MyVirtualSwitch1 virtual switch and assigns a static IP address.

-------------- Example 3 --------------

$vmhost = Get-VMHost -Name MyVMHost1
$myVirtualSwitch = Get-VirtualSwitch -VMHost $vmhost -Name MyVirtualSwitch1
New-VMHostNetworkAdapter -VMHost $vmhost -VirtualSwitch $myVirtualSwitch -PortGroup MyVMKernelPortGroup1 -IP 192.168.0.1 -SubnetMask 255.255.255.0 -IPv6 "0200:2342::1/32"

Creates a VMKernel NIC that has an IPv4 address and an IPv6 address.

-------------- Example 4 --------------

$vmhost = Get-VMHost -Name MyVMHost1
$myVirtualSwitch = Get-VirtualSwitch -VMHost $vmhost -Name MyVirtualSwitch1
New-VMHostNetworkAdapter -VMHost $vmhost -VirtualSwitch $myVirtualSwitch -PortGroup MyVMKernelPortGroup1 -IP 192.168.0.1 -SubnetMask 255.255.255.0 -AutomaticIPv6

Creates a VMKernel NIC that obtains IPv6 automatically (by router advertisement) and takes the desired IPv4 address.

-------------- Example 5 --------------

$vmhost = Get-VMHost -Name MyVMHost1
$myVirtualSwitch = Get-VirtualSwitch -VMHost $vmhost -Name MyVirtualSwitch1
New-VMHostNetworkAdapter -VMHost $vmhost -VirtualSwitch $myVirtualSwitch -PortGroup MyVMKernelPortGroup1 -IPv6ThroughDhcp

Creates a VMKernel NIC that obtains the IPv4 and IPv6 addresses by DHCP.

-------------- Example 6 --------------

$vmhost = Get-VMHost -Name MyVMHost1
$myVirtualSwitch = Get-VirtualSwitch -VMHost $vmhost -Name MyVirtualSwitch1
New-VMHostNetworkAdapter -VMHost $vmhost -PortGroup MyConsolePortGroup1 -VirtualSwitch $myVirtualSwitch -ConsoleNic

Creates a Service Console port group at the vSwitch virtual switch. The IP address is obtained via DHCP.

-------------- Example 7 --------------

$myVMHost = Get-VMHost -Name "MyVMHost"
$myVDSwitch = Get-VDSwitch -Name "MyVDSwitch"
New-VMHostNetworkAdapter -VMHost $myVMHost -PortGroup "MyVDPortgroup" -VirtualSwitch $myVDSwitch -IP 192.168.0.50 -SubnetMask 255.255.255.0

Creates a new VMKernel network adapter and connects it to the specified port group on the specified distributed switch.

-------------- Example 8 --------------

$myVMHost = Get-VMHost -Name "MyVMHost"
$myVDSwitch = Get-VDSwitch -Name "MyVDSwitch"
New-VMHostNetworkAdapter -VMHost $myVMHost -VirtualSwitch $myVDSwitch -PortId 100 -IP 192.168.0.50 -SubnetMask 255.255.255.0

Creates a new VMKernel network adapter and connects it to a specified port on a specified distributed switch.


New-VMHostProfile - vSphere PowerCLI Cmdlets Reference

New-VMHostProfile

Synopsis

This cmdlet creates a new host profile based on a reference host.

Syntax

New-VMHostProfile [-Name] <String> [-ReferenceHost] <VMHost> [-Description <String>] [-CompatibilityMode] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Apply-VMHostProfile
Export-VMHostProfile
Get-VMHostProfile
Import-VMHostProfile
Remove-VMHostProfile
Set-VMHostProfile
Test-VMHostProfileCompliance

Detailed Description

This cmdlet creates a new host profile based on a reference host.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies a name for the new host profile. | true | false |
ReferenceHost | VMHost | Specifies the reference host, on which the new virtual machine host profile is based. | true | true (ByValue) |
CompatibilityMode | SwitchParameter | If you are connected to a vCenter Server/ESX 5.0 or later, use this parameter to indicate that you want the new profile to be compatible with hosts running ESX/vCenter Server versions earlier than 5.0. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Description | String | Provides a description for the new host profile. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | true (ByValue) |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The newly created VMHostProfile object

Notes

Examples

-------------- Example 1 --------------

$h = Get-VMHost 10.23.134.133

New-VMHostProfile -Name testProfile -Description "This is my first test profile." -ReferenceHost $h

Creates a profile based on the virtual machine host with an IP address 10.23.134.133.


New-VMHostRoute - vSphere PowerCLI Cmdlets Reference

New-VMHostRoute

Synopsis

This cmdlet creates a new route in the routing table of a host.

Syntax

New-VMHostRoute [-VMHost] <VMHost[]> -Destination <IPAddress> -Gateway <IPAddress> -PrefixLength <Int32> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostRoute
Remove-VMHostRoute
Set-VMHostRoute

Detailed Description

This cmdlet creates a new route in the routing table of a host.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the host for which you want to create a new route. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Destination | IPAddress | Specifies a destination IP address for the new route. | true | false |
Gateway | IPAddress | Specifies a gateway IP address for the new route. | true | false |
PrefixLength | Int32 | Specifies the prefix length of the destination IP address. For IPv4, the valid values are from 0 to 32, and for IPv6 - from 0 to 128. | true | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The one or more newly created VMHostRoute objects

Notes

Supported only on ESX 4.0/ vCenter Server 4.0 and later.

Examples

-------------- Example 1 --------------

New-VMHostRoute -VMHost 10.23.114.195 -Destination 192.168.103.102 -PrefixLength 32 -Gateway 10.23.84.53

Creates a route for the specified host.


Open-VMConsoleWindow - vSphere PowerCLI Cmdlets Reference

Open-VMConsoleWindow

Synopsis

This cmdlet opens a window to the virtual machine's console.

Syntax

Open-VMConsoleWindow [-VM] <RemoteConsoleVM[]> [-FullScreen] [-UrlOnly] [-Server <VIConnection[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet opens a window to the virtual machine's console. The window is opened in a Web page in the browser configured in the VMConsoleWindowBrowser setting (in Set-PowerCLIConfiguration), or in the default Web browser, if the setting is not configured.

If the default browser is not 32-bit, you must configure a 32-bit browser to be used by this cmdlet. This configuration is done through the Set-PowerCLIConfiguration cmdlet, by specifying the VMConsoleWindowBrowser setting and providing the full path to a browser's executable file. The officially supported browsers are listed on the VMware site, under the VMRC distributable (which is used to display the virtual machine's console).

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | RemoteConsoleVM[] | Specifies the virtual machines for which to open a remote console. Supports vCloud and vSphere virtual machines. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
FullScreen | SwitchParameter | If specified, opens the virtual machine console window in full screen mode. | false | false |
Server | VIConnection[] | Specifies the vCenter Server systems or cloud server instances on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
UrlOnly | SwitchParameter | If specified, the cmdlet returns the URL for opening a console window to the virtual machine, without opening the console window. Note: The URL is valid for 30 seconds. After 30 seconds, the screen authentication ticket contained in the URL expires. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

A Web browser window displaying a remote console to the specified virtual machine

Notes

The VM parameter accepts powered-on vSphere and vCloud Director virtual mac hines.

Examples

-------------- Example 1 --------------

Get-CIVM myVM | Open-VMConsoleWindow -FullScreen

Opens the console of the specified virtual machine in full screen mode.


Remove-AdvancedSetting - vSphere PowerCLI Cmdlets Reference

Remove-AdvancedSetting

Synopsis

This cmdlet removes the specified advanced setting.

Syntax

Remove-AdvancedSetting [-AdvancedSetting] <AdvancedSetting[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-AdvancedSetting
New-AdvancedSetting
Set-AdvancedSetting

Detailed Description

This cmdlet removes the specified advanced setting.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
AdvancedSetting | AdvancedSetting[] | Specifies the advanced settings you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-AdvancedSetting -Entity (Get-Cluster -Name Cluster) | Remove-AdvancedSetting -Confirm:$false

Removes the advanced settings of the cluster named Cluster.


Remove-AlarmAction - vSphere PowerCLI Cmdlets Reference

Remove-AlarmAction

Synopsis

This cmdlet removes an alarm action.

Syntax

Remove-AlarmAction [-AlarmAction] <AlarmAction[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-AlarmAction
Get-AlarmActionTrigger
Get-AlarmDefinition
New-AlarmAction
New-AlarmActionTrigger
Remove-AlarmActionTrigger
Set-AlarmDefinition

Detailed Description

This cmdlet removes an alarm action.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
AlarmAction | AlarmAction[] | Specifies the alarm actions you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-AlarmDefinition -Name "Alarm1" | Get-AlarmAction | Remove-AlarmAction -Confirm:$false

Removes all actions for an alarm definition.


Remove-AlarmActionTrigger - vSphere PowerCLI Cmdlets Reference

Remove-AlarmActionTrigger

Synopsis

This cmdlet removes the alarm action triggers.

Syntax

Remove-AlarmActionTrigger [-AlarmActionTrigger] <AlarmActionTrigger[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-AlarmAction
Get-AlarmActionTrigger
Get-AlarmDefinition
New-AlarmAction
New-AlarmActionTrigger
Remove-AlarmAction
Set-AlarmDefinition

Detailed Description

This cmdlet removes the selected alarm action triggers.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
AlarmActionTrigger | AlarmActionTrigger[] | Specifies the alarm action triggers you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-AlarmDefinition -Name "Alarm1" | Get-AlarmAction | Get-AlarmActionTrigger | select -First 1 | Remove-AlarmActionTrigger -Confirm:$false

Removes the first action trigger found for an alarm definition.


Remove-CDDrive - vSphere PowerCLI Cmdlets Reference

Remove-CDDrive

Synopsis

This cmdlet removes virtual CD drives from their locations.

Syntax

Remove-CDDrive [-CD] <CDDrive[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CDDrive
New-CDDrive
Set-CDDrive

Detailed Description

This cmdlet removes virtual CD drives from their locations.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
CD | CDDrive[] | Specifies the virtual CD drives you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

$cd = Get-CDDrive -VM $vm -Template $template

Remove-CDDrive -CD $cd

Removes all CD drives for the specified virtual machines and templates.


Remove-CIAccessControlRule - vCloud Snapin Cmdlets Reference

Remove-CIAccessControlRule

Synopsis

This cmdlet removes the specified access control rule.

Syntax

Remove-CIAccessControlRule [-AccessControlRule] <CIAccessControlRule[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIAccessControlRule
New-CIAccessControlRule
Set-CIAccessControlRule

Detailed Description

This cmdlet removes the specified access control rule.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
AccessControlRule | CIAccessControlRule[] | Specifies the access control rule that you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-CIAccessLevelRule -Entity 'MyVApp' | Remove-CIAccessControlRule

Removes all access control rules that exist for the vApp named MyVApp.


Remove-CIVApp - vCloud Snapin Cmdlets Reference

Remove-CIVApp

Synopsis

This cmdlet removes vApps from the cloud.

Syntax

Remove-CIVApp [-VApp] <CIVApp[]> [-RunAsync] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVApp
New-CIVApp
Restart-CIVApp
Set-CIVApp
Start-CIVApp
Stop-CIVApp
Suspend-CIVApp

Detailed Description

This cmdlet removes vApps from the cloud.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VApp | CIVApp[] | Specifies the vApp you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-CIVApp -Name 'MyVApp' | Remove-CIVApp

Removes the specified vApp.


Remove-CIVAppNetwork - vCloud Snapin Cmdlets Reference

Remove-CIVAppNetwork

Synopsis

This cmdlet removes the specified vApp networks if they are not in use.

Syntax

Remove-CIVAppNetwork [-VAppNetwork] <CIVAppNetwork[]> [-Server <CIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVAppNetwork
New-CIVAppNetwork
Set-CIVAppNetwork

Detailed Description

This cmdlet removes the specified vApp network if they are not in use.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VAppNetwork | CIVAppNetwork[] | Specifies the vApp networks that you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-CIVApp -Name 'MyVApp' | Get-CIVAppNetwork | Remove-CIVAppNetwork

Remove all vApp networks for the specified vApp.


Remove-CIVAppTemplate - vCloud Snapin Cmdlets Reference

Remove-CIVAppTemplate

Synopsis

This cmdlet removes the specified vApp template.

Syntax

Remove-CIVAppTemplate [-VAppTemplate] <CIVAppTemplate[]> [-RunAsync] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Import-CIVAppTemplate
New-CIVAppTemplate
Set-CIVAppTemplate
Get-CIVAppTemplate

Detailed Description

This cmdlet removes the specified vApp template.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VAppTemplate | CIVAppTemplate[] | Specifies the vApp template that you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

$ciConnection = Connect-CIServer -Server cloud.example.com -Name MyAdmin -Password MyPassword
Remove-VAppTemplate -RunAsync -VAppTemplate 'MyVApp*' -Server $ciConnection

Removes asynchronously all vApp templates with names starting with MyVApp.

-------------- Example 2 --------------

Get-CIVAppTemplate -Name 'MyTemplate' -Catalog (Get-Catalog 'MyCatalog') | Remove-CIVAppTemplate

Removes the specified template from the specified catalog


Remove-Cluster - vSphere PowerCLI Cmdlets Reference

Remove-Cluster

Synopsis

This cmdlet deletes the specified clusters.

Syntax

Remove-Cluster [-Cluster] <Cluster[]> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Cluster
Move-Cluster
New-Cluster
Set-Cluster

Detailed Description

This cmdlet deletes the specified clusters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Cluster | Cluster[] | Specifies the clusters you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

$cluster =  New-Cluster -Name Cluster -Location Datacenter

Remove-Cluster $cluster -Confirm:$false

Creates and then removes, without asking for user confirmation, the Custer cluster on the Datacenter datacenter.


Remove-CustomAttribute - vSphere PowerCLI Cmdlets Reference

Remove-CustomAttribute

Synopsis

This cmdlet removes custom attributes.

Syntax

Remove-CustomAttribute [-CustomAttribute] <CustomAttribute[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CustomAttribute
New-CustomAttribute
Set-CustomAttribute
Get-Annotation
Set-Annotation

Detailed Description

This cmdlet removes custom attributes.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
CustomAttribute | CustomAttribute[] | Specifies the custom attributes you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Remove-CustomAttribute -CustomAttribute "CompanyID", "Owner" -Server $agent007

Removes the CompanyID and Owner custom attributes from the server stored in the $agent007 variable.


Remove-CustomField - vSphere PowerCLI Cmdlets Reference

Remove-CustomField

Synopsis

This cmdlet deletes the specified custom fields for the specified type of inventory items.

Syntax

Remove-CustomField [-Entity] <InventoryItem> [-Name] <String> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
New-CustomField

Detailed Description

This cmdlet is deprecated and scheduled for removal. Deletes the specified custom fields for the specified type of inventory items.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Entity | InventoryItem | Specifies the inventory items to which the custom field you want to remove belongs. | true | true (ByValue) |
Name | String | Specifies the names of the custom fields you want to remove. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Remove-CustomField -Entity VM -Name CPUMaxLoad

Removes the custom field CPUMaxLoad from the virtual machine named VM. Asks for confirmation before running the task. The command returns the virtual machine VM, from which the custom field is removed.


Remove-Datacenter - vSphere PowerCLI Cmdlets Reference

Remove-Datacenter

Synopsis

This cmdlet removes the specified datacenters from their locations.

Syntax

Remove-Datacenter [-Datacenter] <Datacenter[]> [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Datacenter
New-Datacenter
Move-Datacenter
Set-Datacenter

Detailed Description

This cmdlet removes the specified datacenters and their children objects from their locations.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Datacenter | Datacenter[] | Specifies the datacenters you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Remove-Datacenter Datacenter

Removes the Datacenter datacenter.

-------------- Example 2 --------------

$task = Remove-Datacenter Datacenter -RunAsync

Asynchronously removes Datacenter08.


Remove-Datastore - vSphere PowerCLI Cmdlets Reference

Remove-Datastore

Synopsis

This cmdlet removes the specified datastores from their locations.

Syntax

Remove-Datastore [-Datastore] <Datastore[]> [-VMHost] <VMHost> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Datastore
New-Datastore
Set-Datastore
Move-Datastore

Detailed Description

This cmdlet removes the specified datastores from their locations. The cmdlet permanently deletes the content of the removed datastores, unless they are shared (NFS).

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Datastore | Datastore[] | Specifies the datastores you want to remove. | true | true (ByValue) |
VMHost | VMHost | Specifies the host to which the datastore you want to remove belongs. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Remove-Datastore -Datastore Datastore -VMHost 10.23.112.234 -Confirm:$false

Removes the Datastore datastore from the host.


Remove-DatastoreCluster - vSphere PowerCLI Cmdlets Reference

Remove-DatastoreCluster

Synopsis

This cmdlet deletes the specified datastore clusters.

Syntax

Remove-DatastoreCluster [-DatastoreCluster] <DatastoreCluster[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-DatastoreCluster
New-DatastoreCluster
Set-DatastoreCluster

Detailed Description

This cmdlet deletes the specified datastore clusters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
DatastoreCluster | DatastoreCluster[] | Specifies the datastore cluster that you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-DatastoreCluster -Name 'MyDatastoreCluster' | Remove-DatastoreCluster -Confirm $false

Removes the specified datastore cluster without asking for confirmation.


Remove-DeployRule - vSphere Auto Deploy Reference

Remove-DeployRule

Synopsis

Removes a rule from the working rule set.

Syntax

Remove-DeployRule [-DeployRule] <DeployRule[]> [-Delete] [-NoActivate] [<CommonParameters>]
Remove-DeployRule [-At] <UInt32> [-Delete] [-NoActivate] [<CommonParameters>]

Related Commands

Add-DeployRule

Detailed Description

Removes a rule from the working rule set. By default, the working rule set is then activated. Use the "-Delete" parameter to permanently delete the rule from the Auto Deploy server.

You must have the "AutoDeploy.RuleSet.Edit" privilege on the root folder of vCenter Server to remove a rule from the rule set and the "AutoDeploy.Rule.Delete" privilege to delete the rule.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
At | UInt32 | Index in the rule set that you want to remove. | true | false |
DeployRule | DeployRule[] | Rule to remove from the working rule set. | true | true (ByValue) |
Delete |  | Delete the rule object. This flag will permanently delete the rule from the AutoDeploy server and remove it from any RuleSets that it was in. | false | false |
NoActivate | SwitchParameter | Specify this parameter to only remove the rule to the working rule set. By default, the working rule set is activated after the change. | false | false |

Return Type

Notes

Examples

-------------- Example 1 --------------

C:\PS> Get-DeployRule "testrule" | RemoveDeployRule

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Remove-DrsRule - vSphere PowerCLI Cmdlets Reference

Remove-DrsRule

Synopsis

This cmdlet removes the specified DRS rules.

Syntax

Remove-DrsRule [-Rule] <DrsRule[]> [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-DrsRule
New-DrsRule
Set-DrsRule

Detailed Description

This cmdlet removes the specified DRS rules.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Rule | DrsRule[] | Specifies the DRS rules you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

$rules = Get-DrsRule -Cluster $cluster -Name "*Rule1*"

Remove-DrsRule $rules -Confirm:$false

Removes the DRS rules for the $cluster cluster, whose names contain "Rule1".


Remove-EsxSoftwareDepot - vSphere Imagebuilder Reference

Remove-EsxSoftwareDepot

Synopsis

Syntax

Remove-EsxSoftwareDepot [-SoftwareDepot] <SoftwareDepot[]> [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Related Commands

Detailed Description

Disconnects the current PowerCLI session from the specified software depots. Updates the $DefaultSoftwareDepots session variable. The depots and their VIBs and image profiles will no longer be available.

If you do not specify the -SoftwareDepot parameter, PowerCLI prompts for an answer. You can type in the URL of the depot you wish to disconnect from.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
SoftwareDepot | SoftwareDepot[] | (Pipeline input, prompt) Takes one of the following forms: * URL string of the depot to remove * Single instance of a SoftwareDepot object, as returned by Add-EsxSoftwareDepot * List of SoftwareDepot objects or URL strings The depot must be connected to the session. If you specify a depot that is not connected to the session, an error message results. | true | true (ByValue, ByPropertyName) |
WarningAction | ActionPreference |  | false | false |
WarningVariable | String |  | false | false |

Return Type

Notes

Examples

---------- Example 1 ----------

Add-EsxSoftwareDepot http://www.vmware.com/go/ESXi/patches/
[... do something ...]
Remove-EsxSoftwareDepot http://www.vmware.com/go/ESXi/patches/

Connect to a depot, then disconnect from it by URL.

---------- Example 2 ----------

$depot = Add-EsxSoftwareDepot http://www.vmware.com/go/ESXi/patches/
[... do something ...]
$depot | Remove-EsxSoftwareDepot

Connect to a depot, saving it to a variable, then disconnect from it later. Also an example of pipeline input.

---------- Example 3 ----------

Remove-EsxSoftwareDepot $DefaultSoftwareDepots

Disconnect from all software depots

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Remove-EsxSoftwarePackage - vSphere Imagebuilder Reference

Remove-EsxSoftwarePackage

Synopsis

Syntax

Remove-EsxSoftwarePackage [-ImageProfile] <ImageProfile> [-SoftwarePackage] <SoftwarePackage[]> [-Force] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Detailed Description

Removes existing packages from an image profile. The output of this cmdlet is an image profile object that you can pipe into any other cmdlet taking image profiles as input.

You cannot modify an image profile if its ReadOnly property is true.

ImageBuilder runs the modified image profile through all image profile validation tests. The modified image profile must have at least a boot kernel so that it can boot. You cannot remove a package if another package depends on it.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
ImageProfile | ImageProfile | (pipeline input, prompt) Specifies the image profile to edit. Takes one of the following forms: *Name of an image profile, as displayed in the Name column of Get-EsxImageProfile, or the Name property of any ImageProfile object *ImageProfile object | true | true (ByValue, ByPropertyName) |
SoftwarePackage | SoftwarePackage[] | List of software packages to remove from the profile. Specify packages that exist in the profiel. You can specify one or more SoftwarePackage objects, or strings representing package names. | true | true (ByValue, ByPropertyName) |
Confirm | SwitchParameter |  | false | false |
Force | SwitchParameter |  | false | false |
WarningAction | ActionPreference |  | false | false |
WarningVariable | String |  | false | false |
WhatIf | SwitchParameter |  | false | false |

Return Type

Notes

Examples

---------- Example 1 ----------

Remove-EsxSoftwarePackage -ImageProfile "My custom profile" -SoftwarePackage foo

Remove package foo from my custom profile:

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Remove-FloppyDrive - vSphere PowerCLI Cmdlets Reference

Remove-FloppyDrive

Synopsis

This cmdlet removes the virtual floppy drives from their locations.

Syntax

Remove-FloppyDrive [-Floppy] <FloppyDrive[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-FloppyDrive
New-FloppyDrive
Set-FloppyDrive

Detailed Description

This cmdlet removes the virtual floppy drives from their locations.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Floppy | FloppyDrive[] | Specifies the virtual floppy drives you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

$floppy = Get-FloppyDrive -VM VM

Remove-FloppyDrive -Floppy $floppy

Removes the floppy drive of the virtual machine named VM.


Remove-Folder - vSphere PowerCLI Cmdlets Reference

Remove-Folder

Synopsis

This cmdlet removes the specified folders from their locations.

Syntax

Remove-Folder [-Folder] <Folder[]> [-DeletePermanently] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Folder
Move-Folder
New-Folder
Set-Folder

Detailed Description

This cmdlet removes the specified folders and their children objects from their locations.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Folder | Folder[] | Specifies the folders you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
DeletePermanently | SwitchParameter | Indicates that you want to delete from the disk any virtual machines contained in the specified folder, and not only to remove them from the inventory. This parameter is supported only for VirtualMachine folders. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Remove-Folder -Folder "testFolder"

Removes a folder by name.

-------------- Example 2 --------------

Get-Folder -Name "testFolder" | Remove-Folder

Removes a folder by object.

-------------- Example 3 --------------

Get-Folder -Name "testFolder" | Remove-Folder -DeletePermanently

Permanently removes a folder.


Remove-HardDisk - vSphere PowerCLI Cmdlets Reference

Remove-HardDisk

Synopsis

This cmdlet removes the specified virtual hard disks.

Syntax

Remove-HardDisk [-HardDisk] <HardDisk[]> [-DeletePermanently] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Copy-HardDisk
Get-HardDisk
New-HardDisk
Set-HardDisk
Move-HardDisk

Detailed Description

This cmdlet removes the specified virtual hard disks.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
HardDisk | HardDisk[] | Specifies the hard disks you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
DeletePermanently | SwitchParameter | Indicates that you want to delete the hard disks not only from the inventory, but from the datastore as well. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-HardDisk -VM $vm | Remove-HardDisk

Removes the hard disks of the virtual machine stored in the $vm variable.


Remove-Inventory - vSphere PowerCLI Cmdlets Reference

Remove-Inventory

Synopsis

This cmdlet removes the specified inventory items from their locations.

Syntax

Remove-Inventory [-Item] <InventoryItem[]> [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Inventory
Move-Inventory

Detailed Description

This cmdlet removes the specified inventory items and their children from their locations.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Item | InventoryItem[] | Specifies the inventory items you want to remove. This parameter accepts Folder, ResourcePool, Datacenter, VirtualMachine, VMHost, Cluster, Template, and VApp objects. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-Folder Folder| Get-Inventory -NoRecursion | Remove-Inventory

Removes all objects from the Folder folder.


Remove-IScsiHbaTarget - vSphere PowerCLI Cmdlets Reference

Remove-IScsiHbaTarget

Synopsis

This cmdlet removes targets from their iSCSI HBAs.

Syntax

Remove-IScsiHbaTarget [-Target] <IScsiHbaTarget[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-IScsiHbaTarget
New-IScsiHbaTarget
Set-IScsiHbaTarget
Get-VMHostHba
Set-VMHostHba

Detailed Description

This cmdlet removes targets from their iSCSI HBAs.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Target | IScsiHbaTarget[] | Specifies the iSCSI HBA targets you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-IScsiHbaTarget -Address 10.23.84.73 -Type Send | Remove-IScsiHbaTarget

Retrieves and removes the targets of type Send on the specified address.

-------------- Example 2 --------------

Remove-IScsiHbaTarget -Target (Get-IScsiHbaTarget -Address 10.23.84.73)

Removes the specified iSCSI HBA targets.


Remove-NetworkAdapter - vSphere PowerCLI Cmdlets Reference

Remove-NetworkAdapter

Synopsis

This cmdlet removes the virtual network adapters from their locations.

Syntax

Remove-NetworkAdapter [-NetworkAdapter] <NetworkAdapter[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-NetworkAdapter
New-NetworkAdapter
Set-NetworkAdapter

Detailed Description

This cmdlet removes the virtual network adapters from their locations.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
NetworkAdapter | NetworkAdapter[] | Specifies the virtual network adapters you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

$nic = Get-NetworkAdapter -VM VM

Remove-NetworkAdapter -NetworkAdapter $nic

Removes the network adapter of the VM virtual machine.


Remove-Org - vCloud Snapin Cmdlets Reference

Remove-Org

Synopsis

This cmdlet removes the specified organization.

Syntax

Remove-Org [-Org] <Org[]> [-Force] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
New-Org
Set-Org
Get-Org

Detailed Description

This cmdlet removes the specified organization. The organization must be disabled and must not contain any child objects. To automatically disable the organization before removal, set the Force parameter. Note: This cmdlet is only availabe to Provider Administrators.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Org | Org[] | Specifies the organization that you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Force | SwitchParameter | Indicates that the organization will be removed even if it is enabled. Setting the Force parameter will automatically disable the organization if it is enabled. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false | $defaultCIServers
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-Org "MyOrg" | Remove-Org

Removes the MyOrg organization.

-------------- Example 2 --------------

Get-Org "MyEnabledOrg" | Remove-Org -Force

Removes an enabled organization by automatically disabling it before deletion.

-------------- Example 3 --------------

Remove-Org -Org "MyOrg*"

Removes all disabled organizations that have names starting with "MyOrg".


Remove-OrgNetwork - vCloud Snapin Cmdlets Reference

Remove-OrgNetwork

Synopsis

This cmdlet deletes the specified organization network.

Syntax

Remove-OrgNetwork [-OrgNetwork] <OrgNetwork[]> [-Server <CIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-OrgNetwork
New-OrgNetwork
Set-OrgNetwork

Detailed Description

This cmdlet deletes the specified organization network. Note: This cmdlet is only available to Provider Administrators.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
OrgNetwork | OrgNetwork[] | Specifies the organization network that you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-OrgNetwork -Name 'MyOrgNetwork' | Remove-OrgNetwork

Removes the specified organization network.

-------------- Example 2 --------------

Get-OrgNetwork -Name 'MyOrgNetwork' | Remove-OrgNetwork -RunAsync

Removes the specified organization network asynchronously.


Remove-OrgVdc - vCloud Snapin Cmdlets Reference

Remove-OrgVdc

Synopsis

This cmdlet removes organization virtual datacenters (vDCs).

Syntax

Remove-OrgVdc [-OrgVdc] <OrgVdc[]> [-Server <CIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-OrgVdc
New-OrgVdc
Remove-OrgVdc

Detailed Description

This cmdlet removes organization virtual datacenters (vDCs).

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
OrgVdc | OrgVdc[] | Specifies the organization vDC that you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-OrgVdc "MyOrgVdc" | Remove-OrgVdc

Removes the organization vDC named MyOrgVdc.


Remove-OSCustomizationNicMapping - vSphere PowerCLI Cmdlets Reference

Remove-OSCustomizationNicMapping

Synopsis

This cmdlet removes the specified OS customization NIC mappings.

Syntax

Remove-OSCustomizationNicMapping [-OSCustomizationNicMapping] <OSCustomizationNicMapping[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-OSCustomizationNicMapping
New-OSCustomizationNicMapping
Set-OSCustomizationNicMapping

Detailed Description

This cmdlet removes the specified OS customization NIC mappings.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
OSCustomizationNicMapping | OSCustomizationNicMapping[] | Specifies the OSCustomizationNicMapping objects you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

$nicMapping = Get-OSCustomization MyCustomizationSpec | Get-OSCustomizationNicMapping
Remove-OSCustomizationNicMapping $nicMapping -Confirm:$false

Removes the NIC mappings of the specified OS customization spec without asking for confirmation.


Remove-OSCustomizationSpec - vSphere PowerCLI Cmdlets Reference

Remove-OSCustomizationSpec

Synopsis

This cmdlet removes the specified OS customization specifications.

Syntax

Remove-OSCustomizationSpec [-OSCustomizationSpec] <OSCustomizationSpec[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-OSCustomizationSpec
New-OSCustomizationSpec
Set-OSCustomizationSpec

Detailed Description

This cmdlet removes the specified OS customization specifications.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
OSCustomizationSpec | OSCustomizationSpec[] | Specifies the customization specifications you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Remove-OSCustomizationSpec Spec -Confirm

Removes the Spec OS customization specification from the server.


Remove-PassthroughDevice - vSphere PowerCLI Cmdlets Reference

Remove-PassthroughDevice

Synopsis

This cmdlet removes the specified pass-through devices.

Syntax

Remove-PassthroughDevice [-PassthroughDevice] <PassThroughDevice[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Add-PassthroughDevice
Get-PassthroughDevice

Detailed Description

This cmdlet removes the specified pass-through devices. You can remove only those pass-through devices that are retrieved from virtual machines.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
PassthroughDevice | PassThroughDevice[] | Specifies the pass-through devices you want to remove. You can remove only those pass-through devices that are retrieved from virtual machines. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-PassthroughDevice -VM VM | Remove-PassthroughDevice

Removes all pass-through devices of the VM virtual machine.


Remove-ResourcePool - vSphere PowerCLI Cmdlets Reference

Remove-ResourcePool

Synopsis

This cmdlet removes the specified resource pools from their locations.

Syntax

Remove-ResourcePool [-ResourcePool] <ResourcePool[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-ResourcePool
Move-ResourcePool
New-ResourcePool
Set-ResourcePool

Detailed Description

This cmdlet removes the specified resource pools and their children objects from their locations.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
ResourcePool | ResourcePool[] | Specifies the resource pools you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Remove-ResourcePool -ResourcePool ResourcePool

Removes the resource pool named ResourcePool.


Remove-Snapshot - vSphere PowerCLI Cmdlets Reference

Remove-Snapshot

Synopsis

This cmdlet removes the specified virtual machine snapshots.

Syntax

Remove-Snapshot [-Snapshot] <Snapshot[]> [-RemoveChildren] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Snapshot
New-Snapshot
Set-Snapshot

Detailed Description

This cmdlet removes the specified virtual machine snapshots. If the value of the RemoveChildren parameter is $true, the cmdlet removes the child snapshots as well.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Snapshot | Snapshot[] | Specifies the snapshots you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
RemoveChildren | SwitchParameter | Indicates that you want to remove the children of the specified snapshots as well. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Remove-Snapshot -Snapshot $snapshot1 -RemoveChildren

Removes the snapshot in the $snapshot variable and its children.


Remove-StatInterval - vSphere PowerCLI Cmdlets Reference

Remove-StatInterval

Synopsis

This cmdlet removes the statistics interval specified by the provided sampling period or name.

Syntax

Remove-StatInterval [-Interval] <StatInterval[]> [[-Server] <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Stat
Get-StatType
Set-StatInterval
New-StatInterval
Get-StatInterval

Detailed Description

This cmdlet removes the statistics interval specified by the provided sampling period or name.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Interval | StatInterval[] | Specifies the statistics intervals you want to remove. The values of this parameter can be statistics interval objects, names, or refresh periods in seconds. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Remove-StatInterval -Interval *

Removes all the statistics intervals. Note that deleting statistics intervals is allowed only on VirtualCenter 2.0.


Remove-TagAssignment - vSphere PowerCLI Cmdlets Reference

Remove-TagAssignment

Synopsis

This cmdlet removes the specified tag assignment.

Syntax

Remove-TagAssignment [-TagAssignment] <TagAssignment[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Tag
Get-TagAssignment
New-TagAssignment

Detailed Description

This cmdlet removes the specified tag assignment. The cmdlet removes the assignment of the tag in TagAssignment.Tag from the entity in TagAssignment.Entity.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
TagAssignment | TagAssignment[] | Specifies the assigned tags to be removed. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Works only with vCenter Server 5.1 or later.

Examples

-------------- Example 1 --------------

$myVM = Get-VM myvm
$myTagAssignment = Get-TagAssignment $myVM
Remove-TagAssignment $myTagAssignment

Removes all connections to tags from the specified virtual machine entity.


Remove-Template - vSphere PowerCLI Cmdlets Reference

Remove-Template

Synopsis

This cmdlet removes the specified virtual machine templates from the inventory.

Syntax

Remove-Template [-Template] <Template[]> [-DeletePermanently] [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Template
New-Template
Set-Template

Detailed Description

This cmdlet removes the specified virtual machine templates from the inventory. If the value of the DeletePermanently parameter is $true, the cmdlet removes the templates from the inventory and deletes them from the disk.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Template | Template[] | Specifies the virtual machine templates you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
DeletePermanently | SwitchParameter | Indicates that you want to delete the templates not only from the inventory, but from the datastore as well. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Remove-Template -Template $template

Removes the virtual machine template saved in the $template variable.


Remove-UsbDevice - vSphere PowerCLI Cmdlets Reference

Remove-UsbDevice

Synopsis

This cmdlet removes the specified USB devices from a virtual machine.

Syntax

Remove-UsbDevice [-UsbDevice] <UsbDevice[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-UsbDevice

Detailed Description

This cmdlet removes the specified USB devices from a virtual machine.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
UsbDevice | UsbDevice[] | Specifies the USB devices you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-UsbDevice -VM (Get-VM -Location $vmhost) | Remove-UsbDevice

Retrieves the virtual machines on the host stored in the $vmhost variable and removes their USB devices.


Remove-VApp - vSphere PowerCLI Cmdlets Reference

Remove-VApp

Synopsis

This cmdlet removes vApps from the server.

Syntax

Remove-VApp [-DeletePermanently] [-VApp] <VApp[]> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Export-VApp
Get-VApp
Import-VApp
New-VApp
Set-VApp
Start-VApp
Stop-VApp
Move-VApp

Detailed Description

This cmdlet removes vApps from the server.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VApp | VApp[] | Specifies the vApp you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
DeletePermanently | SwitchParameter | Indicates that you want not only to remove the vApps from the inventory, but also to delete the virtual machines they contain from the datastore. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-VMHost -Name MyVMHost1 | Get-VApp | Remove-VApp

Retrieves and removes all vApps available on the MyVMHost1 host.


Remove-VDPortGroup - vSphere PowerCLI Cmdlets Reference

Remove-VDPortGroup

Synopsis

This cmdlet removes distributed port groups.

Syntax

Remove-VDPortGroup [-VDPortGroup] <VDPortgroup[]> [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
New-VDPortgroup
Get-VDPortgroup
Set-VDPortgroup
Export-VDPortgroup

Detailed Description

This cmdlet removes distributed port groups.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VDPortGroup | VDPortgroup[] | Specifies the distributed port group that you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-VDPortGroup -Name "MyVDPortGroup" | Remove-VDPortGroup

Removes the specified distributed port group from the vSphere distributed switch that it belongs to.


Remove-VDSwitch - vSphere PowerCLI Cmdlets Reference

Remove-VDSwitch

Synopsis

This cmdlet removes vSphere distributed switches.

Syntax

Remove-VDSwitch [-VDSwitch] <VDSwitch[]> [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VDSwitch
New-VDSwitch
Export-VDSwitch
Set-VDSwitch

Detailed Description

This cmdlet removes vSphere distributed switches.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VDSwitch | VDSwitch[] | Specifies the vSphere distributed switches that you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitch -Name MyVDSwitch | Remove-VDSwitch

Removes the specified vSphere distributed switch.


Remove-VDSwitchPhysicalNetworkAdapter - vSphere PowerCLI Cmdlets Reference

Remove-VDSwitchPhysicalNetworkAdapter

Synopsis

This cmdlet removes host physical network adapters from the vSphere distributed switches they are connected to.

Syntax

Remove-VDSwitchPhysicalNetworkAdapter [-VMHostNetworkAdapter] <PhysicalNic[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Add-VDSwitchPhysicalNetworkAdapter

Detailed Description

This cmdlet removes host physical network adapters from the vSphere distributed switches they are connected to.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHostNetworkAdapter | PhysicalNic[] | Specifies the host physical network adapters that you want to remove from the vSphere distributed switch it is connected to. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-VMhost -Name "MyVMhost" | Get-VMHostNetworkAdapter -Physical -Name vmnic0 | Remove-VDSwitchPhysicalNetworkAdapter

Removes the specified host physical network adapter from the vSphere distributed switch that it is connected to.


Remove-VDSwitchPrivateVlan - vSphere PowerCLI Cmdlets Reference

Remove-VDSwitchPrivateVlan

Synopsis

This cmdlet removes private VLAN configuration entries from vSphere distributed switches.

Syntax

Remove-VDSwitchPrivateVlan [-VDSwitchPrivateVlan] <VDSwitchPrivateVlan[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet removes private VLAN configuration entries from vSphere distributed switches.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VDSwitchPrivateVlan | VDSwitchPrivateVlan[] | Specifies the private VLAN configuration entry that you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitchPrivateVlan -VDSwitch "MyVDSwitch" -PrimaryVlanId 1,3,5 | Remove-VDSwitchPrivateVlan

Removes the private VLAN configuration entries with specified primary identities from a vSphere distributed switch named "MyVDSwitch".


Remove-VDSwitchVMHost - vSphere PowerCLI Cmdlets Reference

Remove-VDSwitchVMHost

Synopsis

This cmdlet removes hosts from the specified vSphere distributed switches.

Syntax

Remove-VDSwitchVMHost -VDSwitch <VDSwitch> -VMHost <VMHost[]> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Add-VDSwitchVMHost

Detailed Description

This cmdlet removes hosts from the specified vSphere distributed switches.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VDSwitch | VDSwitch | Specifies the vSphere distributed switch from which you want to remove hosts. | true | true (ByValue) |
VMHost | VMHost[] | Specifies the hosts that you want to remove. | true | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitch -Name "MySwitch" | Remove-VDSwitchVMHost -VMHost "VMHost1", "VMHost2"

Removes two hosts from the specified vSphere distributed switch.


Remove-VICredentialStoreItem - vSphere PowerCLI Cmdlets Reference

Remove-VICredentialStoreItem

Synopsis

This cmdlet removes the specified credential store items.

Syntax

Remove-VICredentialStoreItem [-CredentialStoreItem] <VICredentialStoreItem[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-VICredentialStoreItem [[-Host] <String>] [[-User] <String>] [[-File] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VICredentialStoreItem
New-VICredentialStoreItem

Detailed Description

This cmdlet removes the credential store items that match the specified Host and User parameters. At least one of the Host and User parameters must be provided. To remove all passwords, call ?Remove-VICredentialStoreItem *?, which is a wildcard matching all hosts.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
CredentialStoreItem | VICredentialStoreItem[] | Specifies the credential store items you want to remove. | true | true (ByValue) |
Host | String | Specifies a host to filter the credential store items you want to remove. | false | false |
User | String | Specifies a user to filter the credential store items you want to remove. | false | false |
File | String | Specifies the file location of the credential store items that are to be removed. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Remove-VICredentialStoreItem -Host 192.168.1.100 -Confirm

Removes all credentials for the specified host from the default credential store file.

-------------- Example 2 --------------

Remove-VICredentialStoreItem -User 'admin' -Host '192.168.*' -File 'credentials.xml' -Confirm

Removes all credentials for the specified user and network from a credential store file.


Remove-VIPermission - vSphere PowerCLI Cmdlets Reference

Remove-VIPermission

Synopsis

This cmdlet removes the specified permissions.

Syntax

Remove-VIPermission [-Permission] <Permission[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VIPermission
New-VIPermission
Set-VIPermission
Get-VIPrivilege
Get-VIRole
New-VIRole
Remove-VIRole
Set-VIRole

Detailed Description

This cmdlet removes the specified permissions.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Permission | Permission[] | Specifies the permissions you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Remove-VIPermission -Permission $permission -Confirm:$false

Removes the $permission permission without asking for confirmation.


Remove-VIProperty - vSphere PowerCLI Cmdlets Reference

Remove-VIProperty

Synopsis

This cmdlet removes the extended properties from the specified object types.

Syntax

Remove-VIProperty [-VIProperty] <VIProperty[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-VIProperty [-Name] <String[]> [-ObjectType] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
New-VIProperty
Get-VIProperty

Detailed Description

This cmdlet removes the extended properties from the specified object types. Changes take effect upon the next retrieval of the corresponding objects.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String[] | Specifies the names of the extended properties you want to remove. | true | false |
VIProperty | VIProperty[] | Specifies the extended object properties you want to remove. | true | true (ByValue) |
ObjectType | String[] | Specifies the object types to which the extended properties you want to remove belong. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Remove-VIProperty -Name * -ObjectType *

Removes all custom properties.

-------------- Example 2 --------------

Remove-VIProperty -Name * -ObjectType VirtualMachine

Removes all custom properties for the VirtualMachine object type.

-------------- Example 3 --------------

Remove-VIProperty -Name OverallStatus, ConfigStatus -ObjectType VirtualMachine

Removes the OverallStatus and ConfigStatus for the VirtualMachine object type.

-------------- Example 4 --------------

Remove-VIProperty -Name OverallStatus -ObjectType VirtualMachine, Datacenter

Removes the OverallStatus property for the VirtualMachine and Datacenter types.

-------------- Example 5 --------------

Remove-VIProperty -Name *status* -ObjectType Virt*

Removes all properties that contain "status" in their names for object types with names that start with "Virt".


Remove-VIRole - vSphere PowerCLI Cmdlets Reference

Remove-VIRole

Synopsis

This cmdlet removes the specified roles.

Syntax

Remove-VIRole [-Role] <Role[]> [-Force] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VIRole
New-VIRole
Set-VIRole
Get-VIPrivilege
Get-VIPermission
New-VIPermission
Remove-VIPermission
Set-VIPermission

Detailed Description

This cmdlet removes the specified roles. To remove a role that is associated with a permission, you need to set the Force parameter to $true.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Role | Role[] | Specifies the roles you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Force | SwitchParameter | Indicates that you want to remove the role even if it is associated with a permission. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-VIRole -Server $server -Name "Customer*" | Remove-VIRole

Removes the roles with names that start with "Customer".


Remove-VirtualPortGroup - vSphere PowerCLI Cmdlets Reference

Remove-VirtualPortGroup

Synopsis

This cmdlet removes the specified virtual port groups.

Syntax

Remove-VirtualPortGroup [-VirtualPortGroup] <VirtualPortGroup[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VirtualPortGroup
New-VirtualPortGroup
Set-VirtualPortGroup

Detailed Description

This cmdlet removes the specified virtual port groups.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VirtualPortGroup | VirtualPortGroup[] | Specifies the virtual port groups you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

$vswitch =  New-VirtualSwitch -VMHost 10.23.112.234 -Name VirtualSwitch

$vportgroup =  New-VirtualPortGroup -VirtualSwitch $vswitch -Name VPortGroup

Remove-VirtualPortGroup -VirtualPortGroup $vportgroup

Creates a new virtual switch named VirtualSwitch and a virtual ports group VPortGroup for this switch. Then removes the virtual ports group.


Remove-VirtualSwitch - vSphere PowerCLI Cmdlets Reference

Remove-VirtualSwitch

Synopsis

This cmdlet removes the specified virtual switches from their locations.

Syntax

Remove-VirtualSwitch [-VirtualSwitch] <VirtualSwitch[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VirtualSwitch
New-VirtualSwitch
Set-VirtualSwitch

Detailed Description

This cmdlet removes the specified virtual switches from their locations.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VirtualSwitch | VirtualSwitch[] | Specifies the virtual switches you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

$vswitch =  New-VirtualSwitch -VMHost 10.23.122.145 -Name VirtualSwitch

Remove-VirtualSwitch -VirtualSwitch $vswitch

Creates a new virtual switch named VirtualSwitch on the host with an IP address 10.23.122.145. Then removes the virtual switch.


Remove-VirtualSwitchPhysicalNetworkAdapter - vSphere PowerCLI Cmdlets Reference

Remove-VirtualSwitchPhysicalNetworkAdapter

Synopsis

This cmdlet removes the specified host physical NICs from the standard virtual switch.

Syntax

Remove-VirtualSwitchPhysicalNetworkAdapter [-VMHostNetworkAdapter] <PhysicalNic[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Remove-VirtualSwitchPhysicalNetworkAdapter

Detailed Description

This cmdlet removes the specified host physical NICs from the standard virtual switch.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHostNetworkAdapter | PhysicalNic[] | Specifies the network adapters you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-VMhost "myVMhost" | Get-VMHostNetworkAdapter -Physical -Name "vmnic1" | Remove-VirtualSwitchPhysicalNetworkAdapter

Removes a VMHost NIC from the virtual switch it is attached to.


Remove-VM - vSphere PowerCLI Cmdlets Reference

Remove-VM

Synopsis

This cmdlet removes the specified virtual machines from the vCenter Server system.

Syntax

Remove-VM [-DeletePermanently] [-RunAsync] [-VM] <VirtualMachine[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VM
Move-VM
New-VM
Set-VM
Start-VM
Stop-VM
Suspend-VM
Restart-VM

Detailed Description

This cmdlet removes the specified virtual machines from the vCenter Server system. If the value of the DeletePermanently parameter is $true, the cmdlet not only removes the virtual machines from the inventory, but also deletes them from the disk.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
DeletePermanently | SwitchParameter | Indicates that you want to delete the virtual machines not only from the inventory, but from the datastore. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Remove-VM VM -DeletePermanently

Removes the VM virtual machine and deletes its files from the ESX host.


Remove-VMGuestRoute - vSphere PowerCLI Cmdlets Reference

Remove-VMGuestRoute

Synopsis

This cmdlet removes the specified routes from the routing table of their corresponding virtual machines.

Syntax

Remove-VMGuestRoute [-VMGuestRoute] <VMGuestRoute[]> [-ToolsWaitSecs <Int32>] [-GuestPassword <SecureString>] [-GuestUser <String>] [-GuestCredential <PSCredential>] [-HostPassword <SecureString>] [-HostUser <String>] [-HostCredential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMGuestRoute
New-VMGuestRoute

Detailed Description

This cmdlet removes the specified routes from the routing table of their corresponding virtual machines. This cmdlet supports only Windows XP 32 SP3, Windows Server 2003 32bit SP2, Windows Server 2003 64bit SP2, Windows 7 64 bit, Windows Server 2008 R2 64bit and Redhat Enterprise 5 operating systems.

To run this cmdlet against vCenter Server/ESX/ESXi versions earlier than 5.0, you need to meet the following requirements:
*You must run the cmdlet on the 32-bit version of Windows PowerShell.
*You must have access to the ESX that hosts the virtual machine over TCP port 902.
*For vCenter Server/ESX/ESXi versions earlier than 4.1, you need VirtualMachine.Interact.ConsoleInteract privilege. For vCenter Server/ESX/ESXi 4.1 and later, you need VirtualMachine.Interact.GuestControl privilege.

To run this cmdlet against vCenter Server/ESXi 5.0 and later, you need VirtualMachine.GuestOperations.Execute and VirtualMachine.GuestOperations.Modify privileges.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMGuestRoute | VMGuestRoute[] | Specifies the route you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
GuestCredential | PSCredential | Specifies a PSCredential object that contains credentials for authenticating with the guest OS. Do not use this parameter if the GuestUser and GuestPassword parameters are used. | false | false |
GuestPassword | SecureString | Specifies the password you want to use for authenticating with the guest OS. | false | false |
GuestUser | String | Specifies the user name you want to use for authenticating with the guest OS. | false | false |
HostCredential | PSCredential | Specifies a PSCredential object that contains credentials for authenticating with the host. Do not use this parameter if the HostUser and HostPassword parameters are used. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
HostPassword | SecureString | Specifies the password you want to use for authenticating with the host. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
HostUser | String | Specifies the user name you want to use for authenticating with the host. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
ToolsWaitSecs | Int32 | Specifies the time in seconds to wait for a response from VMware Tools. If a non-positive value is provided, the system waits infinitely long time. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

This cmdlet is experimental and might be changed or removed in a future rel ease.

Examples

-------------- Example 1 --------------

Remove-VMGuestRoute -GuestUser user -GuestPassword pass2 -VMGuestRoute $route

Removes the guest route stored in the $route variable.


Remove-VMHost - vSphere PowerCLI Cmdlets Reference

Remove-VMHost

Synopsis

This cmdlet removes the specified hosts from the inventory.

Syntax

Remove-VMHost [-VMHost] <VMHost[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Add-VMHost
Get-VMHost
Move-VMHost
Restart-VMHost
Set-VMHost
Start-VMHost
Stop-VMHost
Suspend-VMHost

Detailed Description

This cmdlet removes the specified hosts from the inventory.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

$myServer = Connect-VIServer -Server 10.23.112.235
Get-VMHost -Server $myServer -Location MyDatacenter1 | Remove-VMHost -Confirm:$false

Removes a specified VM host from a vCenter Server system without asking for a confirmation.


Remove-VMHostAccount - vSphere PowerCLI Cmdlets Reference

Remove-VMHostAccount

Synopsis

This cmdlet removes the specified host accounts.

Syntax

Remove-VMHostAccount [-HostAccount] <HostAccount[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VIAccount
New-VMHostAccount
Set-VMHostAccount

Detailed Description

This cmdlet removes the specified host accounts . These can be HostGroupAccount objects, HostUserAccount objects, or both.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
HostAccount | HostAccount[] | Specifies the host accounts you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-VMHostAccount -Group -ID user | Remove-VMHostAccount -Confirm

Removes the group account with ID "user". Asks for confirmation before running the command.


Remove-VMHostNetworkAdapter - vSphere PowerCLI Cmdlets Reference

Remove-VMHostNetworkAdapter

Synopsis

This cmdlet removes the specified host network adapters.

Syntax

Remove-VMHostNetworkAdapter [-Nic] <HostVirtualNic[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
New-VMHostNetworkAdapter
Set-VMHostNetworkAdapter

Detailed Description

This cmdlet removes the specified host network adapters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Nic | HostVirtualNic[] | Specifies the network adapters you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

$network = Get-VMHostNetwork

Remove-VMHostNetworkAdapter $network.VirtualNic[0] -Confirm

Removes the first virtual network adapter of the host.


Remove-VMHostNtpServer - vSphere PowerCLI Cmdlets Reference

Remove-VMHostNtpServer

Synopsis

This cmdlet removes the specified NTP servers from the NTP server list of the specified hosts.

Syntax

Remove-VMHostNtpServer [-NtpServer] <String[]> [-VMHost] <VMHost[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Add-VMHostNtpServer

Detailed Description

This cmdlet removes the specified NTP servers from the NTP server list of the specified hosts.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
NtpServer | String[] | Specifies the NTP servers you want to remove from the NTP servers list of the specified host. | true | false |
VMHost | VMHost[] | Specifies the host whose NTP servers you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Remove-VmHostNtpServer -NtpServer 192.168.1.5 -VMHost $vmhost -Confirm

Removes the NTP server with an IP address 192.168.1.5 from the virtual machine hosts stored in the $vmhost variable.

-------------- Example 2 --------------

Remove-VmHostNtpServer -NtpServer "old-ntp-server.com" -VMHost (Get-VMHost) -Confirm

Removes the NTP server with a domain name "old-ntp-server.com" from the virtual machine hosts pipelined through the Get-VMHost cmdlet.


Remove-VMHostProfile - vSphere PowerCLI Cmdlets Reference

Remove-VMHostProfile

Synopsis

This cmdlet removes the specified host profiles.

Syntax

Remove-VMHostProfile [-Profile] <VMHostProfile[]> [[-Server] <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-VMHostProfile -Entity <InventoryItem[]> [[-Server] <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Apply-VMHostProfile
Export-VMHostProfile
Get-VMHostProfile
Import-VMHostProfile
New-VMHostProfileCompliance
Set-VMHostProfile
Test-VMHostProfileCompliance

Detailed Description

This cmdlet removes the specified host profiles. If the Entity parameter is provided, the cmdlet removes the profile association for the specified entity. Otherwise, the cmdlet removes the profile object.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Profile | VMHostProfile[] | Specifies the host profiles you want to remove. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Entity | InventoryItem[] | Specifies the host or cluster whose host profile association you want to remove. | true | true (ByValue) |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

Get-VMHostProfile -Name Profile | Remove-VMHostProfile -Confirm:$false

Deletes the Profile host profile.


Remove-VMHostRoute - vSphere PowerCLI Cmdlets Reference

Remove-VMHostRoute

Synopsis

This cmdlet removes host routes.

Syntax

Remove-VMHostRoute [-VMHostRoute] <VMHostRoute[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostRoute
New-VMHostRoute
Set-VMHostRoute

Detailed Description

This cmdlet removes host routes.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHostRoute | VMHostRoute[] | Specifies the host routes you want to remove. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Supported only on ESX 4.0/ vCenter Server 4.0 and later.

Examples

-------------- Example 1 --------------

$destIpList = ('192.168.111.101', '192.168.111.102')

$routes = Get-VMHostRoute -VMHost ($script:vmhost1, $script:vmhost2) | where {$destIpList -contains $_.Destination.IPAddressToString}

Remove-VMHostRoute -VMHostRoute $routes -Confirm:$false

Removes the host routes that have the specified destination IP addresses.


Repair-DeployImageCache - vSphere Auto Deploy Reference

Repair-DeployImageCache

Synopsis

Repairs the image cache. Use this cmdlet only when working with VMware Technical Support.

Syntax

Repair-DeployImageCache [<CommonParameters>]

Related Commands

Detailed Description

Use this cmdlet in the unlikely scenario that the AutoDeploy cache is damaged and the software packages that make up an image profile are lost. Make sure that the original software depots have been added to the current PowerCLI session with the "Add-ESXSoftwareDepot" cmdlet before executing this cmdlet. The cmdlet will try to download the software packages from the available depots and reupload them to the AutoDeploy server.

You must have the "AutoDeploy.Profile.Create" privilege on the root folder of vCenter Server to use this cmdlet.

Parameters

Name Type Description Required? Pipeline Input Default Value

Return Type

Notes

Examples

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Repair-DeployRuleSetCompliance - vSphere Auto Deploy Reference

Repair-DeployRuleSetCompliance

Synopsis

Remediate any non-compliant associations discovered by Test-DeployRuleSetCompliance

Syntax

Repair-DeployRuleSetCompliance [-TestResult] <TestResult> [<CommonParameters>]

Related Commands

Test-DeployRuleSetCompliance

Detailed Description

Remediates any differences discovered by between the rules and the actual associations between hosts and their items. Use this cmdlet if you added or changed a rule and want to apply the change to all affected hosts.

Run Test-DeployRuleSetCompliance to retrieve the required TestResult object.

You must have the privileges necessary to perform the association operations.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
TestResult | TestResult | Output from a call to Test-DeployRuleSetCompliance. | true | true (ByValue) |

Return Type

Notes

Examples

-------------- Example 1 --------------

C:\PS> Get-VMHost h1 | Test-DeployRuleSetCompliance | Repair-DeployRuleSetCompliance

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Restart-CIVApp - vCloud Snapin Cmdlets Reference

Restart-CIVApp

Synopsis

This cmdlet restarts the specified vApp.

Syntax

Restart-CIVApp [-VApp] <CIVApp[]> [-RunAsync] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVApp
New-CIVApp
Remove-CIVApp
Set-CIVApp
Start-CIVApp
Stop-CIVApp
Suspend-CIVApp

Detailed Description

This cmdlet restarts the specified vApp. Resets all virtual machines in the vApp.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VApp | CIVApp[] | Specifies the vApp you want to restart. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The specified CIVApp object

Notes

Examples

-------------- Example 1 --------------

$myVapp = Get-CIVApp 'MyvApp'
Restart-CIVApp $myVApp

Restarts the specified vApp.

-------------- Example 2 --------------

$myVapp = Get-CIVApp 'MyvApp'
$task = $myVApp | Restart-CIVApp -RunAsync

Restarts the specified vApp asynchronously.


Restart-CIVAppGuest - vCloud Snapin Cmdlets Reference

Restart-CIVAppGuest

Synopsis

This cmdlet restarts the guest operating systems of all virtual machines in the specified vApp.

Syntax

Restart-CIVAppGuest [-VApp] <CIVApp[]> [-RunAsync] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Stop-CIVAppGuest

Detailed Description

This cmdlet restarts the guest operating systems of all virtual machines in the specified vApp.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VApp | CIVApp[] | Specifies the vApp whose virtual machine guest operating systems you want to restart. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The specified CIVApp object

Notes

Examples

-------------- Example 1 --------------

$myVApp = Get-CIVApp -Name 'MyVApp'
Restart-CIVAppGuest $myVApp

Restarts the VM guest operating system in the specified vApp.

-------------- Example 2 --------------

$myVApp = Get-CIVApp -Name 'MyVApp'
$task = Restart-CIVAppGuest $myVApp -RunAsync

Restarts the VM guest operating system in the specified vApp asynchronously.


Restart-CIVM - vCloud Snapin Cmdlets Reference

Restart-CIVM

Synopsis

This cmdlet resets the specified virtual machine.

Syntax

Restart-CIVM [-VM] <CIVM[]> [-RunAsync] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVM
Start-CIVM
Stop-CIVM
Suspend-CIVM

Detailed Description

This cmdlet resets the specified virtual machine.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | CIVM[] | Specifies the virtual machine you want to reset. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The specified CIVM object

Notes

Examples

-------------- Example 1 --------------

$myVM = Get-CIVM -Name 'MyVM'
Restart-CIVM $myVM

Resets the specified virtual machine.

-------------- Example 2 --------------

$myVM = Get-CIVM -Name 'MyVM'
$task = Restart-CIVM $myVM -RunAsync

Resets the specified virtual machine asynchronously.


Restart-CIVMGuest - vCloud Snapin Cmdlets Reference

Restart-CIVMGuest

Synopsis

This cmdlet restarts the guest operating system of the specified virtual machine.

Syntax

Restart-CIVMGuest [-VM] <CIVM[]> [-RunAsync] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Stop-CIVMGuest

Detailed Description

This cmdlet restarts the guest operating system of the specified virtual machine.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | CIVM[] | Specifies the virtual machine whose guest operating system you want to restart. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The specified CIVM object

Notes

Examples

-------------- Example 1 --------------

$myVM = Get-CIVM -Name 'MyVM'
Restart-CIVMGuest $myVM

Restarts the guest operating system of the specified virtual machine.

-------------- Example 2 --------------

$myVM = Get-CIVM -Name 'MyVM'
$task = Restart-CIVMGuest $myVM -RunAsync

Restarts the guest operating system of the specified virtual machine asynchronously.


Restart-VM - vSphere PowerCLI Cmdlets Reference

Restart-VM

Synopsis

This cmdlet restarts the specified virtual machines.

Syntax

Restart-VM [-RunAsync] [-VM] <VirtualMachine[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VM
New-VM
Remove-VM
Set-VM
Start-VM
Stop-VM
Suspend-VM
Move-VM

Detailed Description

This cmdlet restarts the specified virtual machines.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines you want to restart. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more VirtualMachine objects

Notes

Examples

-------------- Example 1 --------------

Restart-VM -VM VM -RunAsync -Confirm

Restarts the VM virtual machine after user confirmation. The cmdlet returns without waiting for the task to complete.


Restart-VMGuest - vSphere PowerCLI Cmdlets Reference

Restart-VMGuest

Synopsis

This cmdlet restarts the virtual machine guest operating systems.

Syntax

Restart-VMGuest [[-VM] <VirtualMachine[]>] [[-Server] <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Restart-VMGuest [[-Guest] <VMGuest[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMGuest
Shutdown-VMGuest
Suspend-VMGuest

Detailed Description

This cmdlet restarts the virtual machine guest operating systems.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Guest | VMGuest[] | Specifies the virtual machine guest operating systems you want to restart. | false | true (ByValue) |
VM | VirtualMachine[] | Specifies the virtual machines whose operating systems you want to restart. The specified virtual machines must have VMware Tools installed. | false | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more VMGuest objects

Notes

Examples

-------------- Example 1 --------------

Get-VM VM | Restart-VMGuest

Restarts the guest OS of the virtual machine named VM.


Restart-VMHost - vSphere PowerCLI Cmdlets Reference

Restart-VMHost

Synopsis

This cmdlet restarts the specified hosts.

Syntax

Restart-VMHost [-VMHost] <VMHost[]> [-Force] [-Evacuate] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHost
Move-VMHost
Remove-VMHost
Start-VMHost
Stop-VMHost
Suspend-VMHost

Detailed Description

This cmdlet restarts the specified hosts.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts you want to restart. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Evacuate | SwitchParameter | Indicates that vCenter Server automatically reregisters the virtual machines that are compatible for reregistration. If they are not compatible, they remain on the rebooted host. If there are powered-on virtual machines that cannot be reregistered, the operation waits until they are powered off manually. The Evacuate parameter is valid only if the cmdlet is run against a vCenter Server system and the host is in a DRS-enabled cluster. | false | false |
Force | SwitchParameter | Indicates that you want to restart the hosts even if they are not in a maintenance mode. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more VMHost objects

Notes

Examples

-------------- Example 1 --------------

Restart-VMHost 10.23.112.235 -RunAsync -Confirm

Restarts the specified host after user confirmation. The cmdlet returns without waiting for the task to complete.


Restart-VMHostService - vSphere PowerCLI Cmdlets Reference

Restart-VMHostService

Synopsis

This cmdlet restarts the specified host services.

Syntax

Restart-VMHostService [-HostService] <HostService[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostService
Set-VMHostService
Start-VMHostService
Stop-VMHostService

Detailed Description

This cmdlet restarts the specified host services.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
HostService | HostService[] | Specifies the host service you want to restart. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more HostService objects

Notes

Examples

-------------- Example 1 --------------

Restart-VMHostService -Service $vmHostService -Confirm:$false

Restarts a host service.


Search-Cloud - vCloud Snapin Cmdlets Reference

Search-Cloud

Synopsis

This cmdlet searches the cloud for objects of the specified type.

Syntax

Search-Cloud [-Name <String[]>] [[-Filter] <String>] [-QueryType] <QueryType> [-Property <String[]>] [-Server <CIServer[]>] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet searches the cloud for objects of the specified type. You can filter the returned objects by their properties. The cmdlet allows you to retrieve only specific properties of object.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
QueryType | QueryType | Specifies what types of objects you want to search for. | true | false |
Filter | String | Specifies a filter criteria for the returned objects. | false | false |
Name | String[] | Specifies the names of the objects to search for. This parameter supports only the "*" wildcard. For more information about the valid filter syntax, see the vCloud API Programming Guide. | false | false |
Property | String[] | Specifies the properties you want to retrieve for the specified object type. If you do not provide a value for this parameter, the cmdlet returns all properties of the objects. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |

Return Type

Zero or more CISearchResult objects

Notes

Examples

-------------- Example 1 --------------

Search-Cloud -Type vAppTemplate

Searches the cloud server for virtual appliance templates. The user is connected as a cloud user.

-------------- Example 2 --------------

Search-Cloud user -Name User1

Searches for a user by name.

-------------- Example 3 --------------

Search-Cloud adminUser -Property 'Name', 'FullName'

Gets all the Name and FullName properties for all cloud users. You must be connected as a system administrator.

-------------- Example 4 --------------

Search-Cloud vappTemplate -Filter 'isGoldMaster==True;isPublished==True'

Searches for public gold master vAppTemplate objects.

-------------- Example 5 --------------

Search-Cloud -QueryType adminVAppTemplate

Searches the cloud server for virtual appliance templates. The user is connected as a cloud administrator.


Set-AdvancedSetting - vSphere PowerCLI Cmdlets Reference

Set-AdvancedSetting

Synopsis

This cmdlet modifies the specified advanced setting.

Syntax

Set-AdvancedSetting [-AdvancedSetting] <AdvancedSetting[]> [-Value] <Object> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-AdvancedSetting
New-AdvancedSetting
Remove-AdvancedSetting

Detailed Description

This cmdlet modifies the specified advanced setting.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Value | Object | Specifies a new value for the advanced setting. | true | false |
AdvancedSetting | AdvancedSetting[] | Specifies the advanced setting you want to modify. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified AdvancedSetting objects

Notes

Examples

-------------- Example 1 --------------

Get-AdvancedSetting -Entity (Get-Cluster -Name Cluster) -Name SettingName | Set-AdvancedSetting -Value NewValue

Changes the value of the advanced setting SettingName of the Cluster cluster.

-------------- Example 2 --------------

Get-AdvancedSetting -Entity Server -Name 'mail.smtp.server' | Set-AdvancedSetting -Value 'test.vmware.com'

Changes the value of the advanced setting mail.smtp.server of the specified server to test.vmware.com.


Set-AlarmDefinition - vSphere PowerCLI Cmdlets Reference

Set-AlarmDefinition

Synopsis

This cmdlet modifies the specified alarm definitions.

Syntax

Set-AlarmDefinition [-AlarmDefinition] <AlarmDefinition[]> [-ActionRepeatMinutes <Int32>] [-Description <String>] [-Enabled [<Boolean>]] [-Name <String>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-AlarmDefinition
Get-AlarmAction
Get-AlarmActionTrigger
New-AlarmAction
New-AlarmActionTrigger
Remove-AlarmAction
Remove-AlarmActionTrigger

Detailed Description

This cmdlet modifies the specified alarm definitions.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
AlarmDefinition | AlarmDefinition[] | Specifies the alarm definition you want to modify. | true | true (ByValue) |
ActionRepeatMinutes | Int32 | Specifies a time period in minutes to define how often the alarm action repeats if the alarm is active. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Description | String | Specifies a new description for the alarm definition. | false | false |
Enabled | Boolean | Indicates that the alarm definition is enabled. | false | false |
Name | String | Specifies a new name for the alarm definition. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified AlarmDefinition objects

Notes

Examples

-------------- Example 1 --------------

Get-AlarmDefinition -Name 'alarms' | Set-AlarmDefinition -ActionRepeatMinutes ($_.ActionRepeatMinutes + 1)

Increase all selected alarms action repeat minutes.

-------------- Example 2 --------------

Get-AlarmDefinition -Name 'alarm' | foreach {$_ | Set-AlarmDefinition -Name 'alarm new name' -Description 'new description' -Enabled:$true}

Changes the name, description, and the Enabled flag of the selected alarms.


Set-Annotation - vSphere PowerCLI Cmdlets Reference

Set-Annotation

Synopsis

This cmdlet modifies the value of a custom attribute.

Syntax

Set-Annotation [-Entity] <InventoryItem[]> [-CustomAttribute] <CustomAttribute> [-Value] <String> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Annotation
Get-CustomAttribute
New-CustomAttribute
Remove-CustomAttribute
Set-CustomAttribute

Detailed Description

This cmdlet modifies the value of a custom attribute that applies to one or more inventory items.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Entity | InventoryItem[] | Specifies the entities to which the new annotation value applies. | true | true (ByValue) |
CustomAttribute | CustomAttribute | Specifies the custom attribute whose annotation you want to change. | true | true (ByValue) |
Value | String | Specifies a new value for the annotation. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified Annotation objects

Notes

Examples

-------------- Example 1 --------------

Set-Annotation -Entity $vmhost -CustomAttribute "PhysicalLocation" -Value Office

Modifies the annotation of the PhysicalLocation custom attribute for the host stored in the $vmhost variable.

-------------- Example 2 --------------

Get-Cluster Cluster | Set-Annotation -CustomAttribute "PhysicalLocation" -Value California

Modifies the annotation of the PhysicalLocation custom attribute for the Cluster cluster.


Set-CDDrive - vSphere PowerCLI Cmdlets Reference

Set-CDDrive

Synopsis

This cmdlet modifies the configuration of a virtual CD drive.

Syntax

Set-CDDrive [-CD] <CDDrive[]> [-IsoPath <String>] [-HostDevice <String>] [-NoMedia] [-StartConnected [<Boolean>]] [-Connected [<Boolean>]] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CDDrive
New-CDDrive
Remove-CDDrive

Detailed Description

This cmdlet updates a virtual CD drive. If an ISO location is provided, sets the CD to point to the ISO. Changes the StartConnected and Connected flags if StartConnected and/or Connected is set. If NoMedia parameter is set to $true, removes the CD drive's media backing and disconnects it. Note that the Connected parameter can be specified only if the corresponding virtual machine is powered on.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
CD | CDDrive[] | Specifies the virtual CD drive you want to configure. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Connected | Boolean | Indicates that the virtual CD drive is connected after its creation. This parameter can be specified only if the corresponding virtual machine is powered on. | false | false |
HostDevice | String | Specifies the path to the CD drive on the host which backs this virtual CD drive. Do not use this parameter when the ISOPath and NoMedia parameters are specified. | false | false |
IsoPath | String | Specifies the datastore path to the ISO (CD image) file that backs the virtual CD drive. Do not use this parameter when the HostDevice and NoMedia parameters are specified. | false | false |
NoMedia | SwitchParameter | Indicates that you want to detach from the CD drive any type of connected media - ISO from datastore or host device. Do not use this parameter when the ISOPath or HostDevice parameters are specified. | false | false |
StartConnected | Boolean | Indicates that the virtual CD drive starts connected when the virtual machine associated with it powers on. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified CDDrive objects

Notes

Examples

-------------- Example 1 --------------

$cd = New-CDDrive -VM VM -ISOPath "[sof-20666-esx:storage1] ISO\testISO.iso"

Set-CDDrive -CD $cd -NoMedia

Creates a CD drive on the VM virtual machine and attaches testISO.iso, previously uploaded.
Then disconnects the ISO.


Set-CIAccessControlRule - vCloud Snapin Cmdlets Reference

Set-CIAccessControlRule

Synopsis

This cmdlet modifies the specified access control rule.

Syntax

Set-CIAccessControlRule [-AccessLevel] <AccessLevel> -AccessControlRule <CIAccessControlRule[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIAccessControlRule
New-CIAccessControlRule
Remove-CIAccessControlRule

Detailed Description

This cmdlet modifies the specified access control rule.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
AccessLevel | AccessLevel | Specifies a new access level for the access control rule that you want to modify. This parameter accepts Read, ReadWrite, and FullControl values. | true | false |
AccessControlRule | CIAccessControlRule[] | Specifies the access control rule that you want to modify. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified CIAccessControlRule objects

Notes

Examples

-------------- Example 1 --------------

$myRule = Get-CIAccessControlRule -Entity 'MyCatalog' -User 'MyUser'
Set-CIAccessControlRule -AccessControlRule $myRule -AccessLevel "FullControl"

Provides the MyUser user with full control access to the MyCatalog catalog.


Set-CINetworkAdapter - vCloud Snapin Cmdlets Reference

Set-CINetworkAdapter

Synopsis

This cmdlet modifies the configuration of a virtual network adapter of a virtual machine on a vCloud Director server.

Syntax

Set-CINetworkAdapter [-NetworkAdapter] <CINetworkAdapter[]> [-Connected [<Boolean>]] [-IPAddress <IPAddress>] [-IPAddressAllocationMode <IPAddressAllocationMode>] [-MACAddress <String>] [-VAppNetwork <CIVAppNetwork>] [-Primary] [-Server <CIServer[]>] [-ResetMACAddress] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CINetworkAdapter

Detailed Description

This cmdlet modifies the configuration of a virtual network adapter of a virtual machine on a vCloud Director server.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
NetworkAdapter | CINetworkAdapter[] | Specifies the virtual network adapters that you want to configure. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Connected | Boolean | Specifies the connection state of the virtual network adapter. For an undeployed virtual machine, indicates that the virtual network adapter will connect to the network when the virtual machine is deployed. | false | false |
IPAddress | IPAddress | Specifies a new IP address for the virtual network adapter. This parameter is only applicable when the IPAddressAllocationMode parameter is set to manual. | false | false |
IPAddressAllocationMode | IPAddressAllocationMode | Specifies a new IP address allocation mode for the virtual network adapter. This parameter accepts Pool, Dhcp, and Manual values. | false | false |
MACAddress | String | Specifies a new MAC address for the virtual network adapter. This parameter is not applicable when ResetMACAddress is specified. | false | false |
Primary | SwitchParameter | Indicates that the virtual network adapter is primary for its virtual machine. | false | false |
ResetMACAddress | SwitchParameter | Indicates that you want to reset the MAC address of the virtual network adapter. This parameter is not applicable when MACAddress is specified. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
VAppNetwork | CIVAppNetwork | Specifies a new vApp network to which the virtual network adapter connects. To disconnect the adapter from the vApp networks it connects to, pass $null. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified CINetworkAdapter objects

Notes

Examples

-------------- Example 1 --------------

$myVappNetwork2 = Get-CIVAppNetwork -Name 'MyVappNetwork2'
Get-CIVAppNetwork -Name 'MyVappNetwork1' | Get-CINetworkAdapter | Set-CINetworkAdapter -VAppNetwork $myVappNetwork2

Retrieves all virtual network adapters connected to the MyVappNetwork1 vApp network and connects them to the MyVappNetwork2 vApp network.

-------------- Example 2 --------------

Get-VApp -Name 'MyVapp1' | Get-CIVM | Get-CINetworkAdapter | Set-CINetworkAdapter -Connected $false

Disconnects all virtual network adapters of all virtual machines in the specified vApp.

-------------- Example 3 --------------

Get-CIVM -Name 'MyVM1' | Get-CINetworkAdapter -Primary | Set-CINetworkAdapter -IPAddressAllocationMode Manual -IPAddress 192.168.1.1 -MACAddress 'FF-1D-09-2E-D5-55'

Retrieves the primary virtual network adapter of the specified virtual machine. Changes the IP address allocation mode for the virtual network adapter to manual and assigns the virtual network adapter new IP and MAC addresses.


Set-CIVApp - vCloud Snapin Cmdlets Reference

Set-CIVApp

Synopsis

This cmdlet modifies the configuration of the specified vApps in the cloud.

Syntax

Set-CIVApp [-VApp] <CIVApp[]> [-Name <String>] [-Description <String>] [-Owner <CIUser>] [-Server <CIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-CIVApp [-VApp] <CIVApp[]> [-Server <CIServer[]>] [-RunAsync] -DiscardSuspendedState [-WhatIf] [-Confirm] [<CommonParameters>]
Set-CIVApp [-VApp] <CIVApp[]> [-Server <CIServer[]>] -RenewLease [-RuntimeLease <TimeSpan>] [-StorageLease <TimeSpan>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVApp
Import-CIVApp
New-CIVApp
Remove-CIVApp
Start-CIVApp
Stop-CIVApp
Restart-CIVApp
Suspend-CIVApp

Detailed Description

This cmdlet modifies the configuration of the specified vApps in the cloud.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VApp | CIVApp[] | Specifies the vApp that you want to configure. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Description | String | Specifies a description for the vApp you want to configure. | false | false |
DiscardSuspendedState | SwitchParameter | Indicates that you want to discard the suspended state of the specified vApp and all its virtual machines. | true | false |
Name | String | Specifies a new name for the vApp you want to configure. | false | false |
Owner | CIUser | Specifies a new owner for the vApp you want to configure. | false | false |
RenewLease | SwitchParameter | Indicates that you want to renew the leases of the vApp. Specifying the RenewLease parameter resets the current values of the RuntimeLease and StorageLease parameters. | true | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
RuntimeLease | TimeSpan | Specifies the maximum running time for the vApp before vCloud Director stops it automatically. If you do not specify this parameter, the current value is reset. To specify that the lease is unlimited, pass $null. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
StorageLease | TimeSpan | Specifies the maximum amount of time for the vApp to remain stopped before vCloud Director automatically marks it as expired, or deletes it, depending on the organization policy. If you do not specify this parameter, the current value is reset. To specify that the lease is unlimited, pass $null. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified CIVApp objects

Notes

Examples

-------------- Example 1 --------------

$myVApps = Get-CIVApp -Name 'MyVApp*'
$myVApps | Set-CIVApp -Description 'This is one of my VApps.'

Retrieves all vApp with names starting with MyVapp and changes their descriptions to "This is one of my vApps."

-------------- Example 2 --------------

Set-CIVApp -VApp 'MyVApp*' -DiscardSuspendedState

Discards the suspended state for all vApps with names starting with MyVapp.

-------------- Example 3 --------------

$runtimeTimeSpan = New-Object System.Timespan 1,2,3 #one hour, two minutes, three seconds
Set-CIVApp -VApp 'myVApp*' -RenewLease -RuntimeLease $runtimeTimeSpan

Renews the runtime lease for all vApps with names starting with MyVapp and sets the runtime lease to one hour, two minutes and three seconds.


Set-CIVAppNetwork - vCloud Snapin Cmdlets Reference

Set-CIVAppNetwork

Synopsis

This cmdlet modifies the configuration of the specified vApp networks.

Syntax

Set-CIVAppNetwork [-VAppNetwork] <CIVAppNetwork[]> [-RunAsync] [-Server <CIServer[]>] [-Description <String>] [-DnsSuffix <String>] [-PrimaryDns <IPAddress>] [-SecondaryDns <IPAddress>] [-StaticIPPool <IPRangeList>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-CIVAppNetwork [-VAppNetwork] <CIVAppNetwork[]> [-RunAsync] [-Server <CIServer[]>] -ReplaceNetworkWithNewNetworkWithChangedName <String> [-WhatIf] [-Confirm] [<CommonParameters>]
Set-CIVAppNetwork [-VAppNetwork] <CIVAppNetwork[]> [-RunAsync] [-Server <CIServer[]>] [-Fenced [<Boolean>]] [-FirewallEnabled [<Boolean>]] [-NatEnabled [<Boolean>]] [-ParentOrgNetwork <OrgNetwork>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVAppNetwork
New-CIVAppNetwork
Remove-CIVAppNetwork

Detailed Description

This cmdlet modifies the configuration of the specified vApp networks.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VAppNetwork | CIVAppNetwork[] | Specifies the vApp networks that you want to modify. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Description | String | Specifies new descriptions for the vApp networks that you want to modify. To delete the current value of this setting, pass an empty string. | false | false |
DnsSuffix | String | Specifies new DNS suffixes for the vApp networks that you want to modify. To delete the current value of this setting, pass an empty string. | false | false |
Fenced | Boolean | Enables or disables fenced mode for the vApp networks. This parameter is only applicable when the connection type of the vApp network is direct. | false | false |
FirewallEnabled | Boolean | Enables or disables the firewall service for the vApp networks that you want to modify. | false | false |
NatEnabled | Boolean | Enables or disables the NAT service for the vApp networks that you want to modify. | false | false |
ParentOrgNetwork | OrgNetwork | Specifies a new parent organization network to which the vApp networks connect. Pass $null if you want to change the type of the vApp networks to isolated. | false | false |
PrimaryDns | IPAddress | Specifies new primary DNSs for the vApp networks that you want to modify. To delete the current value of this setting, pass an empty string. | false | false |
ReplaceNetworkWithNewNetworkWithChangedName | String | Specifies new names for the vApp networks that you want to modify. When this parameter is specified, the operation replaces each of the specified vApp networks with a new one with the specified name. Each new network has identical settings with the network it replaces but the new network has a new name, ID, and HREF. Services outside vCloud Director which track the initial vApp network by ID or HREF might lose track of the renamed vApp network. After renaming the vApp networks, you cannot restore their IDs and HREFs to their initial values. Caution: Make sure that you understand the operation and its effects before renaming vApp networks. | true | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
SecondaryDns | IPAddress | Specifies new secondary DNSs for the vApp networks that you want to modify. To delete the current value of this setting, pass an empty string. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
StaticIPPool | IPRangeList | Specifies new ranges of static IP addresses for the vApp networks to allocate to virtual machines. To delete the current value of this setting, pass an empty string. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified CIVAppNetwork objects

Notes

Examples

-------------- Example 1 --------------

$myVAppNetwork = Get-CIVAppNetwork -Name 'MyVAppNetwork'
$myVAppNetwork | Set-CIVAppNetwork  -Description 'This my routed network with updated configuration.' -DnsSuffix 'mydomain.com'  -PrimaryDns '192.168.3.1' -SecondaryDns '192.168.3.2' -StaticIPPool '192.168.3.100 - 192.168.3.120'

Modifies the configuration of the specified vApp network.

-------------- Example 2 --------------

$myVAppNetwork = Get-CIVAppNetwork -Name 'MyVAppNetwork'
$parentOrgNetwork = Get-OrgNetwork -Name 'MyParentOrganizationNetwork'
$myVAppNetwork | Set-CIVAppNetwork -ParentOrgNetwork $parentOrgNetwork

Changes the parent organization network for the specified vApp.

-------------- Example 3 --------------

$myVAppNetwork = Get-CIVAppNetwork -Name 'MyVAppNetwork'
$myVAppNetwork | Set-CIVAppNetwork -ParentOrgNetwork $null

Transforms the specified routed network into an isolated network.

-------------- Example 4 --------------

$myVAppNetwork = Get-CIVAppNetwork -Name 'MyVAppNetwork'
$myVAppNetwork | Set-CIVAppNetwork ?Fenced:$true ?FirewallEnabled:$false

Turns on fence mode for the specified direct vApp network and disables the firewall service.

-------------- Example 5 --------------

$myVAppNetwork = Get-CIVAppNetwork -Name 'MyVAppNetwork'
$myVAppNetwork | Set-CIVAppNetwork ?ReplaceNetworkWithNewNetworkWithChangedName MyRenamedVAppNetwork

Renames the specified network by replacing it with an identical vApp network named MyRenamedVAppNetwork.


Set-CIVAppStartRule - vCloud Snapin Cmdlets Reference

Set-CIVAppStartRule

Synopsis

This cmdlet modifies the start rules for virtual machines in the specified vApp.

Syntax

Set-CIVAppStartRule [-StartRule] <CIVAppStartRule[]> [-Group <UInt16>] [-StartAction <CIVMStartAction>] [-StartDelaySeconds <UInt16>] [-StopAction <CIVMStopAction>] [-StopDelaySeconds <UInt16>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVAppStartRule

Detailed Description

This cmdlet modifies the start rules for virtual machines in the specified vApp. Note: You must specify at least one of the Group, StartAction, StartDelaySeconds, StopAction, or StopDelaySeconds parameters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
StartRule | CIVAppStartRule[] | Specifies the start rule that you want to modify. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Group | UInt16 | Specifies a new start group for the virtual machine whose start rule you want to modify. The value you pass to this parameter represents the position of the group in the start queue of the vApp. The smaller the number, the sooner vCloud Director powers on the virtual machines in the group after you start the vApp. When you stop the vApp, vCloud Director stops the virtual machines in the reverse order. | false | false |
StartAction | CIVMStartAction | Specifies a new action to be performed on the virtual machine when the vApp starts. | false | false |
StartDelaySeconds | UInt16 | Specifies a new amount of time to wait before performing the start action. This parameter accepts values in the range of 0 to 36000. | false | false |
StopAction | CIVMStopAction | Specifies a new action to be performed on the virtual machine when the vApp stops. | false | false |
StopDelaySeconds | UInt16 | Specifies a new amount of time to wait before performing the stop action. This parameter accepts values in the range of 0 to 36000. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified CIVAppStartRule objects

Notes

Examples

-------------- Example 1 --------------

$myVApp = Get-CIVApp 'MyVApp'
$myVM2 = Get-CIVM -Name 'MyVM2' -VApp $myVApp
$myVM2StartRule = Get-CIVAppStartRule -VApp $myVApp -VM $myVM2
Set-CIVappStartRule -StartRule $myVM2StartRule -StartDelaySeconds 10

Modifies the delay of the start action that is performed on the specified virtual machine when the specified vApp starts.

-------------- Example 2 --------------

$myVApp = Get-CIVApp 'MyVApp'
$myVM2 = Get-CIVM -Name 'MyVM2' -VApp $myVApp
$myVM2StartRule = Get-CIVAppStartRule -VApp $myVApp -VM $myVM2
Set-CIVAppStartRule -StartRule $myVM2StartRule -StartAction None

Sets the start action for the specified virtual machine to none. When the vApp starts, the virtual machine will not power on.


Set-CIVAppTemplate - vCloud Snapin Cmdlets Reference

Set-CIVAppTemplate

Synopsis

This cmdlet modifies the configuration of the specified vApp template.

Syntax

Set-CIVAppTemplate [-VAppTemplate] <CIVAppTemplate[]> [-Server <CIServer[]>] [-Name <String>] [-Description <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-CIVAppTemplate [-VAppTemplate] <CIVAppTemplate[]> [-Server <CIServer[]>] [-StorageLease <TimeSpan>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVAppTemplate
New-CIVAppTemplate
Import-CIVAppTemplate
Remove-CIVAppTemplate

Detailed Description

This cmdlet modifies the configuration of the specified vApp template.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VAppTemplate | CIVAppTemplate[] | Specifies the vApp template you want to modify. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Description | String | Specifies a new description for the vApp template you want to modify. | false | false |
Name | String | Specifies a new name for the vApp template you want to modify. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
StorageLease | TimeSpan | Specifies the maximum amount of time for the vApp to remain stopped before vCloud Director automatically marks it as expired, or deletes it, depending on the organization policy. To specify that the lease is unlimited, pass $null. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified CIVAppTemplate objects

Notes

Examples

-------------- Example 1 --------------

$timeSpan = New-Object System.Timespan 1,2,3 #one hour, two minutes, three seconds
Set-CIVAppTemplate -VAppTemplate 'MyVAppTemplate' -StorageLease $timeSpan

Modifies the storage lease for the specified vApp template to one hour, two minutes, and three seconds.

-------------- Example 2 --------------

Get-CIVAppTemplate -Name 'MyVAppTemplate' | Set-CIVAppTemplate -Name 'MyNewVAppTemplateName' -Description 'The name and description of this vApp template have been modified.'

Modifies the name and description of the specified vApp template.


Set-Cluster - vSphere PowerCLI Cmdlets Reference

Set-Cluster

Synopsis

This cmldlet modifies the configuration of a cluster.

Syntax

Set-Cluster [-HARestartPriority <HARestartPriority>] [-HAIsolationResponse <HAIsolationResponse>] [-VMSwapfilePolicy <VMSwapfilePolicy>] [-Cluster] <Cluster[]> [[-Name] <String>] [-HAEnabled [<Boolean>]] [-HAAdmissionControlEnabled [<Boolean>]] [-HAFailoverLevel <Int32>] [-DrsEnabled [<Boolean>]] [-DrsMode <DrsMode>] [-DrsAutomationLevel <DrsAutomationLevel>] [-VsanEnabled [<Boolean>]] [-VsanDiskClaimMode <VsanDiskClaimMode>] [-Profile <VMHostProfile>] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Cluster
New-Cluster
Move-Cluster
Remove-Cluster

Detailed Description

This cmdlet modifies the configuration of a cluster.
HAEnabled is automatically set to $true if some of the HA settings, HAAdmissionControlEnabled, HAFailoverLevel, HARestartPriority, HAIsolationResponse, are specified.
DrsEnabled is automatically set to $true if some of the DRS settings, DrsAutomationLevel, DrsMode, are specified.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Cluster | Cluster[] | Specifies the name of the cluster you want to configure. | true | true (ByValue) |
Name | String | Specifies a new name for the cluster. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
DrsAutomationLevel | DrsAutomationLevel | Specifies a DRS (Distributed Resource Scheduler) automation level. The valid values are FullyAutomated, Manual, and PartiallyAutomated. | false | false |
DrsEnabled | Boolean | Indicates that VMware DRS (Distributed Resource Scheduler) is enabled. | false | false |
DrsMode | DrsMode | This parameter is deprecated and scheduled for removal. Use the DrsAutomationLevel parameter instead. Specifies a DRS (Distributed Resource Scheduler) mode. The valid values are FullyAutomated, Manual, and PartiallyAutomated. | false | false |
HAAdmissionControlEnabled | Boolean | Indicates that the virtual machines in the cluster will not start if they violate availability constraints. | false | false |
HAEnabled | Boolean | Indicates that VMware High Availability is enabled. | false | false |
HAFailoverLevel | Int32 | Specifies a failover level. This is the number of physical host failures that can be tolerated without impacting the ability to meet minimum thresholds for all running virtual machines. The valid values range from one to four. | false | false |
HAIsolationResponse | HAIsolationResponse | Specifies whether the virtual machine should be powered off if a host determines that it is isolated from the rest of the compute resource. The valid values are PowerOff and DoNothing. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. | false | false |
HARestartPriority | HARestartPriority | Specifies the cluster HA restart priority. The valid values are Disabled, Low, Medium, and High. VMware HA is a feature that detects failed virtual machines and automatically restarts them on alternative ESX/ESXi hosts. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. | false | false |
Profile | VMHostProfile | Specifies a host profile you want to associate with the cluster. If the value of this parameter is $null, the current profile association is removed. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VMSwapfilePolicy | VMSwapfilePolicy | Specifies the swapfile placement policy. The following values are valid: InHostDataStore - Store the swapfile in the datastore specified by the VMSwapfileDatastoreID property of the virtual machine host. If the VMSwapfileDatastoreID property is not set or indicates a datastore with insufficient free space, the swapfile is stored in the same directory as the virtual machine. This setting might degrade the VMotion performance. WithVM - Store the swapfile in the same directory as the virtual machine. | false | false |
VsanDiskClaimMode | VsanDiskClaimMode | Specifies the mode by which disks are claimed by the Virtual SAN. | false | false |
VsanEnabled | Boolean | Specifies whether the Virtual SAN feature is enabled on this cluster. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified Cluster objects

Notes

Examples

-------------- Example 1 --------------

$cluster1 =  New-Cluster -Name Cluster1 -Location Datacenter

$cluster2 = Set-Cluster -Cluster $cluster1 -Name Cluster2

Creates a new cluster named Cluster1 on the Datacenter. Then renames the cluster to Cluster2.


Set-CustomAttribute - vSphere PowerCLI Cmdlets Reference

Set-CustomAttribute

Synopsis

This cmdlet renames a custom attribute.

Syntax

Set-CustomAttribute [-CustomAttribute] <CustomAttribute[]> [-Name] <String> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CustomAttribute
New-CustomAttribute
Remove-CustomAttribute
Get-Annotation
Set-Annotation

Detailed Description

This cmdlet renames a custom attribute.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies a new name for the custom attribute. | true | false |
CustomAttribute | CustomAttribute[] | Specifies the custom attribute you want to rename. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified CustomAttribute objects

Notes

Examples

-------------- Example 1 --------------

Set-CustomAttribute -Name CreationDetails -CustomAttribute CreationDate

Renames a custom attribute from CreationDate to CreationDetails.

-------------- Example 2 --------------

Get-CustomAttribute -Name CreationDate -Server server1, server2 | Set-CustomAttribute -Name CreationDetails

Renames the custom attributes retrieved from the specified vSphere servers from CreationDate to CreationDetails.


Set-CustomField - vSphere PowerCLI Cmdlets Reference

Set-CustomField

Synopsis

This cmdlet modifies the value of a custom field for a specified inventory item.

Syntax

Set-CustomField [-Entity] <InventoryItem> [-Name] <String> [[-Value] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
New-CustomField
Remove-CustomField

Detailed Description

This cmdlet is deprecated and scheduled for removal.
This cmdlet modifies the value of a custom field for a specified inventory item. If the custom field with this name does not exist, it is created for this type of items and then its value is set.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Entity | InventoryItem | Specifies the inventory item to which the custom field you want to change belongs. | true | true (ByValue) |
Name | String | Specifies the name of the custom field you want to change. | true | false |
Value | String | Provides a new value for the custom field. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The specified InventoryItem object

Notes

Examples

-------------- Example 1 --------------

Get-VM VM | Set-CustomField -Name CF - Value 10

Sets the value of the CF custom field of the VM virtual machine.


Set-Datacenter - vSphere PowerCLI Cmdlets Reference

Set-Datacenter

Synopsis

This cmdlet modifies the properties of the specified datacenter.

Syntax

Set-Datacenter [-Datacenter] <Datacenter[]> [-Name] <String> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Datacenter
Move-Datacenter
New-Datacenter
Remove-Datacenter

Detailed Description

This cmdlet modifies the properties of the specified datacenter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Datacenter | Datacenter[] | Specifies the datacenter whose properties you want to modify. | true | true (ByValue) |
Name | String | Specifies a new name for the datacenter. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified Datacenter objects

Notes

Examples

-------------- Example 1 --------------

Set-Datacenter -Datacenter Datacenter1 -Name Datacenter2

Renames the Datacenter1 to Datacenter2.


Set-Datastore - vSphere PowerCLI Cmdlets Reference

Set-Datastore

Synopsis

This cmdlet modifies the properties of the specified datastore.

Syntax

Set-Datastore [-Datastore] <Datastore[]> [[-Name] <String>] [-CongestionThresholdMillisecond <Int32>] [-StorageIOControlEnabled [<Boolean>]] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-Datastore [-Datastore] <Datastore[]> -MaintenanceMode [<Boolean>] [-EvacuateAutomatically] [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Datastore
New-Datastore
Remove-Datastore
Move-Datastore

Detailed Description

This cmdlet modifies the properties of the specified datastore. You can use the following characters in a path, but not in a datastore name: slash (/), backslash (\), and percent (%).

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Datastore | Datastore[] | Specifies the datastore whose properties you want to change. | true | true (ByValue)
Name | String | Specifies a new name for the datastore. Do not use slash (/), backslash (\), and percent (%) characters in datastore names. | false | false
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
CongestionThresholdMillisecond | Int32 | Specifies the latency period beyond which the storage array is considered congested. The range of this value is between 10 to 100 milliseconds. | false | false
EvacuateAutomatically SwitchParameter Specifies whether you want to automatically migrate all virtual machines to another datastore if the value of MaintenanceMode is $true.
When the Storage DRS automation level is set to Fully Automated, you do not need to specify the EvacuateAutomatically parameter because Storage DRS will migrate all virtual machines automatically.

If EvacuateAutomatically is specified, the SDRS placement and migration recommendations are automatically applied. If SDRS generates cluster DRS faults, an error report is displayed and the operation is cancelled. The report contains information about each datastore cluster DRS fault.

If EvacuateAutomatically is not specified, an error report is displayed and the operation is cancelled. The error report contains information about each SDRS recommendation. If SDRS generates cluster DRS faults, an error report is displayed and the operation is cancelled. The error report contains information about each fault.

If EvacuateAutomatically is explicitly set to false, the cmdlet blocks execution without displaying an error message. If SDRS generates datastore cluster DRS faults, the cmdlet stops responding and an error report is displayed. The report contains information about each cluster DRS fault. 		false false
MaintenanceMode | Boolean | Specifies whether you want to put the datastore in maintenance mode. The operation completes when no virtual machines are present and no provisioning processes are running on the datastore. | true | false
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false
StorageIOControlEnabled | Boolean | Indicates whether you want to enable the IO control. | false | false
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false

Return Type

Zero or more modified Datastore objects

Notes

Examples

-------------- Example 1 --------------

Get-Datastore -Name Datastore1 | Set-Datastore -Name Datastore2

Renames the Datastore1 datastore to Datastore2.

-------------- Example 2 --------------

Set-Datastore $datastore1, $datastore2 -StorageIOControlEnabled $true -CongestionThresholdMillisecond 80

Enables the Storage IO Control and set a congestion threshold of 80 milliseconds for the specified datastores.

-------------- Example 3 --------------

Get-Datastore -Name 'MyDatastore1' | Set-Datastore -MaintenanceMode $true -EvacuateAutomatically

Puts the MyDatastore1 datastore in maintenance mode and specifies that all virtual machines on the datastore will be automatically migrated to another datastore.


Set-DatastoreCluster - vSphere PowerCLI Cmdlets Reference

Set-DatastoreCluster

Synopsis

This cmdlet modifies the configuration of the specified datastore cluster.

Syntax

Set-DatastoreCluster -DatastoreCluster <DatastoreCluster[]> [-IOLatencyThresholdMillisecond <Int32>] [-IOLoadBalanceEnabled [<Boolean>]] [-Name <String>] [-SdrsAutomationLevel <DrsAutomationLevel>] [-SpaceUtilizationThresholdPercent <Int32>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-DatastoreCluster
New-DatastoreCluster
Remove-DatastoreCluster

Detailed Description

This cmdlet modifies the configuration of the specified datastore cluster.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
DatastoreCluster | DatastoreCluster[] | Specifies the datastore cluster that you want to configure. | true | true (ByValue) |
IOLatencyThresholdMillisecond | Int32 | Specifies the maximum I/O latency in milliseconds allowed before Storage DRS is triggered for the datastore cluster. The parameter accepts values in the range of 5 to 100. If the value of IOLoadBalancing is $false, the setting for the I/O latency threshold is not applied. | false | false |
IOLoadBalanceEnabled | Boolean | Specifies whether I/O load balancing is enabled for the datastore cluster. If the value is $false, I/O load balancing is disabled and the settings for the I/O latency threshold and utilized space threshold are not applied. | false | false |
Name | String | Specifies a new name for the datastore cluster. | false | false |
SdrsAutomationLevel | DrsAutomationLevel | Specifies the Storage DRS automation level for the datastore cluster. This parameter accepts Disabled, Manual, and FullyAutomated values. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
SpaceUtilizationThresholdPercent | Int32 | Specifies the maximum percentage of consumed space allowed before Storage DRS is triggered for the datastore cluster. The parameter accepts values in the range of 50 to 100. If the value of IOLoadBalancing is $false, the setting for the utilized space threshold is not applied. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

One or more modified DatastoreCluster objects

Notes

Examples

-------------- Example 1 --------------

Set-DatastoreCluster -DatastoreCluster MyDatastoreCluster1 -Name 'MyDatastoreCluster2'

Changes the name of the specified datastore cluster.

-------------- Example 2 --------------

Set-DatastoreCluster -DatastoreCluster MyDatastoreCluster -IOLatencyThresholdMillisecond 5

Sets the maximum I/O latency in milliseconds allowed before Storage DRS is triggered for the specified datastore cluster to 5 milliseconds.

-------------- Example 3 --------------

Set-DatastoreCluster -DatastoreCluster MyDatastoreCluster - SdrsAutomationLevel FullyAutomated

Changes the Storage DRS automation level of the specified datastore cluster to Fully Automated.


Set-DeployRule - vSphere Auto Deploy Reference

Set-DeployRule

Synopsis

Updates an existing rule.

Syntax

Set-DeployRule [-DeployRule] <DeployRule> [-Name <String>] [-Pattern <String[]>] [-AllHosts] [-Item <VIObjectCore[]>] [<CommonParameters>]

Related Commands

Copy-DeployRule
New-DeployRule

Detailed Description

Updates an existing rule with the specified items, patterns, or both. Rules cannot be changed once they have been used in the active rule set. Use Copy-DeployRule to make a copy of a rule with any desired changes.

You must have the "AutoDeploy.Rule.Edit" privilege on the root folder of vCenter Server to use this cmdlet.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
DeployRule | DeployRule | The rule to be changed. Use the DeployRule or the Name parameter to specify the rule. | true | false |
AllHosts | SwitchParameter | Specify AllHosts to apply the changed rule to all hosts. Specify either AllHosts or Pattern. | false | false |
Item | VIObjectCore[] | Item to apply to the specified hosts. The item can be an image profile, a host profile, or a cluster or folder in a vCenter Server system. This parameter supports object-by-name, so you can pass the name of the item. | false | true (ByValue) |
Name | String | Name of the rule to apply changes to. Use the DeployRule or the Name parameter to specify the rule. | false | false |
Pattern | String[] | Pattern that identifies the hosts to apply the rule to. Specify either AllHosts or Pattern. Pattern strings use the following syntax: <attr>==<value> Adds a pattern that exactly matches the specified value against the specified attribute. Use this syntax if you need to match a string that contains a comma. <attr>=<Val1 >[,val2,... ,valN] Adds a pattern that matches against the comma-separated list of values. Supported value types are: string Exact string match <ip1>-<ip2> Range of IPv4 addresses. | false | false |

Return Type

VMware.DeployAutomation.Types.DeployRule

Notes

Examples

-------------- Example 1 --------------

C:\PS> Set-DeployRule $rule -Pattern "ipv4=192.168.1.10-192.168.1.20"

Updates the rule to apply to the hosts with IPv4 addresses in the specified range.

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Set-DeployRuleSet - vSphere Auto Deploy Reference

Set-DeployRuleSet

Synopsis

Sets the list of rules in the working rule set.

Syntax

Set-DeployRuleSet [-DeployRule] <DeployRule[]> [-NoActivate] [<CommonParameters>]
Set-DeployRuleSet -Clear [-NoActivate] [<CommonParameters>]

Related Commands

Add-DeployRule
Remove-DeployRule

Detailed Description

Explicitly sets the list of rules in the working rule set. By default, the change to the working set is immediately activated.

Use the -Clear option to remove all rules from the working rule set.

You must have the "AutoDeploy.RuleSet.Edit" privilege on the root folder of vCenter Server to use this cmdlet.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
DeployRule | DeployRule[] | The array of rules that will make up the rule set. | true | true (ByValue) |
Clear | SwitchParameter | Removes all rules from the working rule set. | true | false |
NoActivate | SwitchParameter | Specify the NoActivate parameter to apply the change to the working rule set but not to the active rule set. | false | false |

Return Type

VMware.DeployAutomation.Types.DeployRuleSet

Notes

Examples

-------------- Example 1 --------------

C:\PS> Get-DeployRule "testrule", "rule2" | SetDeployRuleSet

Removes all rules from the working rule set and adds the rules named testrule and rule2.

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Set-DrsRule - vSphere PowerCLI Cmdlets Reference

Set-DrsRule

Synopsis

This cmdlet modifies an existing DRS rule.

Syntax

Set-DrsRule [[-Enabled] [<Boolean>]] [-Rule] <DrsRule[]> [-Name <String>] [-VM <VirtualMachine[]>] [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-DrsRule
New-DrsRule
Remove-DrsRule

Detailed Description

This cmdlet modifies an existing DRS rule. Each rule defines the virtual machines that can run on the same host (affinity rule) or must run on different hosts (anti-affinity rule).

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Enabled | Boolean | Indicates that the DRS rule is enabled. | false | false |
Rule | DrsRule[] | Specifies the DRS rule you want to modify. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Name | String | Specifies a new name for the DRS rule. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VM | VirtualMachine[] | Specifies the virtual machines that can be referenced by the new DRS rule. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified DrsVMAffinityRule objects

Notes

Examples

-------------- Example 1 --------------

$vm = Get-VM DrsRuleVM1*

Set-DrsRule -Rule $affinityRule -VM $vm -Enabled $true;

Updates the list of virtual machines that might be referenced by the DRS rule stored in the $affinityRule variable and enables the rule.


Set-EsxImageProfile - vSphere Imagebuilder Reference

Set-EsxImageProfile

Synopsis

Syntax

Set-EsxImageProfile [-ImageProfile] <ImageProfile> [-Name <String>] [-Vendor <String>] [-SoftwarePackage <SoftwarePackage[]>] [-AcceptanceLevel <AcceptanceLevels>] [-Description <String>] [-ReadOnly] [-Force] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Detailed Description

Set-EsxImageProfile is used to modify a user-created image profile. The cmdlet returns the modified ImageProfile object, which can be piped into any other cmdlet taking image profiles as input. For details on persistence, see New-EsxImageProfile.

If the ReadOnly property of the image profile is true, you cannot modify the image profile.

Image Builder performs all image profile validation tests on the modified image profile.

The Name and Vendor of the modified image profile must be unique. If you attempt to change the Name and Vendor, and the new Name and Vendor are the same as an existing Name and Vendor, an error result.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
ImageProfile | ImageProfile | (pipeline input, prompt) Specifies the image profile to edit. Takes one of the following forms: *Name of an image profile, as displayed in the Name column of Get-EsxImageProfile, or the Name property of any ImageProfile object *ImageProfile object | true | true (ByValue, ByPropertyName) |
AcceptanceLevel | AcceptanceLevels | Optional. Specifies the minimum acceptance level allowed for VIBs in the image profile, one of the following: *VMwareCertified *VMwareAccepted *PartnerSupported *CommunitySupported If the acceptance level is raised above the lowest acceptance level of any VIB in the profile, an error results. | false | false |
Confirm | SwitchParameter |  | false | false |
Description | String | Optional. Long string describing the contents or purpose of the image profile. | false | false |
Force | SwitchParameter | Installs packages that break extensibility rules such as standard file path. Also bypasses dependency checks on packages. Use this option with care. Because it bypasses standard validation checks, an invalid image profile might result. | false | false |
Name | String | String value to replace the current Name field with. | false | false |
ReadOnly | SwitchParameter | Optional. Makes the image profile read only. (not modifiable). | false | false |
SoftwarePackage | SoftwarePackage[] | (pipeline input) One or more VIB software packages that the image profile should contain. Replaces the list of VIBs in the image profile. The value takes one of the following forms: *Name of a VIB, as displayed in the Name column of Get-EsxSoftwarePackage, or the Name property of any SoftwarePackage object. The cmdlet selects the highest available version of the named package. *"<Name> <Version>", for specifying a specific version of a VIB named Name. *SoftwarePackage object *GUID of the VIB software package (from the Guid property of a SoftwarePackage) *List containing a mix of any of the above One of the "esx-base" packages is required for a valid image profile. | false | false |
Vendor | String | String value to replace the current Vendor field with. | false | false |
WarningAction | ActionPreference |  | false | false |
WarningVariable | String |  | false | false |
WhatIf | SwitchParameter |  | false | false |

Return Type

Notes

Examples

---------- Example 1 ----------

Set-EsxImageProfile -ImageProfile "Profile of a Fool" -SoftwarePackage esx-base,scsi-ips,esx-tboot

Modify the VIB list of an existing image profile

---------- Example 2 ----------

$myprofiles = Get-EsxImageProfile
Set-EsxImageProfile -ImageProfile $myprofiles[2] -AcceptanceLevel PartnerSupported

Change the acceptance level (maybe so that some VIB with a lower acceptance level can be added) of the third image profile from a list (index starts at 0):

---------- Example 3 ----------

Get-EsxImageProfile | Set-EsxImageProfile -ReadOnly

Using pipelining to mark all profiles as read-only

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Set-FloppyDrive - vSphere PowerCLI Cmdlets Reference

Set-FloppyDrive

Synopsis

This cmdlet modifies the configuration of the specified virtual floppy drive.

Syntax

Set-FloppyDrive [-Floppy] <FloppyDrive[]> [-FloppyImagePath <String>] [-HostDevice <String>] [-NoMedia] [-StartConnected [<Boolean>]] [-Connected [<Boolean>]] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-FloppyDrive
New-FloppyDrive
Remove-FloppyDrive

Detailed Description

This cmdlet modifies the configuration of the specified virtual floppy drive. If a floppy image path is provided, the cmdlet sets the floppy drive to point to the image. Also, the cmdlet updates the StartConnected and Connected properties. If the value of the NoMedia parameter is $true, the cmdlet removes the floppy drive's media backing and disconnects it. The FloppyImagePath, HostDevice, and NoMedia parameters cannot be used together. The Connected parameter can be specified only if the corresponding virtual machine is powered on.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Floppy | FloppyDrive[] | Specifies the virtual floppy drive you want to configure. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Connected | Boolean | If the value is $true, the virtual floppy drive is connected after its creation. If the value is $false, the floppy drive is disconnected. This parameter can be specified only if the corresponding virtual machine is powered on. | false | false |
FloppyImagePath | String | Specifies the datastore path to the floppy image file that backs the virtual floppy drive. Do not use this parameter when the HostDevice and NoMedia parameters are specified. | false | false |
HostDevice | String | Specifies the path to the floppy drive on the host that backs this virtual floppy drive. Do not use this parameter when the FloppyImagePath and NoMedia parameters are specified. | false | false |
NoMedia | SwitchParameter | Indicates that the floppy drive is to have no media (similar to removing the floppy from a physical drive). Do not use this parameter when the FloppyImagePath and HostDevice parameters are specified. | false | false |
StartConnected | Boolean | If the value is $true, the virtual floppy drive starts connected when its associated virtual machine powers on. If the value is $false, it starts disconnected. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified FloppyDrive objects

Notes

Examples

-------------- Example 1 --------------

Set-FloppyDrive -Floppy $floppy -StartConnected:$true

Sets a floppy to start connected.


Set-Folder - vSphere PowerCLI Cmdlets Reference

Set-Folder

Synopsis

This cmdlet modifies the properties of the specified folder.

Syntax

Set-Folder -Folder <Folder[]> [-Name] <String> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Folder
Move-Folder
New-Folder
Set-Folder
Remove-Folder

Detailed Description

This cmdlet modifies the properties of the specified folder.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies a new name for the folder. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Folder | Folder[] | Specifies the folder whose properties you want to change. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified Folder objects

Notes

Examples

-------------- Example 1 --------------

Get-Folder -Name "testFolder" | Set-Folder -Name "NewFolderName"

Renames the "testFolder" folder to "NewFolderName".


Set-HardDisk - vSphere PowerCLI Cmdlets Reference

Set-HardDisk

Synopsis

This cmdlet modifies the properties of the specified virtual hard disk.

Syntax

Set-HardDisk [-HardDisk] <HardDisk[]> [[-CapacityKB] <Int64>] [-CapacityGB <Decimal>] [[-Persistence] <String>] [[-Datastore] <Datastore>] [-StorageFormat <VirtualDiskStorageFormat>] [-Controller <ScsiController>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-HardDisk [-HardDisk] <HardDisk[]> [[-CapacityKB] <Int64>] [-CapacityGB <Decimal>] [[-Persistence] <String>] [[-Datastore] <Datastore>] [-StorageFormat <VirtualDiskStorageFormat>] [-Controller <ScsiController>] [-Server <VIServer[]>] [-HostCredential <PSCredential>] [-HostUser <String>] [-HostPassword <SecureString>] [-GuestCredential <PSCredential>] [-GuestUser <String>] [-GuestPassword <SecureString>] [-ToolsWaitSecs <Int32>] [-HelperVM <VirtualMachine>] [-Partition <String>] [-ResizeGuestPartition] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-HardDisk [-HardDisk] <HardDisk[]> [-Inflate] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-HardDisk [-HardDisk] <HardDisk[]> [-ZeroOut] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Copy-HardDisk
Get-HardDisk
New-HardDisk
Remove-HardDisk
Move-HardDisk

Detailed Description

This cmdlet modifies the properties of the specified virtual hard disk. You can change the size and the persistence type, and inflate or expand the specified virtual hard disk. Do not use the Inflate parameter at the same time with the Persistence and CapacityGB parameters. If a helper virtual machine is used, all virtual machines associated with the disk and the helper virtual machine should be powered off before expanding the disk. When you resize more than one disks using a helper virtual machine, the disks are resized one by one causing the helper machine to power on and off for each virtual machine and this might slow the cmdlet performance. The guest disk resizing functionality supports only Windows XP 32 SP3, Windows Server 2003 32bit SP2, Windows Server 2003 64bit SP2, Windows 7 64 bit, Windows Server 2008 R2 64bit, and Redhat Enterprise 5 guest operating systems. Please consider the Set-HardDisk feature to be experimental as it might be changed or removed in a future release.

To run this cmdlet to resize guest disk partitions against vCenter Server/ESX/ESXi versions earlier than 5.0, you need to meet the following requirements:
*You must run the cmdlet on the 32-bit version of Windows PowerShell.
*You must have access to the ESX that hosts the virtual machine over TCP port 902.
*For vCenter Server/ESX/ESXi versions earlier than 4.1, you need VirtualMachine.Interact.ConsoleInteract privilege. For vCenter Server/ESX/ESXi 4.1 and later, you need VirtualMachine.Interact.GuestControl privilege.

To run this cmdlet to resize guest disk partitions against vCenter Server/ESXi 5.0 and later, you need VirtualMachine.GuestOperations.Execute and VirtualMachine.GuestOperations.Modify privileges.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
HardDisk | HardDisk[] | Specifies the virtual hard disk you want to configure. | true | true (ByValue) |
CapacityKB | Int64 | This parameter is obsolete. Use CapacityGB instead. Specifies the updated capacity of the virtual disk in kilobytes (KB). If you are connected to a vCenter Server 2.0 or ESX 3.0 server, the size of the disk cannot be changed and the CapacityKB parameter is discarded. If you are connected to a vCenter Server 2.5 or ESX 3.5 server, the size of the disk can only be increased and the CapacityKB parameter is discarded if its value is less than the current disk size. | false | false |
Persistence | String | Specifies the disk persistence mode. The valid values are Persistent, NonPersistent, IndependentPersistent, IndependentNonPersistent, and Undoable. This parameter is supported only when the disk type is rawVirtual or flat. The NonPersistent and Undoable values are deprecated and scheduled for removal. Their usage is not recommended because they do not work with snapshots and are not supported on ESX 3.5 and later. | false | false |
Datastore | Datastore | Specifies the datastore to which you want to move the specified hard disk. Moving a hard disk attached to a virtual machine to a different datastore is only supported on vCenter Server. | false | false |
CapacityGB | Decimal | Specifies the updated capacity of the virtual disk in gigabytes (GB). If you are connected to a vCenter Server 2.0 or ESX 3.0 server, the size of the disk cannot be changed and the CapacityGB parameter is discarded. If you are connected to a vCenter Server 2.5 or ESX 3.5 server, the size of the disk can only be increased and the CapacityGB parameter is discarded if its value is less than the current disk size. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Controller | ScsiController | Specifies a SCSI controller to which you want to attach the hard disk. | false | false |
GuestCredential | PSCredential | Specifies the PSCredential object that contains the credentials you want to use for authenticating with the guest operating system. | false | false |
GuestPassword | SecureString | Specifies the password you want to use for authenticating with the guest operating system. | false | false |
GuestUser | String | Specifies the username you want to use for authenticating with the guest operating system. | false | false |
HelperVM | VirtualMachine | Specifies a helper virtual machine you want to use when expanding a Windows virtual machine system disk. LVM (logical volume manager) for Linux is not supported and Linux guest system disks cannot be expanded. When a helper virtual machine is used, all virtual machines associated with the disk and the helper virtual machine must be powered off before expanding the disk. When you resize more than one disks using a helper virtual machine, the disks are resized one by one causing the helper machine to power on and off for each virtual machine, and this might slow down the cmdlet performance. | false | false |
HostCredential | PSCredential | Specifies the PSCredential object that contains the credentials you want to use for authenticating with the host. | false | false |
HostPassword | SecureString | Specifies the password you want to use for authenticating with the host. | false | false |
HostUser | String | Specifies the username you want to use for authenticating with the host. | false | false |
Inflate | SwitchParameter | Indicates that you want to inflate the hard disk. | false | false |
Partition | String | Specifies the partitions you want to resize. On Windows, you can specify which partition you want to resize by using the Partition parameter. If you do not specify a partition, the last partition of the disk is resized. On Linux, only the last partition can be expanded. Resizing guest partitions is supported only for Windows OS and for ext3 partitions on RHEL 5. It is achieved by scripts, provided with the vSphere PowerCLI installation. You can modify these scripts or add new ones to support operating systems different than Windows and RHEL 5, and more specific disk resizing scenarios. The scripts are located in the "Scripts" folder in the PowerCLI installation directory and their names have the following format: GuestDiskExpansion_<OS_Identifier> <OS_Identifier> is the guest family or the guest ID (as returned by Get-VMGuest). If no partition is specified, the last partition of the hard disk is resized. | false | false |
ResizeGuestPartition | SwitchParameter | Indicates that you want to resize the guest partition of the disk. To use this feature, VMware Tools must be running on the virtual machine. On Windows, you can specify which partition you want to resize by using the Partition parameter. If you don't specify a partition, the last partition of the disk is resized. On Linux, only the last partition can be expanded. Resizing guest partitions is supported only for Windows OS and for ext3 partitions on RHEL 5. It is achieved by scripts, provided with the vSphere PowerCLI installation. You can modify these scripts or add new ones to support operating systems different than Windows and RHEL 5, and more specific disk resizing scenarios. The scripts are located in the "Scripts" folder in the PowerCLI installation directory and their names have the following format: GuestDiskExpansion_<OS_Identifier> <OS_Identifier> is the guest family or the guest ID (as returned by Get-VMGuest). | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
StorageFormat | VirtualDiskStorageFormat | Specifies the storage format of the relocated hard disk. This parameter is applicable only when moving a virtual machine disk to a different datastore, using the Datastore parameter. This parameter accepts Thin, Thick, and EagerZeroedThick values. | false | false |
ToolsWaitSecs | Int32 | Specifies the time in seconds to wait for a response from VMware Tools. If a non-positive value is provided, the system waits infinitely long time. | false | false | $null
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |
ZeroOut | SwitchParameter | Specifies that you want to fill the hard disk with zeros. This parameter is supported only if you are directly connected to an ESX/ESXi host. The ZeroOut functionality is experimental. | false | false |

Return Type

Zero or more modified HardDisk objectsHardDisk

Notes

Set-HardDisk cannot inflate a hard disk that has already been inflated. Non-persistent and undoable disks are not supported. Migrating a hard disk attached to a virtual machine to a different datastor e is supported only on vCenter Server.

Examples

-------------- Example 1 --------------

Get-HardDisk -VM $vm | Set-HardDisk -Persistence "IndependentNonPersistent"

Changes the persistence of a hard disk to IndependentNonPersistent.

-------------- Example 2 --------------

Set-HardDisk -HardDisk $harddisk -CapacityGB $extendedCapacity -GuestCredential $guestCred

Extends a hard disk with the specified capacity. The command also extends the disk on the guest OS.

-------------- Example 3 --------------

Set-HardDisk -HardDisk $harddisk -Datastore $datastore

Moves the hard disk to the specified datastore.


Set-IScsiHbaTarget - vSphere PowerCLI Cmdlets Reference

Set-IScsiHbaTarget

Synopsis

This cmdlet modifies the configuration of an iSCSI HBA target.

Syntax

Set-IScsiHbaTarget -Target <IScsiHbaTarget[]> [-ChapType <ChapType>] [-ChapName <String>] [-ChapPassword <String>] [-MutualChapEnabled [<Boolean>]] [-MutualChapName <String>] [-MutualChapPassword <String>] [-InheritChap [<Boolean>]] [-InheritMutualChap [<Boolean>]] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-IScsiHbaTarget
New-IScsiHbaTarget
Remove-IScsiHbaTarget
Get-VMHostHba
Set-VMHostHba

Detailed Description

This cmdlet modifies the configuration of an iSCSI HBA target. The cmdlet modifies the CHAP and Digest properties of an iSCSI HBA target. You must specify at least one of the CHAP-related (or Mutual CHAP) parameters. Otherwise, an error message is displayed.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
ChapName | String | Specifies the CHAP initiator name if CHAP is enabled. | false | false | Use the old name if any. Otherwise, use the initiator name.
ChapPassword | String | Specifies the CHAP password if CHAP is enabled. | false | false |
ChapType | ChapType | Specifies the type of the CHAP authorization. The valid values are Prohibited, Discouraged, Preferred, and Required. If you set ChapType to Discouraged, Preferred, or Required, then you must specify the ChapPassword parameter as well. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
InheritChap | Boolean | Indicates that the CHAP setting is inherited from the iSCSI HBA device. | false | false |
InheritMutualChap | Boolean | Indicates that the Mutual CHAP setting is inherited from the iSCSI HBA device. | false | false |
MutualChapEnabled | Boolean | Indicates that mutual CHAP is enabled. In this case, you must specify the MutualChapPassword parameter as well. | false | false |
MutualChapName | String | Specifies the Mutual CHAP initiator name if CHAP is enabled. | false | false | Use the old name if any. Otherwise, use the initiator name.
MutualChapPassword | String | Specifies the Mutual CHAP password if CHAP is enabled. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Target | IScsiHbaTarget[] | Specifies the iSCSI HBA target you want to configure. To identify the target, you can provide an IScsiTarget object or use an <Address>:<Port> string. | true | true (ByValue) |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified IScsiHbaTarget objects

Notes

CHAP configuration is supported only on vCenter Server/ESX 4.0 and later.

Examples

-------------- Example 1 --------------

Get-IScsiHbaTarget -Address "10.23.84.73" -Type Static | Set-IScsiHbaTarget -ChapType Prohibited

Retrieves the targets of type Static on the specified address and sets their CHAP type to Prohibited.

-------------- Example 2 --------------

$target = Get-IScsiHbaTarget -Address "10.23.84.73" -Type Send

Set-IScsiHbaTarget -Target $target -ChapType Required -ChapPassword pass1 -MutualChapEnabled -MutualChapPassword pass2

Modifies the CHAP and Mutual CHAP settings of the targets of type Send on the specified address.


Set-NetworkAdapter - vSphere PowerCLI Cmdlets Reference

Set-NetworkAdapter

Synopsis

This cmdlet modifies the configuration of the virtual network adapter.

Syntax

Set-NetworkAdapter [-NetworkAdapter] <NetworkAdapter[]> [-MacAddress <String>] [-NetworkName <String>] [-StartConnected [<Boolean>]] [-Connected [<Boolean>]] [-WakeOnLan [<Boolean>]] [-Type <VirtualNetworkAdapterType>] [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-NetworkAdapter [-NetworkAdapter] <NetworkAdapter[]> [-MacAddress <String>] [-StartConnected [<Boolean>]] [-Connected [<Boolean>]] [-WakeOnLan [<Boolean>]] [-Type <VirtualNetworkAdapterType>] -PortId <String> -DistributedSwitch <DistributedSwitch> [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-NetworkAdapter [-NetworkAdapter] <NetworkAdapter[]> -Portgroup <VirtualPortGroupBase> [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-NetworkAdapter
New-NetworkAdapter
Remove-NetworkAdapter

Detailed Description

This cmdlet modifies the configuration of the virtual network adapter. You can change the MAC address and the network name, and to configure the Connected, StartConnected, and WakeOnLan properties of the adapter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
NetworkAdapter | NetworkAdapter[] | Specifies the virtual network adapter you want to configure. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Connected | Boolean | If the value is $true, the virtual network adapter is connected after its creation. If the value is $false, it is disconnected. | false | false |
DistributedSwitch | DistributedSwitch | Specifies a virtual switch to which you want to connect the network adapter. | true | false |
MacAddress | String | Specifies an optional MAC address for the virtual network adapter. | false | false |
NetworkName | String | Specifies the name of the network to which you want to connect the virtual network adapter. Specifying a distributed port group name is obsolete. Use the Portgroup parameter instead. | false | false |
Portgroup | VirtualPortGroupBase | Specifies a standard or a distributed port group to which you want to connect the network adapter. | true | false |
PortId | String | Specifies the port of the virtual switch to which you want to connect the network adapter. Use this parameter only if the DistributedSwitch parameter is specified. | true | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
StartConnected | Boolean | If the value is $true, the virtual network adapter starts connected when its associated virtual machine powers on. If the value is $false, it starts disconnected. | false | false |
Type | VirtualNetworkAdapterType | Specifies the type of the network adapter. The valid types are e1000, Flexible, Vmxnet, EnhancedVmxnet, and Vmxnet3, and Unknown. | false | false |
WakeOnLan | Boolean | Indicates that wake-on-LAN is enabled on the virtual network adapter. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified NetworkAdapter objcts

Notes

Examples

-------------- Example 1 --------------

Get-VM VM | Get-NetworkAdapter | Set-NetworkAdapter -MacAddress '00:50:56:a1:00:00' -WakeOnLan:$true

Configures the Mac address and the WakeOnLan setting of a virtual network adapter.

-------------- Example 2 --------------

Get-VM VM | Get-NetworkAdapter | Set-NetworkAdapter -Type EnhancedVmxnet

Sets the type of the virtual network adapter.

-------------- Example 3 --------------

Get-VM VM | Get-NetworkAdapter | Set-NetworkAdapter -Connected:$true

Sets the connection state of the virtual network adapter.

-------------- Example 4 --------------

$myNetworkAdapters = Get-VM | Get-NetworkAdapter -Name "Network adapter 1"
$myVDPortGroup = Get-VDPortgroup -Name MyVDPortGroup
Set-NetworkAdapter -NetworkAdapter $myNetworkAdapters -Portgroup $myVDPortGroup

Retrieves all network adapters named "Network adapter 1" from all virtual machines and connects them to the specified distributed port group.

-------------- Example 5 --------------

$myNetworkAdapter = Get-VM -Name MyVM | Get-NetworkAdapter -Name "Network adapter 1"
$myVDSwitch = Get-VDSwitch -Name MyVDSwitch
Set-NetworkAdapter -NetworkAdapter $myNetworkAdapter -DistributedSwitch $MyVDSwitch -PortId 100

Retrieves the network adapter named "Network adapter 1" added to the specified virtual machine and connects it to the specified port on the specified distributed switch.


Set-NicTeamingPolicy - vSphere PowerCLI Cmdlets Reference

Set-NicTeamingPolicy

Synopsis

This cmdlet modifies the specified NIC teaming policy.

Syntax

Set-NicTeamingPolicy [-VirtualSwitchPolicy] <NicTeamingVirtualSwitchPolicy[]> [-BeaconInterval <Int32>] [-LoadBalancingPolicy <LoadBalancingPolicy>] [-NetworkFailoverDetectionPolicy <NetworkFailoverDetectionPolicy>] [-NotifySwitches [<Boolean>]] [-FailbackEnabled [<Boolean>]] [-MakeNicActive <PhysicalNic[]>] [-MakeNicStandby <PhysicalNic[]>] [-MakeNicUnused <PhysicalNic[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-NicTeamingPolicy [-VirtualPortGroupPolicy] <NicTeamingVirtualPortGroupPolicy[]> [-InheritLoadBalancingPolicy [<Boolean>]] [-InheritNetworkFailoverDetectionPolicy [<Boolean>]] [-InheritNotifySwitches [<Boolean>]] [-InheritFailback [<Boolean>]] [-InheritFailoverOrder [<Boolean>]] [-LoadBalancingPolicy <LoadBalancingPolicy>] [-NetworkFailoverDetectionPolicy <NetworkFailoverDetectionPolicy>] [-NotifySwitches [<Boolean>]] [-FailbackEnabled [<Boolean>]] [-MakeNicActive <PhysicalNic[]>] [-MakeNicStandby <PhysicalNic[]>] [-MakeNicUnused <PhysicalNic[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-NicTeamingPolicy

Detailed Description

This cmdlet modifies the specified NIC teaming policy. You can change the load balancing and failover settings. Default NIC teaming policies are set for the entire virtual switch and can be overridden at port group level.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VirtualPortGroupPolicy | NicTeamingVirtualPortGroupPolicy[] | Specifies the virtual port group policy to configure. | true | true (ByValue) |
VirtualSwitchPolicy | NicTeamingVirtualSwitchPolicy[] | Specifies the virtual switch policy to configure. | true | true (ByValue) |
BeaconInterval | Int32 | Specifies the interval at which the server sends out beacon probes on all NICs in the team. The value must be a positive integer. This parameter is used when the value of the NetworkFailoverDetectionPolicy parameter is BeaconProbing. | false | false | $null
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
FailbackEnabled | Boolean | Specifies how a physical adapter is returned to active duty after recovering from a failure. If the value is $true, the adapter is returned to active duty immediately on recovery, displacing the standby adapter that took over its slot, if any. If the value is $false, a failed adapter is left inactive even after recovery until another active adapter fails, requiring its replacement. | false | false | $true
InheritFailback | Boolean | Indicates that the value of the FailbackEnabled parameter is inherited from the virtual switch. | false | false |
InheritFailoverOrder | Boolean | Indicates that the value of the MakeNicActive, MakeNicStandBy, and MakeNicUnused parameters are inherited from the virtual switch. | false | false |
InheritLoadBalancingPolicy | Boolean | Indicates that the value of the LoadBalancingPolicy parameter is inherited from the virtual switch. | false | false |
InheritNetworkFailoverDetectionPolicy | Boolean | Indicates that the value of the NetworkFailoverDetectionPolicy parameter is inherited from the virtual switch. | false | false |
InheritNotifySwitches | Boolean | Indicates that the value of the NotifySwitches parameter is inherited from the virtual switch. | false | false |
LoadBalancingPolicy | LoadBalancingPolicy | Determines how network traffic is distributed between the network adapters assigned to a switch. The following values are valid: LoadBalanceIP - Route based on IP hash. Choose an uplink based on a hash of the source and destination IP addresses of each packet. For non-IP packets, whatever is at those offsets is used to compute the hash. LoadBalanceSrcMac - Route based on source MAC hash. Choose an uplink based on a hash of the source Ethernet. LoadBalanceSrcId - Route based on the originating port ID. Choose an uplink based on the virtual port where the traffic entered the virtual switch. ExplicitFailover - Always use the highest order uplink from the list of Active adapters that passes failover detection criteria. | false | false | $null
MakeNicActive | PhysicalNic[] | Specifies the adapters you want to continue to use when the network adapter connectivity is available and active. | false | false |
MakeNicStandby | PhysicalNic[] | Specifies the adapters you want to use if one of the active adapter's connectivity is unavailable. | false | false |
MakeNicUnused | PhysicalNic[] | Specifies the adapters you do not want to use. | false | false |
NetworkFailoverDetectionPolicy | NetworkFailoverDetectionPolicy | Specifies how to reroute traffic in the event of an adapter failure. The following values are valid: LinkStatus - Relies solely on the link status that the network adapter provides. This option detects failures, such as cable pulls and physical switch power failures, but not configuration errors, such as a physical switch port being blocked by spanning tree or misconfigured to the wrong VLAN or cable pulls on the other side of a physical switch. BeaconProbing - Sends out and listens for beacon probes on all NICs in the team and uses this information, in addition to link status, to determine link failure. This option detects many of the failures mentioned above that are not detected by link status alone. | false | false | $null
NotifySwitches | Boolean | Indicates that whenever a virtual NIC is connected to the virtual switch or whenever that virtual NIC's traffic is routed over a different physical NIC in the team because of a failover event, a notification is sent over the network to update the lookup tables on the physical switches. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified NicTeamingVirtualSwitchPolicy or NicTeamingVirtualPortGroupPolicy objects

Notes

Examples

-------------- Example 1 --------------

$policy = Get-VirtualSwitch -VMHost (Get-VMHost *.128) -Name vSwitch1 | Get-NicTeamingPolicy

$policy | Set-NicTeamingPolicy -LoadBalancingPolicy LoadBalanceSrcMac

Configures the NicTeaming policy of the vSwitch1 virtual switch.


Set-Org - vCloud Snapin Cmdlets Reference

Set-Org

Synopsis

This cmdlet modifies the configuration of the specified organization.

Syntax

Set-Org [-Org] <Org[]> [-Name <String>] [-FullName <String>] [-Description <String>] [-Enabled [<Boolean>]] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Org
New-Org
Remove-Org

Detailed Description

This cmdlet modifies the configuration of the specified organization.

Note: This cmdlet is available only to Provider Administrators. To ensure backward compatibility, PowerCLI provides limited support for this cmdlet for Tenant Administrators against vCloud Director 5.1 environments. When you develop new tenant scripts for vCloud Director 5.1 environments, do not use this cmdlet.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Org | Org[] | Specifies the organization that you want to configure. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Description | String | Specifies a description for the organization you want to modify. | false | false |
Enabled | Boolean | Specifies whether you want to enable or disable the organization. Note: This parameter is only available to Provider Administrators. | false | false |
FullName | String | Specifies a new full name for the organization. | false | false |
Name | String | Specifies a new unique name identifier for the organization. To set a new unique name identifier for organizations in a vCloud Director 5.1 environment, you need to disable the organization first. Note: This parameter is only available to Provider Administrators. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false | $defaultCIServers
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified Organization objects

Notes

Examples

-------------- Example 1 --------------

Get-Org -Name "MyOrg" | Set-Org -Enabled:$false | Set-Org -Name "MyOrgNewName" -FullName "MyOrgFullName2" -Description "Update my Org"

Disables an organization and modifies its unique name identifier, its full name and its description.

-------------- Example 2 --------------

Get-Org -Name 'MyOrg' | Set-Org -FullName 'MyNewOrgFullName' -Description "This is my updated organization."

Updates the full name and the description of the specified organization.

Note: This example is supported only on vCloud Director 1.5.x environments.


Set-OrgNetwork - vCloud Snapin Cmdlets Reference

Set-OrgNetwork

Synopsis

This cmdlet modifies the configuration of the specified organization network.

Syntax

Set-OrgNetwork [-OrgNetwork] <OrgNetwork[]> [-Name <String>] [-Description <String>] [-PrimaryDns <IPAddress>] [-SecondaryDns <IPAddress>] [-DnsSuffix <String>] [-StaticIPPool <IPRangeList>] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-OrgNetwork
New-OrgNetwork
Remove-OrgNetwork

Detailed Description

This cmdlet modifies the configuration of the specified organization network. Note: This cmdlet is only available to Provider Administrators.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
OrgNetwork | OrgNetwork[] | Specifies the organization network that you want to configure. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Description | String | Specifies a new description for the organization network that you want to configure. | false | false |
DnsSuffix | String | Specifies a new DNS suffix for the organization network that you want to configure. | false | false |
Name | String | Specifies a new name for the organization network that you want to configure. | false | false |
PrimaryDns | IPAddress | Specifies a new primary DNS for the organization network that you want to configure. | false | false |
SecondaryDns | IPAddress | Specifies a new secondary DNS for the organization network that you want to configure. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
StaticIPPool | IPRangeList | Specifies a new range of static IP addresses that the organization network will allocate to virtual machines. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified OrgNetwork objects

Notes

Examples

-------------- Example 1 --------------

$myOrgNetwork = Get-OrgNetwork -Name 'MyInternalOrgNetwork'
Set-OrgNetwork -OrgNetwork $myOrgNetwork -DnsSuffix "myOrgNewDns" -PrimaryDns "192.168.10.1" -SecondaryDns "192.168.10.2"

Modifies the DNS settings for the specified internal organization network.

-------------- Example 2 --------------

$myOrgNetwork = Get-OrgNetwork -Name 'MyInternalOrgNetwork'
Set-OrgNetwork -OrgNetwork $myOrgNetwork -StaticIpPool "192.168.10.42-192.168.10.66"

Changes the range of static IP addresses that are available for the organization network to allocate to virtual machines.


Set-OrgVdc - vCloud Snapin Cmdlets Reference

Set-OrgVdc

Synopsis

This cmdlet modifies the configuration of the specified organization virtual datacenter (vDC).

Syntax

Set-OrgVdc [-OrgVdc] <OrgVdc[]> [-CpuAllocationGHz <Double>] [-CpuGuaranteedPercent <Int32>] [-Description <String>] [-Enabled [<Boolean>]] [-MemoryAllocationGB <Decimal>] [-MemoryGuaranteedPercent <Int32>] [-Name <String>] [-NetworkMaxCount <Int32>] [-NetworkPool <NetworkPool>] [-NicMaxCount <Int32>] [-Server <CIServer[]>] [-StorageAllocationGB <Decimal>] [-ThinProvisioned [<Boolean>]] [-UseFastProvisioning [<Boolean>]] [-VMCpuCoreMHz <Int64>] [-VMMaxCount <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-OrgVdc
New-OrgVdc
Remove-OrgVdc

Detailed Description

This cmdlet modifies the configuration of the specified organization virtual datacenter (vDC).

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
OrgVdc | OrgVdc[] | Specifies the organization vDC that you want to configure. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
CpuAllocationGHz | Double | Specifies the CPU resources in gigahertz (GHz) that you want to allocate to the organization vDC. This parameter is only applicable to the Allocation Pool and Resource Pool resource allocation models. | false | false |
CpuGuaranteedPercent | Int32 | Specifies the percentage of CPU resources that are reserved for the organization vDC. This parameter accepts values in the range of 0 to 100. This parameter is only applicable to the Pay As You Go and Allocation Pool resource allocation models. | false | false |
Description | String | Specifies a new description for the specified organization vDC. | false | false |
Enabled | Boolean | Specifies whether the organization vDC is enabled. | false | false |
MemoryAllocationGB | Decimal | Specifies the memory resources in gigabytes (GB) that you want to allocate to the organization vDC. This parameter is only applicable to the Allocation Pool and Resource Pool resource allocation models. | false | false |
MemoryGuaranteedPercent | Int32 | Specifies the percentage of memory resources that are reserved for the organization vDC. This parameter accepts values in the range of 0 to 100. This parameter is only applicable to the Pay As You Go and Allocation Pool resource allocation models. | false | false |
Name | String | Specifies a new name for the organization vDC. | false | false |
NetworkMaxCount | Int32 | Specifies the maximum number of provisioned networks for the organization vDC. To specify that there is no limit, pass $null. | false | false |
NetworkPool | NetworkPool | Specifies a provision network pool for your organization vDC. The organization vDC will use this network pool to create vApp networks. To specify that there is no network pool, pass $null. | false | false |
NicMaxCount | Int32 | Specifies the maximum number of NICs in the organization vDC. To specify that there is no limit, pass $null. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
StorageAllocationGB | Decimal | Specifies the storage resources in gigabytes (GB) that you want to allocate to the organization vDC. To specify that there is no limit, pass $null. Note: This parameter is supported only on vCloud Director 1.5.x environments. | false | false |
ThinProvisioned | Boolean | Indicates whether you want to enable thin provisioning. | false | false |
UseFastProvisioning | Boolean | Indicates whether you want to enable fast provisioning. | false | false |
VMCpuCoreMHz | Int64 | Specifies a vCPU speed in megahertz (MHz). This value defines what a virtual machine with one vCPU will consume at maximum when running within this organization vDC. A virtual machine with two vCPUs would consume a maximum of twice this value. This parameter is only applicable to the Pay As You Go resource allocation model. | false | false |
VMMaxCount | Int32 | Specifies the maximum number of virtual machines in the organization vDC. To specify that there is no limit, pass $null. This parameter is only applicable to the Pay As You Go resource allocation model. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified OrgVdc objects

Notes

Examples

-------------- Example 1 --------------

Get-OrgVdc -Name 'MyPayAsYouGoOrgVdc' | Set-OrgVdc -Name "NewOrgVdcName" -Description "The settings for this organization vDC have been modified." -VMMaxCount 2 -VMCpuCoreMhz 512 -Enabled $false

Modifies the name and description of the organization vDC, and changes the maximum number of virtual machines and the vCPU speed in the organization vDC. Disables the organization vDC.

-------------- Example 2 --------------

$myNetworkPool = Get-NetworkPool -Name 'MyNetworkPool'
Get-OrgVdc -Name 'MyReservationPoolOrgVdc' | Set-OrgVdc -NetworkPool $myNetworkPool -NetworkMaxCount 3 -NicMaxCount $null

Changes the network pool, the maximum number of networks and the maximum amount of NICs in the organization vDC.

-------------- Example 3 --------------

Get-OrgVdc -Name 'MyAllocationPoolOrgVdc' | Set-OrgVdc -MemoryAllocationGB 0.1 -MemoryGuaranteedPercent 75 -StorageAllocationGB 0.1 -CpuAllocationGHz 0.3 -CpuGuaranteedPercent 50 -ThinProvisioned $true -UseFastProvisioning $true

Modifies the memory, storage, and CPU allocation settings for the organization vDC, and enables thin and fast provisioning.


Set-OSCustomizationNicMapping - vSphere PowerCLI Cmdlets Reference

Set-OSCustomizationNicMapping

Synopsis

This cmdlet modifies the provided OS customization NIC mappings.

Syntax

Set-OSCustomizationNicMapping -OSCustomizationNicMapping <OSCustomizationNicMapping[]> [-Position <Int32>] [-Server <VIServer[]>] [-IpMode <OSCustomizationIPMode>] [-VCApplicationArgument <String>] [[-IpAddress] <String>] [[-SubnetMask] <String>] [[-DefaultGateway] <String>] [-AlternateGateway <String>] [[-Dns] <String[]>] [-Wins <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-OSCustomizationNicMapping -OSCustomizationNicMapping <OSCustomizationNicMapping[]> [-NetworkAdapterMac <String>] [-Server <VIServer[]>] [-IpMode <OSCustomizationIPMode>] [-VCApplicationArgument <String>] [[-IpAddress] <String>] [[-SubnetMask] <String>] [[-DefaultGateway] <String>] [-AlternateGateway <String>] [[-Dns] <String[]>] [-Wins <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-OSCustomizationNicMapping
New-OSCustomizationNicMapping
Remove-OSCustomizationNicMapping

Detailed Description

This cmdlet modifies the provided OS customization NIC mappings. If the parent spec of the provided NIC mapping is a server-side spec, it is updated on the server. If the parent spec is client-side, the reference that is kept in the memory is updated, but the variable that is passed to the cmdlet is not modified.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
IpAddress | String | Specifies an IP address. Using this parameter automatically sets the IpMode parameter to UseStaticIp. | false | false |
SubnetMask | String | Specifies a subnet mask. | false | false |
DefaultGateway | String | Specifies a default gateway. | false | false |
Dns | String[] | Specifies a DNS address. This parameter applies only to Windows operating systems. | false | false |
AlternateGateway | String | Specifies an alternate gateway. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
IpMode | OSCustomizationIPMode | Specifies the IP configuration mode. The valid values are UseDhcp, PromptUser, UseVCApplication, and UseStaticIP. | false | false | UseDhcp
NetworkAdapterMac | String | Specifies the MAC address of the network adapter to which you want to map the OS customization specification. | false | false |
OSCustomizationNicMapping | OSCustomizationNicMapping[] | Specifies the OS customization NIC mapping you want to configure. | true | true (ByValue) |
Position | Int32 | Specifies the position of the mapping you want to modify. | false | false | last
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VCApplicationArgument | String | Specifies a new argument you want to pass to VCApplication in order to obtain an IP address. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |
Wins | String[] | Specifies WINS servers. This parameter applies only to Windows operating systems. | false | false |

Return Type

Zero or more modified OSCustomizationNicMapping objects

Notes

Examples

-------------- Example 1 --------------

Get-OSCustomizationSpec Spec | Get-OSCustomizationNicMapping | Set-OSCustomizationNicMapping -IpAddress 10.0.0.2

Modifies the IP address of the specified NIC mapping that uses static IP mode.

-------------- Example 2 --------------

Get-OSCustomizationSpec Spec | Get-OSCustomizationNicMapping | Set-OSCustomizationNicMapping -VcApplicationArgument "subnet2"

Modifies the VCApplication argument of the specified NIC mapping.

-------------- Example 3 --------------

Get-OSCustomizationSpec Spec | Get-OSCustomizationNicMapping | Set-OSCustomizationNicMapping -IpMode UseStaticIp -IpAddress 10.10.0.1 -SubnetMask 255.255.255.0 -DefaultGateway 10.10.0.1 -AlternateGateway 10.10.0.1 -Dns 10.10.150.1 -PrimaryWins 10.10.150.2

Modifies the attributes of a NIC mapping.

-------------- Example 4 --------------

Set-OSCustomizationNicMapping -OSCustomizationNicMapping $nicMapping1, $nicMapping2 -IPMode UseVCApplication -VcApplicationArgument "subnet2"

Modifies the specified NIC mapping using VCApplication.


Set-OSCustomizationSpec - vSphere PowerCLI Cmdlets Reference

Set-OSCustomizationSpec

Synopsis

This cmdlet modifies the specified OS customization specification.

Syntax

Set-OSCustomizationSpec [-OSCustomizationSpec] <OSCustomizationSpec[]> [-NewSpec <OSCustomizationSpec>] [-Type <OSCustomizationSpecType>] [-Server <VIServer[]>] [-Name <String>] [-DnsServer <String[]>] [-DnsSuffix <String[]>] [-Domain <String>] [-NamingScheme <String>] [-NamingPrefix <String>] [-Description <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-OSCustomizationSpec [-FullName <String>] [-OrgName <String>] [-ChangeSID [<Boolean>]] [-DeleteAccounts [<Boolean>]] [-OSCustomizationSpec] <OSCustomizationSpec[]> [-NewSpec <OSCustomizationSpec>] [-Type <OSCustomizationSpecType>] [-Server <VIServer[]>] [-Name <String>] [-DnsServer <String[]>] [-DnsSuffix <String[]>] [-GuiRunOnce <String[]>] [-AdminPassword <String>] [-TimeZone <String>] [-AutoLogonCount <Int32>] [-Domain <String>] [-Workgroup <String>] [-DomainCredentials <PSCredential>] [-DomainUsername <String>] [-DomainPassword <String>] [-ProductKey <String>] [-NamingScheme <String>] [-NamingPrefix <String>] [-Description <String>] [-LicenseMode <LicenseMode>] [-LicenseMaxConnections <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
New-OSCustomizationSpec

Detailed Description

This cmdlet modifies the specified OS customization specification. The specification to be updated is identified by one or both of the Name and Spec parameters. If a Windows specification is to be updated, one of the Domain and Workgroup parameters must be provided. If a Linux specification is to be updated, the Domain parameter must be provided. This cmdlet runs only on x32 process.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
OSCustomizationSpec | OSCustomizationSpec[] | Specifies the specification you want to modify. | true | true (ByValue)
AdminPassword | String | Specifies the new OS administrator's password. This parameter applies only to Windows operating systems. | false | false
AutoLogonCount | Int32 | Specifies the number of times the virtual machine should automatically login as an administrator. The valid values are in the range between 0 and Int32.MaxValue. Specifying 0 disables auto log-on. This parameter applies only to Windows operating systems. | false | false | 0
ChangeSID | Boolean | Indicates that the customization should modify the system security identifier (SID). This parameter applies only to Windows operating systems. | false | false
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
DeleteAccounts | Boolean | Indicates that you want to delete all user accounts. This parameter applies only to Windows operating systems. | false | false
Description | String | Provides a new description for the specification. | false | false | empty string
DnsServer | String[] | Specifies the DNS server. This parameter applies only to Linux operating systems. | false | false
DnsSuffix | String[] | Specifies the DNS suffix. This parameter applies only to Linux operating systems. | false | false
Domain | String | Specifies the domain name. | false | false | empty string
DomainCredentials | PSCredential | Specifies credentials for authentication with the specified domain. This parameter applies only to Windows operating systems. | false | false
DomainPassword | String | Specifies a password for authentication with the specified domain. This parameter applies only to Windows operating systems. | false | false
DomainUsername | String | Specifies a username for authentication with the specified domain. This parameter applies only to Windows operating systems. | false | false
FullName | String | Specifies the administrator's full name. This parameter applies only to Windows operating systems. | false | false
GuiRunOnce | String[] | Provides a list of commands to run after first user login. This parameter applies only to Windows operating systems. | false | false
LicenseMaxConnections | Int32 | Specifies the maximum connections for server license mode. Use this parameter only if the LicenseMode parameter is set to Perserver. This parameter applies only to Windows operating systems. | false | false | $null
LicenseMode | LicenseMode | Specifies the license mode of the Windows 2000/2003 guest operating system. The valid values are Perseat, Perserver, and NotSpecified. If Perserver is set, use the LicenseMaxConnection parameter to define the maximum number of connections. This parameter applies only to Windows operating systems. | false | false | NotSpecified
Name | String | Specifies a new name for the OS customization specification. | false | false
NamingPrefix | String | The behavior of this parameter is related to the customization scheme. If a Custom customization scheme is specified, NamingPrefix is an optional argument that is passed to the utility for this IP address. The value of this field is defined by the user in the script. If a Fixed customization scheme is specified, NamingPrefix should indicate the name of the virtual machine. If a Prefix customization scheme is set, NamingPrefix indicates the prefix to which a unique number is appended. | false | false | empty string
NamingScheme | String | Specifies the naming scheme for the virtual machine. The valid values are Custom, Fixed, Prefix, and Vm. | false | false | Vm
NewSpec | OSCustomizationSpec | If no other parameters are provided, this parameter specifies a specification from which to retrieve information for the updated specification. | false | false
OrgName | String | Specifies the name of the organization to which the administrator belongs. | false | false
ProductKey | String | Specifies the MS product key. If the guest OS version is earlier than Vista, this parameter is required in order to make the customization unattended. For Windows Vista and later, the OS customization is unattended no matter if the ProductKey parameter is set. | false | false | empty string
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false
TimeZone String Specifies the name or ID of the time zone for a Windows guest OS only. Using wildcards is supported. The following time zones are available:

000 Int'l Dateline
001 Samoa
002 Hawaii
003 Alaskan
004 Pacific
010 Mountain (U.S. and Canada)
015 U.S. Mountain: Arizona
020 Central (U.S. and Canada)
025 Canada Central
030 Mexico
033 Central America
035 Eastern (U.S. and Canada)
040 U.S. Eastern: Indiana (East)
045 S.A. Pacific
050 Atlantic (Canada)
055 S.A. Western
056 Pacific S.A.
060 Newfoundland
065 E. South America
070 S.A. Eastern
073 Greenland
075 Mid-Atlantic
080 Azores
083 Cape Verde Islands
085 GMT (Greenwich Mean Time)
090 GMT Greenwich
095 Central Europe
100 Central European
105 Romance
110 W. Europe
113 W. Central Africa
115 E. Europe
120 Egypt
125 EET (Helsinki, Riga, Tallinn)
130 EET (Athens, Istanbul, Minsk)
135 Israel: Jerusalem
140 S. Africa: Harare, Pretoria
145 Russian
150 Arab
155 E. Africa
160 Iran
165 Arabian
170 Caucasus Pacific (U.S. and Canada)
175 Afghanistan
180 Russia Yekaterinburg
185 W. Asia
190 India
193 Nepal
195 Central Asia
200 Sri Lanka
201 N. Central Asia
203 Myanmar: Rangoon
205 S.E. Asia
207 N. Asia
210 China
215 Singapore
220 Taipei
225 W. Australia
227 N. Asia East
230 Korea: Seoul
235 Tokyo
240 Sakha Yakutsk
245 A.U.S. Central: Darwin
250 Central Australia
255 A.U.S. Eastern
260 E. Australia
265 Tasmania
270 Vladivostok
275 W. Pacific
280 Central Pacific
285 Fiji
290 New Zealand
300 Tonga 		false false
Type | OSCustomizationSpecType | Sets the type of the OS customization specification. The valid values are Persistent and NonPersistent. | false | false
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false
Workgroup | String | Specifies the workgroup. This parameter applies only to Windows operating systems. | false | false | empty string

Return Type

Zero or more modified OSCustomizationSpec objects

Notes

When the ProductKey parameter is not specified, the OS customization is una ttended only if the Windows guest operating system version is Vista or late r. This cmdlet is supported only in 32-bit PowerCLI mode.

Examples

-------------- Example 1 --------------

Set-OSCustomizationSpec Spec -Description 'This is a test OS customization specification.'

Updates the description of the Spec OS customization specification.


Set-PowerCLIConfiguration - vSphere PowerCLI Cmdlets Reference

Set-PowerCLIConfiguration

Synopsis

This cmdlet modifies the vSphere PowerCLI configuration.

Syntax

Set-PowerCLIConfiguration [-ProxyPolicy <ProxyPolicy>] [-DefaultVIServerMode <DefaultVIServerMode>] [-InvalidCertificateAction <BadCertificateAction>] [-DisplayDeprecationWarnings [<Boolean>]] [-WebOperationTimeoutSeconds <Int32>] [-VMConsoleWindowBrowser <String>] [-Scope <ConfigurationScope>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-PowerCLIConfiguration

Detailed Description

This cmdlet modifies the vSphere PowerCLI configuration.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
DefaultVIServerMode DefaultVIServerMode Specifies the server connection mode. The new configuration takes effect immediately after you run the cmdlet. The following values are valid:

- Single - Switching to "single" removes all server connections except the last established one. If no target servers are specified, cmdlets run only on the last connected server.

- Multiple - All servers connected after switching to "multiple" mode are stored together with the current server connection in an array variable. If no target servers are specified, cmdlets run on the servers in the variable.

For more information on default servers, see the description of Connect-VIServer. 		false false
DisplayDeprecationWarnings | Boolean | Indicates whether you want to see warnings about deprecated elements. | false | false
InvalidCertificateAction BadCertificateAction Define the action to take when an attempted connection to a server fails due to a certificate error. The following values are valid:

Unset - this is the default value and it acts as a ?Warn? value for Connect-VIServer and as ?Prompt? for ?Connect-CloudServer?.

Prompt - if the server certificate is not trusted the cmdlet will prompt you for a course of action before it continues. There are several options:
Deny - no connection will be established.
Accept for once - accept the connection only for the current PowerCLI session. You will be prompted again if you attempt to connect to the same server from other processes.
Accept Permanently - the action will add this certificate as an exception in the ?SSL Certificate Exceptions? user list. The Connect-VIServer and Connect-CIServer cmdlets will never prompt again what action to take for this particulate certificate and server.
Accept For All Users - same as above, however the exception will be added to all user lists, which is common for all Windows accounts on the current machine.

Fail - the cmdlet will not establish connection if the certificate is not valid.

Ignore - the cmdlet will establish the connection without taking into account that the certificate is invalid.

Warn - the cmdlet will display a warning saying that the certificate is not valid, the reason why it is not considered valid and then will print additional information about the certificate.

For more information about invalid certificates, run 'Get-Help about_invalid_certificates'. 		false false Unset
ProxyPolicy | ProxyPolicy | Specifies whether vSphere PowerCLI uses a system proxy server to connect to the vCenter Server system. The valid values are NoProxy and UseSystemProxy. | false | true (ByValue)
Scope ConfigurationScope Specifies the scope of the setting that you want to modify. The parameter accepts Sesstion, User and All Users values.
*Session - the setting is valid for the current vSphere PowerCLI session only and overrides any User and All Users settings.
*User - the setting is valid for the current Windows user only, overrides All Users settings, and is applied only if a Session setting cannot be detected.
*All Users - the setting is valid for all users and is applied only if Session and User settings cannot be detected. 		false false
VMConsoleWindowBrowser | String | Specifies the Web browser to be used for opening virtual machine console windows (by using the Open-VMConsoleWindow cmdlet). The browser must be 32-bit. | false | false
WebOperationTimeoutSeconds | Int32 | Defines the timeout for web operations. The default value is 300 sec. To specify an infinite operation timeout, pass a negative integer to this parameter. | false | false | 300
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false

Return Type

One or more modified PowerCLIConfiguration objects

Notes

Examples

-------------- Example 1 --------------

Set-PowerCLIConfiguration -ProxyPolicy NoProxy -Scope Session

Modifies the proxy policy of vSphere PowerCLI for the Session scope.

-------------- Example 2 --------------

Set-PowerCLIConfiguration -ProxyPolicy NoProxy -DefaultVIServerMode Single

Changes the default server connection mode and the proxy policy of vSphere PowerCLI for the AllUsers scope.

-------------- Example 3 --------------

Set-PowerCLIConfiguration -DefaultVIServerMode 'Single' -Scope ([VMware.VimAutomation.ViCore.Types.V1.ConfigurationScope]::User -bor [VMware.VimAutomation.ViCore.Types.V1.ConfigurationScope]::AllUsers)

Changes the default server connection mode of vSphere PowerCLI for the User and AllUsers scopes.


Set-ResourcePool - vSphere PowerCLI Cmdlets Reference

Set-ResourcePool

Synopsis

This cmdlet modifies the properties of the specified resource pool.

Syntax

Set-ResourcePool [-ResourcePool] <ResourcePool[]> [-Name <String>] [-CpuExpandableReservation [<Boolean>]] [-CpuLimitMhz <Int64>] [-CpuReservationMhz <Int64>] [-CpuSharesLevel <SharesLevel>] [-MemExpandableReservation [<Boolean>]] [-MemLimitMB <Int64>] [-MemLimitGB <Decimal>] [-MemReservationMB <Int64>] [-MemReservationGB <Decimal>] [-MemSharesLevel <SharesLevel>] [-NumCpuShares <Int32>] [-NumMemShares <Int32>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-ResourcePool
Move-ResourcePool
New-ResourcePool
Remove-ResourcePool

Detailed Description

This cmdlet modifies the properties of the specified resource pool.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
ResourcePool | ResourcePool[] | Specifies the resource pool you want to configure. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
CpuExpandableReservation | Boolean | Indicates that the CPU reservation can grow beyond the specified value if the parent resource pool has unreserved resources. | false | false |
CpuLimitMhz | Int64 | Specifies a CPU usage limit in MHz. If this parameter is set, utilization will not exceed this limit even if there are available resources. | false | false |
CpuReservationMhz | Int64 | Specifies the guaranteed available CPU in MHz. | false | false |
CpuSharesLevel | SharesLevel | Specifies the CPU allocation level for this pool. This property is used in relative allocation between resource consumers. This parameter accepts Custom, High, Low, and Normal values. | false | false |
MemExpandableReservation | Boolean | Indicates that the memory reservation can grow beyond the specified value if the parent resource pool has unreserved resources. | false | false |
MemLimitGB | Decimal | Specifies a memory usage limit in gigabytes (GB). If this parameter is set, utilization will not exceed the specified limit even if there are available resources. | false | false |
MemLimitMB | Int64 | This parameter is obsolete. Use MemLimitGB instead. Specifies a memory usage limit in megabytes (MB). If this parameter is set, utilization will not exceed the specified limit even if there are available resources. | false | false |
MemReservationGB | Decimal | Specifies the guaranteed available memory in gigabytes (GB). | false | false |
MemReservationMB | Int64 | This parameter is obsolete. Use MemReservationGB instead. Specifies the guaranteed available memory in megabytes (MB). | false | false |
MemSharesLevel | SharesLevel | Specifies the memory allocation level for the resource pool. This property is used in relative allocation between resource consumers. This parameter accepts Custom, High, Low, and Normal values. | false | false |
Name | String | Specifies a new name for the resource pool. | false | false |
NumCpuShares | Int32 | Specifies the CPU allocation level for the resource pool. This property is used in relative allocation between resource consumers. This parameter is ignored unless CpuSharesLevel is set to Custom. | false | false |
NumMemShares | Int32 | Specifies the memory allocation level for the resource pool. This property is used in relative allocation between resource consumers. This parameter is ignored unless MemSharesLevel is set to Custom. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified ResourcePool objects

Notes

Examples

-------------- Example 1 --------------

Set-ResourcePool -Resourcepool Resourcepool -NumCpuShares  512 -MemLimitGB 4

Sets the CPU allocation level and the limit on memory usage in GB for the resource pool named Resourcepool.


Set-ScsiController - vSphere PowerCLI Cmdlets Reference

Set-ScsiController

Synopsis

This cmdlet modifies the specified SCSI controllers.

Syntax

Set-ScsiController [-ScsiController] <ScsiController[]> [-BusSharingMode <ScsiBusSharingMode>] [-Type <ScsiControllerType>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-ScsiController
New-ScsiController

Detailed Description

This cmdlet modifies the specified SCSI controllers. Set-ScsiController cannot set both the Type and BusSharing parameters at the same time. First run the cmdlet to set the type and then run it again to configure the bus sharing mode.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
ScsiController | ScsiController[] | Specifies the SCSI controller you want to modify. | true | true (ByValue) |
BusSharingMode | ScsiBusSharingMode | Specifies the bus sharing mode of the SCSI controller. The valid values are NoSharing, Physical, and Virtual. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Type | ScsiControllerType | Specifies the type of the SCSI controller. The valid values are ParaVirtual, VirtualBusLogic, VirtualLsiLogic, and VirtualLsiLogicSAS. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified ScsiController objects

Notes

Examples

-------------- Example 1 --------------

Get-ScsiController -VM VM | Set-ScsiController -BusSharingMode Physical

Configures the bus sharing mode of the SCSI controllers of a virtual machine to Physical mode.

-------------- Example 2 --------------

$scsiController = Get-HardDisk -VM VM | Select -First 1 | Get-ScsiController

Set-ScsiController -ScsiController $scsiController -Type VirtualLsiLogic

Changes the type of the SCSI controller of the first hard disk of the VM virtual machine to VirtualLsiLogic.


Set-ScsiLun - vSphere PowerCLI Cmdlets Reference

Set-ScsiLun

Synopsis

This cmdlet modifies the configuration of a SCSI device.

Syntax

Set-ScsiLun [[-MultipathPolicy] <ScsiLunMultipathPolicy>] [[-PreferredPath] <ScsiLunPath>] [-ScsiLun] <ScsiLun[]> [-CommandsToSwitchPath <Int32>] [-BlocksToSwitchPath <Int32>] [-NoCommandsSwitch] [-NoBlocksSwitch] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-ScsiLun
Get-ScsiLunPath
Set-ScsiLunPath

Detailed Description

This cmdlet modifies the configuration of a SCSI device.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
MultipathPolicy | ScsiLunMultipathPolicy | Specifies the policy that the logical unit must use when choosing a path. The following values are valid: Fixed - uses the preferred path whenever possible. RoundRobin - load balance. MostRecentlyUsed - uses the most recently used path. Unknown - supported only when connected to vCenter Server 4.0/ESX 4.0. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. | false | true (ByValue) |
PreferredPath | ScsiLunPath | Specifies the preferred path to access the SCSI logical unit. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. | false | true (ByValue) |
ScsiLun | ScsiLun[] | Specifies the SCSI device you want to configure. | true | true (ByValue) |
BlocksToSwitchPath | Int32 | Specifies the maximum number of I/O blocks to be issued on a given path before the system tries to select a different path. Modifying this setting affects all ScsiLun devices that are connected to the same ESX/ESXi host. The default value is 2048. Setting this parameter to zero (0) disables switching based on blocks. | false | false | 2048
CommandsToSwitchPath | Int32 | Specifies the maximum number of I/O requests to be issued on a given path before the system tries to select a different path. Modifying this setting affects all ScsiLun devices that are connected to the same ESX host. The default value is 50. Setting this parameter to zero (0) disables switching based on commands. This parameter is not supported on vCenter Server 4.x. | false | false | 50
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
NoBlocksSwitch | SwitchParameter | Indicates that switching based on blocks is disabled. Not supported on vCenter Server 4.x. | false | false |
NoCommandsSwitch | SwitchParameter | Indicates that switching based on commands is disabled. Not supported on vCenter Server 4.x. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified ScsiLun objects

Notes

Examples

-------------- Example 1 --------------

$scsilun = Get-ScsiLun -VMHost 10.23.123.100 -LunType disk

Set-ScsiLun -ScsiLun $scsilun -CommandsToSwitchPath 100

Configures the SCSI Lun device of the virtual machine host, so that the maximum number of I/O requests to be issued before the system tries to select a different path is 100.


Set-ScsiLunPath - vSphere PowerCLI Cmdlets Reference

Set-ScsiLunPath

Synopsis

This cmdlet configures a vmhba path to a SCSI device.

Syntax

Set-ScsiLunPath [[-Active] [<Boolean>]] [-ScsiLunPath] <ScsiLunPath[]> [-Preferred] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-ScsiLunPath
Get-ScsiLun
Set-ScsiLun

Detailed Description

This cmdlet configures a vmhba path to a SCSI device.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Active | Boolean | Indicates that the specified path is active. | false | false |
ScsiLunPath | ScsiLunPath[] | Specifies a path to the SCSI logical unit you want to configure. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Preferred | SwitchParameter | Indicates that the specified path is preferred. Only one path can be preferred, so when a path is made preferred, the preference is removed from the previously preferred path. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified ScsiLunPath objects

Notes

Examples

-------------- Example 1 --------------

$scsilun = Get-ScsiLun -VMHost 10.23.123.100 -LunType disk

$scsipath = Get-ScsiLunPath -ScsiLun $scsilun

Set-ScsiLunPath -ScsiLunPath $scsipath -Preferred $true

Sets the specified SCSI Lun path as preferred.


Set-Snapshot - vSphere PowerCLI Cmdlets Reference

Set-Snapshot

Synopsis

This cmdlet modifies the specified virtual machine snapshot.

Syntax

Set-Snapshot [-Snapshot] <Snapshot[]> [-Name <String>] [-Description <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Snapshot
New-Snapshot
Remove-Snapshot

Detailed Description

This cmdlet modifies the name and the description of the specified virtual machine snapshot.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Snapshot | Snapshot[] | Specifies the snapshot whose properties you want to change. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Description | String | Provides a new description for the snapshot. | false | false |
Name | String | Specifies a new name for the snapshot. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified Snapshot objects

Notes

Examples

-------------- Example 1 --------------

Set-Snapshot -Snapshot $snapshot -Name BeforePatch -Description "Before windows update"

Sets the name and the description of the snapshot in the $snapshot variable.

-------------- Example 2 --------------

Get-VM | Get-Snapshot -Name "InitialState" | Set-Snapshot -Description "This snapshot is created right after the OS installation."

Updates the description of all snapshots with name InitialState, from all virtual machines.


Set-StatInterval - vSphere PowerCLI Cmdlets Reference

Set-StatInterval

Synopsis

This cmdlet changes the statistics interval that is specified by the provided parameters.

Syntax

Set-StatInterval [[-SamplingPeriodSecs] <Int32>] [[-StorageTimeSecs] <Int32>] [-Interval] <StatInterval[]> [[-Server] <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Stat
Get-StatType
Get-StatInterval
New-StatInterval
Remove-StatInterval

Detailed Description

This cmdlet changes the statistics interval that is specified by the provided parameters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
SamplingPeriodSecs | Int32 | Specifies a new sampling period in seconds. | false | false |
StorageTimeSecs | Int32 | Specifies a new time period in seconds, for which the statistics information is kept. | false | false |
Interval | StatInterval[] | Specifies the statistics interval you want to change. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified StatInterval objects

Notes

Examples

-------------- Example 1 --------------

Set-StatInterval -Interval "past day" -StorageTimeSecs 700000

Changes the storage time of the "past day" statistics interval.


Set-Template - vSphere PowerCLI Cmdlets Reference

Set-Template

Synopsis

This cmdlet modifies the specified virtual machine template.

Syntax

Set-Template [-Template] <Template[]> [-Name <String>] [-ToVM] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Template
Get-Template
New-Template
Remove-Template

Detailed Description

This cmdlet changes the name and the description of a virtual machine template according to the provided parameters. The cmdlet can convert the template to a virtual machine if the value of the ToVM parameter is $true.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Template | Template[] | Specifies the template whose properties you want to change. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Name | String | Specifies a new name for the template. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
ToVM | SwitchParameter | Indicates that the template is to be converted to a virtual machine. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified Template objects or zero or more VirtualMachine objects

Notes

Examples

-------------- Example 1 --------------

Set-Template -Template $template -Name Template2

Renames the template saved in the $template variable to Template2.

-------------- Example 2 --------------

$vm = Set-Template -Template $template -ToVM

Converts a template to a virtual machine.


Set-VApp - vSphere PowerCLI Cmdlets Reference

Set-VApp

Synopsis

This cmdlet modifies the specified vApp.

Syntax

Set-VApp -VApp <VApp[]> [-Name <String>] [-CpuExpandableReservation [<Boolean>]] [-CpuLimitMhz <Int64>] [-CpuReservationMhz <Int64>] [-CpuSharesLevel <SharesLevel>] [-MemExpandableReservation [<Boolean>]] [-MemLimitMB <Int64>] [-MemLimitGB <Decimal>] [-MemReservationMB <Int64>] [-MemReservationGB <Decimal>] [-MemSharesLevel <SharesLevel>] [-NumCpuShares <Int32>] [-NumMemShares <Int32>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Export-VApp
Get-VApp
Import-VApp
New-VApp
Remove-VApp
Start-VApp
Stop-VApp
Move-VApp

Detailed Description

This cmdlet modifies the specified vApp.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
CpuExpandableReservation | Boolean | Indicates that the CPU reservation can grow beyond the specified value if there are available resources. | false | false |
CpuLimitMhz | Int64 | Specifies a CPU usage limit in MHz. If this parameter is set, utilization will not exceed this limit even if there are available resources. | false | false |
CpuReservationMhz | Int64 | Specifies the guaranteed available CPU in MHz. | false | false |
CpuSharesLevel | SharesLevel | Specifies the CPU allocation level for this vApp. This property is used in relative allocation between resource consumers. This parameter accepts Custom, High, Low, and Normal values. | false | false |
MemExpandableReservation | Boolean | Indicates that the memory reservation can grow beyond the specified value if there are available resources. | false | false |
MemLimitGB | Decimal | Specifies a memory usage limit in gigabytes (GB). If this parameter is set, utilization will not exceed the specified limit even if there are available resources. | false | false |
MemLimitMB | Int64 | This parameter is obsolete. Use MemLimitGB instead. Specifies a memory usage limit in megabytes (MB). If this parameter is set, utilization will not exceed the specified limit even if there are available resources. | false | false |
MemReservationGB | Decimal | Specifies the guaranteed available memory in gigabytes (GB). | false | false |
MemReservationMB | Int64 | This parameter is obsolete. Use MemReservationGB instead. Specifies the guaranteed available memory in megabytes (MB). | false | false |
MemSharesLevel | SharesLevel | Specifies the memory allocation level for the vApp. This property is used in relative allocation between resource consumers. This cmdlet accepts Custom, High, Low, and Normal values. | false | false |
Name | String | Modifies the name of the vApp. | false | false |
NumCpuShares | Int32 | Specifies the CPU allocation level for the vApp. This property is used in relative allocation between resource consumers. This parameter is ignored unless the CpuSharesLevel parameter is set to Custom. | false | false |
NumMemShares | Int32 | Specifies the memory allocation level for the resource pool. This property is used in relative allocation between resource consumers. This parameter is ignored unless the MemSharesLevel parameter is set to Custom. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VApp | VApp[] | Specifies the vApp that you want to configure. | true | true (ByValue) |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified VApp objects

Notes

Examples

-------------- Example 1 --------------

Get-VApp -Name MyTestVApp1 | Set-VApp -CpuSharesLevel Low -MemSharesLevel Normal

Modifies the CpuSharesLevel and MemSharesLevel properties of the MyTestVApp1 virtual appliance.

-------------- Example 2 --------------

$myvApp = Get-VApp -Location MyDatacenter1
Set-VApp -VApp $myvApp -CpuExpandableReservation:$true -CpuLimitMhz 4000 -MemExpandableReservation:$true -MemLimitGB 2

Modifies the properties of the vApps available on the MyDatacenter1 datacenter.


Set-VDBlockedPolicy - vSphere PowerCLI Cmdlets Reference

Set-VDBlockedPolicy

Synopsis

This cmdlet modifies the blocking policy for distributed ports.

Syntax

Set-VDBlockedPolicy [-Policy] <BlockedPolicy[]> [-Blocked [<Boolean>]] [-BlockedInherited [<Boolean>]] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet modifies the blocking policy for distributed ports at switch, port group, or port level (depending on the input policy).

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Policy | BlockedPolicy[] | Specifies the blocking policy that you want to configure. | true | true (ByValue) |
Blocked | Boolean | Specifies whether packet forwarding is stopped for the corresponding distributed port, port group, or switch. | false | false |
BlockedInherited | Boolean | Specifies whether the Blocked setting is inherited from a parent object, such as a distributed port group or switch. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The modified BlockedPolicy objects

Notes

Examples

-------------- Example 1 --------------

Get-VDPort -VDSwitch "MyVDSwitch" -ActiveOnly | Get-VDBlockedPolicy | Set-VDBlockedPolicy -Blocked

Retrieves all active distributed ports and updates their blocking policy to stop packet forwarding through them.

-------------- Example 2 --------------

Get-VDportgroup "MyVDPortgroup" | Get-VDPort | Get-VDBlockedPolicy | Set-VDBlockedPolicy -BlockedInherited

Retrieves the specified "MyVDPortgroup" distributed port group and updates the blocking policy of all ports inside the group to inherit the setting for packet forwarding from the one set on the distributed port group level.


Set-VDPort - vSphere PowerCLI Cmdlets Reference

Set-VDPort

Synopsis

This cmdlet modifies the configuration of virtual distributed ports.

Syntax

Set-VDPort [-VDPort] <VDPort[]> [-Name <String>] [-Description <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet modifies the configuration of virtual distributed ports.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VDPort | VDPort[] | Specifies the virtual distributed port that you want to configure. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Description | String | Specifies a description for the virtual distributed port that you want to configure. | false | false |
Name | String | Specifies a new name for the virtual distributed port that you want to configure. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The modified VDPort objects

Notes

Examples

-------------- Example 1 --------------

$myVDPort = Get-VDPort -Key "Port0" -VDSwtich "MyVDSwitch"
Set-VDPort -VDPort $myVDPort -Name "MyUpdatedPortName" -Description "MyUpdatedVDPortDescription"

Updates the name and the description of a specified virtual distributed port inside a vSphere distributed switch named "MyVDSwitch".


Set-VDPortgroup - vSphere PowerCLI Cmdlets Reference

Set-VDPortgroup

Synopsis

This cmdlet modifies the configuration of distributed port groups.

Syntax

Set-VDPortgroup [-Name <String>] [-Notes <String>] [-NumPorts <Int32>] [-VlanId <Int32>] [-VlanTrunkRange <VlanRangeList>] [-PrivateVlanId <Int32>] [-PortBinding <DistributedPortGroupPortBinding>] [-DisableVlan] [-VDPortgroup] <VDPortgroup[]> [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VDPortgroup -RollbackConfiguration [-VDPortgroup] <VDPortgroup[]> [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VDPortgroup -BackupPath <String> [-VDPortgroup] <VDPortgroup[]> [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VDPortgroup
New-VDPortgroup
Remove-VDPortgroup
Export-VDPortgroup

Detailed Description

This cmdlet modifies the configuration of distributed port groups. You can set the properties of the distributed port group manually, provide a backup profile to import the port group configuration, or rollback to the last valid configuration.

Note: You can import or rollback a configuration only on vSphere 5.1 and later.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VDPortgroup | VDPortgroup[] | Specifies the distributed port group that you want to configure. | true | true (ByValue) |
BackupPath | String | Specifies the full file path to the .zip file containing the backup configuration that you want to import. You can import only .zip files created with the Export-VDPortgroup cmdlet. Note: This parameter is only supported on vSphere 5.1 and later. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
DisableVlan | SwitchParameter | Sets the VLAN type of the distributed port group to None. This parameter is obsolete. Use the corresponding parameter from the Set-VDVlanConfiguration cmdlet instead. | false | false |
Name | String | Specifies a new name for the distributed port group that you want to configure. | false | false |
Notes | String | Specifies a new description for the distributed port group that you want to configure. | false | false |
NumPorts | Int32 | Specifies a new number of ports on the distributed port group that you want to configure. | false | false |
PortBinding | DistributedPortGroupPortBinding | Specifies a new port binding setting for the distributed port group that you want to configure. This parameter accepts Static, Dynamic, and Ephemeral values. Note: Dynamic port binding is deprecated. For better performance, static port binding is recommended. | false | false |
PrivateVlanId | Int32 | Specifies the secondary VLAN ID of a vSphere distributed switch's private VLAN configuration entry. This parameter is obsolete. Use the corresponding parameter from the Set-VDVlanConfiguration cmdlet instead. | false | false |
RollbackConfiguration | SwitchParameter | Indicates that you want to rollback the distributed port group to its last valid configuration. Note: Rollback is available only on vSphere 5.1 and later. | true | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
VlanId | Int32 | Specifies a new VLAN ID for the distributed port group that you want to configure. The VLAN IDs of 0 and 4095 are reserved and cannot be used. This parameter is obsolete. Use the corresponding parameter from the Set-VDVlanConfiguration cmdlet instead. | false | false |
VlanTrunkRange | VlanRangeList | Specifies a new VLAN trunk range for the distributed port group that you want to configure. Valid values are strings representing ranges of IDs. For example, "1-4, 6, 8-9". This parameter is obsolete. Use the corresponding parameter from the Set-VDVlanConfiguration cmdlet instead. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The modified VDPortgroup objects

Notes

Examples

-------------- Example 1 --------------

Get-VDPortgroup -Name "MyVDPortGroup" | Set-VDPortgroup -Name "MyNewVDPortGroupName" -NumPorts 5 -VlanId 4

Changes the name, number of ports and the VLAN ID of all distributed port groups named "MyVDPortGroup".

-------------- Example 2 --------------

Get-VDPortgroup -Name "MyVDPortGroup" | Set-VDPortgroup -VlanTrunkRange "1-5, 8-10"

Changes the VLAN trunk range of all distributed port groups named "MyVDPortGroup".

-------------- Example 3 --------------

$myVDPortgroup = Get-VDPortgroup -Name "MyVDPortGroup" -VDSwitch "MyVDSwitch"
Set-VDPortgroup -VDPortgroup $myVDPortgroup -DisableVlan

Sets the VLAN type of the specified distributed port group to None.

-------------- Example 4 --------------

Get-VDPortgroup -Name "MyVDPortGroup" | Set-VDPortgroup -RollbackConfiguration

Rollbacks the configuration of all distributed port groups named "MyVDPortGroup".

-------------- Example 5 --------------

Get-VDPortgroup -Name "MyVDPortGroup" | Set-VDPortgroup -BackupPath 'c:\backup.zip'

Reconfigures all distributed port groups named "MyVDPortGroup" by importing the configuration from the specified backup profile.


Set-VDPortgroupOverridePolicy - vSphere PowerCLI Cmdlets Reference

Set-VDPortgroupOverridePolicy

Synopsis

This cmdlet modifies the policy for overriding port group settings at port level.

Syntax

Set-VDPortgroupOverridePolicy [-Policy] <VDPortgroupOverridePolicy[]> [-BlockOverrideAllowed [<Boolean>]] [-ResetPortConfigAtDisconnect [<Boolean>]] [-SecurityOverrideAllowed [<Boolean>]] [-TrafficShapingOverrideAllowed [<Boolean>]] [-UplinkTeamingOverrideAllowed [<Boolean>]] [-VlanOverrideAllowed [<Boolean>]] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet modifies the policy for overriding port group settings at port level. At least one of the Bool parameters must be specified.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Policy | VDPortgroupOverridePolicy[] | Specifies the port group overriding policy that you want to configure. | true | true (ByValue) |
BlockOverrideAllowed | Boolean | Specifies whether overriding port blocking settings is allowed. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
ResetPortConfigAtDisconnect | Boolean | Specifies whether the port configuration is reset when the port is disconnected. | false | false |
SecurityOverrideAllowed | Boolean | Specifies whether overriding security settings is allowed. | false | false |
TrafficShapingOverrideAllowed | Boolean | Specifies whether overriding traffic shaping settings is allowed. | false | false |
UplinkTeamingOverrideAllowed | Boolean | Specifies whether overriding uplink teaming settings is allowed. | false | false |
VlanOverrideAllowed | Boolean | Specifies whether overriding VLAN settings is allowed. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The modified VDPortgroupOverridePolicy objects

Notes

Examples

-------------- Example 1 --------------

Get-VDPortgroup "MyVDPortgroup" | Get-VDPortgroupOverridePolicy | Set-VDPortgroupOverridePolicy -BlockOverrideAllowed $true

Retrieves a distributed port group named "MyVDPortgroup" and updates its overriding policy to allow the port blocking settings to override the default settings at port group level.

-------------- Example 2 --------------

Get-VDSwitch "MyVDSwitch" |
Get-VDPortgroup | Get-VDPortgroupOverridePolicy |
Set-VDPortgroupOverridePolicy -ResetPortConfigAtDisconnect $true
-TrafficShapingOverrideAllowed $true

Retrieves all port groups inside a distributed switch named "MyVDSwitch" and updates their overriding policies with the options to override the traffic shaping setting at port level, and to reset the distributed port network settings back to the port group settings.


Set-VDSecurityPolicy - vSphere PowerCLI Cmdlets Reference

Set-VDSecurityPolicy

Synopsis

This cmdlet modifies the security policy for distributed ports.

Syntax

Set-VDSecurityPolicy [-Policy] <SecurityPolicy[]> [-AllowPromiscuous [<Boolean>]] [-AllowPromiscuousInherited [<Boolean>]] [-ForgedTransmits [<Boolean>]] [-ForgedTransmitsInherited [<Boolean>]] [-MacChanges [<Boolean>]] [-MacChangesInherited [<Boolean>]] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet modifies the security policy for distributed ports or the default port policy at port group or switch level (depending on the input policy).

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Policy | SecurityPolicy[] | Specifies the security policy that you want to configure. | true | true (ByValue) |
AllowPromiscuous | Boolean | Specifies whether promiscuous mode is enabled for the corresponding distributed port, port group, or switch. | false | false |
AllowPromiscuousInherited | Boolean | Specifies whether the AllowPromiscuous setting is inherited from a parent object, such as a distributed port group or switch. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
ForgedTransmits | Boolean | Specifies whether forged transmits are enabled for the corresponding distributed port, port group, or switch. | false | false |
ForgedTransmitsInherited | Boolean | Specifies whether the ForgedTransmits setting is inherited from a parent object, such as a distributed port group or switch. | false | false |
MacChanges | Boolean | Specifies whether MAC address changes are enabled for the corresponding distributed port, port group, or switch. | false | false |
MacChangesInherited | Boolean | Specifies whether the MacChanges setting is inherited from a parent object, such as a distributed port group or switch. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The modified SecurityPolicy objects

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitch "MyVDSwitch" | Get-VDSecurityPolicy | Set-VDSecurityPolicy -MacChanges $true

Retrieves a vSphere distributed switch named "MyVDSwitch" and updates its security policy to allow MAC address changes.

-------------- Example 2 --------------

Get-VDPortgroup "MyVDPortgroup" | Get-VDSecurityPolicy | Set-VDSecurityPolicy -ForgedTransmitsInherited $true

Retrieves a distributed port group named "MyVDPortgroup" and updates the security policy to inherit the setting value for controlling outbound frames filtering by MAC address from its parent.


Set-VDSwitch - vSphere PowerCLI Cmdlets Reference

Set-VDSwitch

Synopsis

This cmdlet modifies the configuration of vSphere distributed switches.

Syntax

Set-VDSwitch [-Name <String>] [-ContactDetails <String>] [-ContactName <String>] [-LinkDiscoveryProtocol <LinkDiscoveryProtocol>] [-LinkDiscoveryProtocolOperation <LinkDiscoveryOperation>] [-MaxPorts <Int32>] [-Mtu <Int32>] [-Notes <String>] [-NumUplinkPorts <Int32>] [-Version <String>] [-VDSwitch] <VDSwitch[]> [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VDSwitch -BackupPath <String> [-WithoutPortGroups] [-VDSwitch] <VDSwitch[]> [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VDSwitch -RollBackConfiguration [-VDSwitch] <VDSwitch[]> [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
New-VDSwitch
Export-VDSwitch
Get-VDSwitch
Remove-VDSwitch

Detailed Description

This cmdlet modifies the configuration of vSphere distributed switches. You can set the properties of the vSphere distributed switch manually, rollback the configuration to its previous state, or import it from a backup profile.

Note: Rollback and importing are available only on vSphere 5.1 and later.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VDSwitch | VDSwitch[] | Specifies the vSphere distributed switch that you want to configure. | true | true (ByValue) |
BackupPath | String | Specifies the full file path to the .zip file containing the backup configuration that you want to import. You can import only .zip files created with the Export-VDSwitch cmdlet. Note: This parameter is supported only on vSphere 5.1 and later. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
ContactDetails | String | Specifies new contact details of the vSphere distributed switch administrator. | false | false |
ContactName | String | Specifies a new name for the vSphere distributed switch administrator. | false | false |
LinkDiscoveryProtocol | LinkDiscoveryProtocol | Specifies the link discovery protocol for the vSphere distributed switch that you want to configure. This parameter accepts CDP and LLDP values. | false | false |
LinkDiscoveryProtocolOperation | LinkDiscoveryOperation | Specifies the link discovery protocol operation for the vSphere distributed switch that you want to configure. This parameter accepts Advertise, Listen, Both, and Disabled values. | false | false |
MaxPorts | Int32 | Specifies the maximum number of ports allowed on the vSphere distributed switch that you want to configure. | false | false |
Mtu | Int32 | Specifies the maximum MTU size for the vSphere distributed switch that you want to configure. Valid values are positive integers only. | false | false |
Name | String | Specifies a new name for the vSphere distributed switch that you want to configure. | false | false |
Notes | String | Specifies a new description for the vSphere distributed switch that you want to configure. | false | false |
NumUplinkPorts | Int32 | Specifies the number of uplink ports on the vSphere distributed switch that you want to configure. | false | false |
RollBackConfiguration | SwitchParameter | Indicates that you want to rollback the configuration of the vSphere distributed switch to an earlier state. Note: This parameter is supported only on vSphere 5.1 and later. | true | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Version | String | Specifies a new version for the vSphere distributed switch that you want to configure. This parameter accepts 4.0, 4.1.0, 5.0.0, and 5.1.0 values. You cannot specify a version that is incompatible with the version of the vCenter Server system you are connected to. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |
WithoutPortGroups | SwitchParameter | Indicates that the specified backup configuration is imported without its port groups. Note: This parameter is supported only on vSphere 5.1 and later. | false | false |

Return Type

The modified VDSwitch objects

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitch -Name "MyVDSwitch" | Set-VDSwitch -MaxPorts 1000 -NumUplinkPorts 8 -Mtu 2000

Modifies the maximum number of ports, the number of uplink ports, and the maximum MTU size of the specified vSphere distributed switch.

-------------- Example 2 --------------

$myVDSwitches = Get-VDSwitch -Name MyVDSwitch*
Set-VDSwitch -VDSwitch $myVDSwitches -Version '5.1.0'

Changes the version of all vSphere distributed switches whose names start with "MyVDSwitch".

-------------- Example 3 --------------

$myVDSwitch = Get-VDSwitch -Name "MyVDSwitch"
Set-VDSwitch -VDSwitch $myVDSwitch -LinkDiscoveryProtocol LLDP -LinkDiscoveryProtocolOperation Listen

Enables link discovery protocol on the specified vSphere distributed switch, sets it to LLDP and changes the link discovery protocol operation to listen.

-------------- Example 4 --------------

Get-VDSwitch -Name "MyVDSwitch" | Set-VDSwitch -BackupPath 'c:\MyVDSwitchBackups\MyVDSwitch_12_12_2012.zip' -WithoutPortGroups

Reconfigures the specified vSphere distributed switch by importing the specified backup profile. The original port groups are not recreated.

-------------- Example 5 --------------

Get-VDSwitch -Name "MyVDSwitch" | Set-VDSwitch -RollbackConfiguration

Rollbacks the configuration of the specified vSphere distributed switch to its previous state.


Set-VDTrafficShapingPolicy - vSphere PowerCLI Cmdlets Reference

Set-VDTrafficShapingPolicy

Synopsis

This cmdlet modifies the traffic shaping policy for distributed ports.

Syntax

Set-VDTrafficShapingPolicy [-Policy] <TrafficShapingPolicy[]> [-Enabled [<Boolean>]] [-EnabledInherited [<Boolean>]] [-AverageBandwidth <Int64>] [-AverageBandwidthInherited [<Boolean>]] [-BurstSize <Int64>] [-BurstSizeInherited [<Boolean>]] [-PeakBandwidth <Int64>] [-PeakBandwidthInherited [<Boolean>]] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet modifies the traffic shaping policy for distributed ports or the default port policy at port group or switch level (depending on the input policy).

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Policy | TrafficShapingPolicy[] | Specifies the traffic shaping policy that you want to configure. | true | true (ByValue) |
AverageBandwidth | Int64 | Specifies the average bandwidth of the traffic shaping policy for the corresponding distributed port, port group, or switch. The value is in bits per second. | false | false |
AverageBandwidthInherited | Boolean | Specifies whether the AverageBandwidth setting is inherited from a parent object, such as a distributed port group or switch. | false | false |
BurstSize | Int64 | Specifies the burst size of the traffic shaping policy for the corresponding distributed port, port group, or switch. The value is in bits per second. | false | false |
BurstSizeInherited | Boolean | Specifies whether the BurstSize setting is inherited from a parent object, such as a distributed port group or switch. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Enabled | Boolean | Specifies whether traffic shaping is enabled for the corresponding distributed port, port group, or switch. | false | false |
EnabledInherited | Boolean | Specifies whether the Enabled setting is inherited from a parent object, such as a distributed port group or switch. | false | false |
PeakBandwidth | Int64 | Specifies the peak bandwidth of the traffic shaping policy for the corresponding distributed port, port group, or switch. The value is in bits per second. | false | false |
PeakBandwidthInherited | Boolean | Specifies whether the PeakBandwidth setting is inherited from a parent object, such as a distributed port group or switch. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The modified TrafficShapingPolicy objects

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitch "MyVDSwitch" | Get-VDPortgroup "MyVDPortgroup" | Get-VDPort -Key 4| Get-VDTrafficShapingPolicy -Direction In | Set-VDTrafficShapingPolicy -Enabled $true -AverageBandwidth 100000

Enables traffic shaping for a specific port in a distributed port group named "MyVDPortgroup" and updates the average bandwidth settings in their traffic shaping policies.

-------------- Example 2 --------------

Get-VDPortgroup "MyVDPortgroup" | Get-VDTrafficShapingPolicy | Set-VDTrafficShapingPolicy -BurstSizeInherited

Retrieves a distributed port group named "MyVDPortgroup" and updates its traffic shaping policy by inheriting the burst size from its corresponding parent.


Set-VDUplinkLacpPolicy - vSphere PowerCLI Cmdlets Reference

Set-VDUplinkLacpPolicy

Synopsis

This cmdlet modifies the Link Aggregation Control Protocol policy for uplink ports.

Syntax

Set-VDUplinkLacpPolicy [-Policy] <UplinkLacpPolicy[]> [-Enabled [<Boolean>]] [-EnabledInherited [<Boolean>]] [-Mode <UplinkLacpMode>] [-ModeInherited [<Boolean>]] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet modifies the Link Aggregation Control Protocol policy for uplink ports at switch or uplink port group level.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Policy | UplinkLacpPolicy[] | Specifies the Link Aggregation Control Protocol policy that you want to configure. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Enabled | Boolean | Specifies whether the Link Aggregation Control Protocol is enabled for the corresponding uplink port group or vSphere distributed switch. | false | false |
EnabledInherited | Boolean | Specifies whether the Enabled setting is inherited from a parent object, such as a vSphere distributed switch. | false | false |
Mode | UplinkLacpMode | Specifies the mode of the Link Aggregation Control Protocol policy for the corresponding uplink port group or vSphere distributed switch. The value can be Active or Passive. | false | false |
ModeInherited | Boolean | Specifies whether the Mode setting is inherited from a parent object, such as a vSphere distributed switch. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The modified VDUplinkLacpPolicy objects

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitch "MyVDSwitch" | Get-VDUplinkLacpPolicy | Set-VDUplinkLacpPolicy -Enabled $true -Mode Active

Retrieves a vSphere distributed switch named "MyVDSwitch" and updates its policy to enable the Link Aggregation Control Protocol, and sets the corresponding policy mode to active.

-------------- Example 2 --------------

Get-VDPortgroup "MyVDPortgroup" | Get-VDUplinkLacpPolicy | Set-VDUplinkLacpPolicy -ModeInherited $true

Retrieves a distributed port group named "MyVDPortgroup" and updates its Link Aggregation Control Protocol mode based on its parent object's setting values.


Set-VDUplinkTeamingPolicy - vSphere PowerCLI Cmdlets Reference

Set-VDUplinkTeamingPolicy

Synopsis

This cmdlet modifies the uplink teaming policy for distributed ports.

Syntax

Set-VDUplinkTeamingPolicy [-ActiveUplinkPort <String[]>] [-FailBack [<Boolean>]] [-FailBackInherited [<Boolean>]] [-FailoverDetectionPolicy <NetworkFailoverDetectionPolicy>] [-FailoverDetectionPolicyInherited [<Boolean>]] [-LoadBalancingPolicy <LoadBalancingPolicy>] [-LoadBalancingPolicyInherited [<Boolean>]] [-NotifySwitches [<Boolean>]] [-NotifySwitchesInherited [<Boolean>]] [-Policy] <UplinkTeamingPolicy[]> [-StandbyUplinkPort <String[]>] [-UnusedUplinkPort <String[]>] [-UplinkPortOrderInherited [<Boolean>]] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet modifies the uplink teaming policy for distributed ports at switch, port group, or port level.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Policy | UplinkTeamingPolicy[] | Specifies the uplink teaming policy that you want to configure. | true | true (ByValue) |
ActiveUplinkPort | String[] | Specifies the active uplink ports used for load balancing for a corresponding vSphere distributed switch. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
FailBack | Boolean | Specifies whether to enable or disable the failback option for the corresponding distributed vitual port, port group or switch. | false | false |
FailBackInherited | Boolean | Specifies whether the FailBack setting is inherited from a parent object, such as a distributed port group or switch. | false | false |
FailoverDetectionPolicy | NetworkFailoverDetectionPolicy | Specifies the method to use for failover detection for the corresponding distributed port, port group, or switch. The value can be LinkStatus or BeaconProbing. | false | false |
FailoverDetectionPolicyInherited | Boolean | Specifies whether the FailoverDetectionPolicy setting is inherited from a parent object, such as a distributed port group or switch. | false | false |
LoadBalancingPolicy | LoadBalancingPolicy | Specifies the load balancing policy for the corresponding distributed port, port group, or switch. The value can be LoadBalanceIP, LoadBalanceSrcMac, LoadBalanceSrcId, or ExplicitFailover. | false | false |
LoadBalancingPolicyInherited | Boolean | Specifies whether the LoadBalancingPolicy setting is inherited from a parent object, such as a distributed port group or switch. | false | false |
NotifySwitches | Boolean | Specifies whether to notify switches in the case of failover. | false | false |
NotifySwitchesInherited | Boolean | Specifies whether the NotifySwitches setting is inherited from a parent object, such as a distributed port group or switch. | false | false |
StandbyUplinkPort | String[] | Specifies the standby uplink ports for the corresponding vSphere distributed switch. | false | false |
UnusedUplinkPort | String[] | Specifies the unused uplink ports for the corresponding vSphere distributed switch. | false | false |
UplinkPortOrderInherited | Boolean | Specifies whether the UplinkPortOrder setting is inherited from a parent object, such as a distributed port group or switch. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The modified UplinkTeamingPolicy objects

Notes

Examples

-------------- Example 1 --------------

$activePortsList = "Port0"
$standbyPortsList = "Port1", "Port2"
Get-VDSwitch "MyVDSwitch" | Get-VDPortgroup | Get-VDUplinkTeamingPolicy | Set-VDUplinkTeamingPolicy -ActiveUplinkPort $activePortsList -StandbyUplinkPort $standbyPortsList

Retrieves all distributed port groups from a vSphere distributed switch named "MyVDSwitch" and updates their teaming policies with information about the active and standby uplinks that will be used when the adapter connectivity is up or down.

-------------- Example 2 --------------

Get-VDPortgroup "MyVDPortgroup" | Get-VDUplinkTeamingPolicy | Set-VDUplinkTeamingPolicy -NotifySwitches $true -FailoverDetectionPolicy Status

Updates the teaming policy of a distributed port group named "MyVDPortgroup" with a link status method for failover detection and with the ability to notify the corresponding distributed switch when any adapter failover occurs.

-------------- Example 3 --------------

Get-VDSwitch "MyVDSwitch" | Get-VDPort "Port2" | Get-VDUplinkTeamingPolicy | Set-VDUplinkTeamingPolicy -LoadBalancingPolicy LoadBalanceSrcId -FailBack $true

Updates the uplink teaming policy of a distributed port named "Port2" inside the "MyVDSwitch" vSphere distributed switch to enable failback and to choose an uplink based on the current loads of physical NICs.


Set-VDVlanConfiguration - vSphere PowerCLI Cmdlets Reference

Set-VDVlanConfiguration

Synopsis

This cmdlet modifies the virtual distributed port's VLAN configuration.

Syntax

Set-VDVlanConfiguration -VDPortgroup <VDPortgroup[]> [-DisableVlan] [-VlanId <Int32>] [-VlanTrunkRange <VlanRangeList>] [-PrivateVlanId <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VDVlanConfiguration -VDSwitch <VDSwitch[]> [-DisableVlan] [-VlanId <Int32>] [-VlanTrunkRange <VlanRangeList>] [-PrivateVlanId <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VDVlanConfiguration -VDPort <VDPort[]> [-DisableVlan] [-VlanId <Int32>] [-VlanTrunkRange <VlanRangeList>] [-PrivateVlanId <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet modifies the virtual distributed port's VLAN configuration. For vSphere distributed switch and port group parameter sets, the cmdlet modifies the respective default port configuration.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
DisableVlan | SwitchParameter | Sets the VLAN type to None. | false | false |
PrivateVlanId | Int32 | Specifies the secondary VLAN ID of a vSphere distributed switch's private VLAN configuration entry. The VLAN IDs of 0 and 4095 are reserved and cannot be used. | false | false |
VDPort | VDPort[] | Specifies the port whose VLAN configuration you want to modify. | true | true (ByValue) |
VDPortgroup | VDPortgroup[] | Specifies the port group whose default VLAN port configuration you want to modify. | true | true (ByValue) |
VDSwitch | VDSwitch[] | Specifies the vSphere distributed switch whose default VLAN port configuration you want to modify. | true | true (ByValue) |
VlanId | Int32 | Specifies a new VLAN ID. The VLAN IDs of 0 and 4095 are reserved and cannot be used. | false | false |
VlanTrunkRange | VlanRangeList | Specifies a new VLAN trunk range. Valid values are strings representing ranges of IDs. For example, "1-4, 6, 8-9". | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The updated entity - VDPort, VDPortgroup, or VDSwitch

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitch "MyVDSwitch" | Get-VDPort -ActiveOnly | Set-VDVlanConfiguration -PrivateVlanId 4

Assigns all active ports of a specific vSphere distributed switch named "MyVDSwitch" to a private VLAN with ID "4".

-------------- Example 2 --------------

Get-VDPortgroup "MyVDPorgroup" | Get-VDPort | Set-VDVlanConfiguration -VlanId 3

Assigns all ports of a specific distributed port group named "MyVDPorgroup" to a VLAN with ID "3".


Set-VIPermission - vSphere PowerCLI Cmdlets Reference

Set-VIPermission

Synopsis

This cmdlet modifies the properties of the specified permissions.

Syntax

Set-VIPermission [-Permission] <Permission[]> [-Role <Role>] [-Propagate [<Boolean>]] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VIPermission
New-VIPermission
Remove-VIPermission
Get-VIPrivilege
Get-VIRole
New-VIRole
Remove-VIRole
Set-VIRole

Detailed Description

This cmdlet modifies the properties of the specified permissions. The cmdlet can change the role and define whether the permission propagates down the hierarchy to child inventory objects.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Permission | Permission[] | Specifies the permissions you want to modify. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Propagate | Boolean | Indicates that you want to propagate the new permissions to the child inventory objects. | false | false | $true
Role | Role | Specifies a new role for the permissions. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified Permission objects

Notes

Examples

-------------- Example 1 --------------

Set-VIPermission -Permission $permission -Role Role -Propagate:$false

Changes the Propagate property of the $permission permission to $false.


Set-VIRole - vSphere PowerCLI Cmdlets Reference

Set-VIRole

Synopsis

This cmdlet modifies the privileges of the provided roles.

Syntax

Set-VIRole [-Role] <Role[]> [-Name <String>] [-AddPrivilege <Privilege[]>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VIRole [-Role] <Role[]> [-Name <String>] [-RemovePrivilege <Privilege[]>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VIRole
New-VIRole
Remove-VIRole
Get-VIPrivilege
Get-VIPermission
New-VIPermission
Remove-VIPermission
Set-VIPermission

Detailed Description

This cmdlet modifies the privileges of the provided roles.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Role | Role[] | Specifies the roles you want to modify. | true | true (ByValue) |
AddPrivilege | Privilege[] | Specifies privileges and privilege groups you want to add to the provided roles. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Name | String | Provides a new name for the provided role. | false | false |
RemovePrivilege | Privilege[] | Specifies privileges or privilege groups you want to remove from the provided roles. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified Role objects

Notes

Examples

-------------- Example 1 --------------

Set-VIRole -Role Role -AddPrivilege (Get-VIPrivilege -Name 'Create Datacenter')

Adds the "Create Datacenter" privilege to the Role role.


Set-VirtualPortGroup - vSphere PowerCLI Cmdlets Reference

Set-VirtualPortGroup

Synopsis

This cmdlet modifies the properties of the specified virtual port group.

Syntax

Set-VirtualPortGroup [-Name <String>] [-VLanId <Int32>] [-VirtualPortGroup] <VirtualPortGroup[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VirtualPortGroup
New-VirtualPortGroup
Remove-VirtualPortGroup

Detailed Description

This cmdlet modifies the properties of the specified virtual port group.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VirtualPortGroup | VirtualPortGroup[] | Specifies the virtual port group whose properties you want to change. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Name | String | Specifies a new name for the virtual port group. | false | false |
VLanId | Int32 | Specifies the VLAN ID for ports using this port group. The following values are valid: 0 - specifies that you do not want to associate the port group with a VLAN. 1 to 4094 - specifies a VLAN ID for the port group. 4095 - specifies that the port group should use trunk mode, which allows the guest operating system to manage its own VLAN tags. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified VirtualPortGroup objects

Notes

Examples

-------------- Example 1 --------------

$vswitch =  New-VirtualSwitch -VMHost 10.23.112.36 -Name VSwitch

$vportgroup1 =  New-VirtualPortGroup -VirtualSwitch $vswitch -Name VPortGroup1

$vportgroup2 = Set-VirtualPortGroup -VirtualPortGroup $vportgroup1 -VLanId 1

Creates a new virtual switch named VSwitch on the virtual machine host with IP address 10.23.112.36. Creates a new virtual port group for the new switch named VPortGroup1. Sets the VLAN ID for the ports using the VPortGroup1 group.


Set-VirtualSwitch - vSphere PowerCLI Cmdlets Reference

Set-VirtualSwitch

Synopsis

This cmdlet modifies the properties of the specified virtual switch.

Syntax

Set-VirtualSwitch [-VirtualSwitch] <VirtualSwitch[]> [[-NumPorts] <Int32>] [[-Nic] <String[]>] [[-Mtu] <Int32>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VirtualSwitch
New-VirtualSwitch
Remove-VirtualSwitch

Detailed Description

This cmdlet modifies the properties of the specified virtual switch. The server rounds the value of the NumPorts parameter up to the closest exact power of two, greater than the provided number. When updating NumPorts, the user needs to restart the ESX/ESXi host for the change to take effect.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VirtualSwitch | VirtualSwitch[] | Specifies the virtual switch you want to configure. | true | true (ByValue) |
NumPorts | Int32 | Specifies the VirtualSwitch port number. The value is rounded to the closest exact power of two, greater than the provided number (for example, if the user specifies 67, this number is rounded to 128). The value range is between 1 and 1024. The ESX host to which the virtual switch belongs, must be restarted for the change to take effect. Note that the port number displayed in the vSphere Client might differ from the value that you specified for the NumPorts parameter. Note: In ESX 5.5 or later, standard virtual switches are always elastic, so the NumPorts parameter is no longer applicable and its value is ignored. | false | false |
Nic | String[] | Specifies new network interface cards for the virtual switch. The old NICs are replaced by the specified ones. | false | false |
Mtu | Int32 | Specifies the maximum transmission unit (MTU) associated with the specified virtual switch (in bytes). The MTU value must be greater than 0. This parameter is valid only on VPX 2.5. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified VirtualSwitch objects

Notes

The MTU field is only available on VPX 2.5 and ESX 3.5. For older VPX vers ions, this field is expected to be $null.

Examples

-------------- Example 1 --------------

$vswitch = New-VirtualSwitch -Host 10.23.115.67 -Name VSwitch

Set-VirtualSwitch -VirtualSwitch $vswitch -MTU 500

Creates a new virtual switch named VSwitch on the virtual machine host on IP address 10.23.115.67. Then sets the virtual switch MTU to 500.

-------------- Example 2 --------------

$vswitch = New-VirtualSwitch -VMHost 10.23.115.67

$networkAdapters = Get-VMHostNetworkAdapter -VMHost 10.23.115.67 -Physical

$phNic = $networkAdapters[0]

$vSwitch | Set-VirtualSwitch -Nic $phNic

Creates a new virtual switch named VSwitch on the virtual machine host on IP address 10.23.115.67. Then assigns to it a network adapter.

-------------- Example 3 --------------

Get-VMHost *.128 | Get-VirtualSwitch | Select-Object -First 1 | Set-VirtualSwitch -Nic vmnic5

Add a physical network adapter named 'vmnic5' to the first switch of the host. Note that the 'vmnic5' adapter must not be assigned to other virtual switches.


Set-VM - vSphere PowerCLI Cmdlets Reference

Set-VM

Synopsis

This cmdlet modifies the configuration of the virtual machine.

Syntax

Set-VM [-VM] <VirtualMachine[]> [-Name <String>] [-Version <VMVersion>] [-MemoryMB <Int64>] [-MemoryGB <Decimal>] [-NumCpu <Int32>] [-GuestId <String>] [-AlternateGuestName <String>] [-OSCustomizationSpec <OSCustomizationSpec>] [-HARestartPriority <HARestartPriority>] [-HAIsolationResponse <HAIsolationResponse>] [-DrsAutomationLevel <DrsAutomationLevel>] [-Server <VIServer[]>] [-RunAsync] [-VMSwapFilePolicy <VMSwapfilePolicy>] [-Notes <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VM [-VM] <VirtualMachine[]> [-Name <String>] [-Snapshot <Snapshot>] [-OSCustomizationSpec <OSCustomizationSpec>] [-HARestartPriority <HARestartPriority>] [-HAIsolationResponse <HAIsolationResponse>] [-DrsAutomationLevel <DrsAutomationLevel>] [-Server <VIServer[]>] [-RunAsync] [-VMSwapFilePolicy <VMSwapfilePolicy>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VM [-VM] <VirtualMachine[]> [-Name <String>] [-Server <VIServer[]>] [-RunAsync] [-ToTemplate] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VM
Move-VM
New-VM
Remove-VM
Start-VM
Stop-VM
Suspend-VM

Detailed Description

This cmdlet modifies the configuration of the virtual machine. If the OSCustomizationSpec parameter is used, the cmdlet customizes the virtual machine according to the specification. In addition, the cmdlet allows you to revert a virtual machine to a snapshot and convert a virtual machine to a template.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machine you want to configure. | true | true (ByValue) |
AlternateGuestName | String | Specifies the full name of the guest OS for the virtual machine if the value of the GuestID parameter is set to otherGuest or otherGuest64. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
DrsAutomationLevel | DrsAutomationLevel | Specifies a DRS (Distributed Resource Scheduler) automation level. The valid values are FullyAutomated, Manual, PartiallyAutomated, AsSpecifiedByCluster, and Disabled. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. Specifying this parameter is only supported when the virtual machine is inside a cluster. Otherwise, an error is generated. | false | false |
GuestId | String | Specifies the guest operating system of the virtual machine. The valid values for specific ESX versions are listed in the description of the VirtualMachineGuestOsIdentifier enumeration type in the vSphere API Reference available at http://www.vmware.com/support/developer/vc-sdk/. Depending on the hardware configuration of the host, some of the guest operating systems might be inapplicable. | false | false |
HAIsolationResponse | HAIsolationResponse | Indicates whether the virtual machine should be powered off if a host determines that it is isolated from the rest of the compute resource. The valid values are AsSpecifiedByCluster, PowerOff, and DoNothing. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. Specifying this parameter is only supported when the virtual machine is inside a cluster. Otherwise, an error is generated. | false | false |
HARestartPriority | HARestartPriority | Specifies the virtual machine HA restart priority. The valid values are Disabled, Low, Medium, High, and ClusterRestartPriority. VMware HA is a feature that detects failed virtual machines and automatically restarts them on alternative ESX hosts. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release. Specifying this parameter is only supported when the virtual machine is inside a cluster. Otherwise, an error is generated. | false | false |
MemoryGB | Decimal | Specifies the memory size in gigabytes (GB). | false | false |
MemoryMB | Int64 | This parameter is obsolete. Use MemoryGB instead. Specifies the memory size in megabytes (MB). | false | false |
Name | String | Specifies a new name for the virtual machine. | false | false |
Notes | String | Provide a description for the virtual machine. The alias of this parameter is Description. | false | false |
NumCpu | Int32 | Specifies the number of virtual CPUs. | false | false |
OSCustomizationSpec | OSCustomizationSpec | Specifies a customization specification you want to apply to the virtual machine. This works only in 32-bit mode. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Snapshot | Snapshot | Specifies a snapshot whose state you want to apply to the virtual machine. | false | true (ByValue) |
ToTemplate | SwitchParameter | Indicates that you want to convert the virtual machine to a template. | false | false |
Version | VMVersion | Specifies the version to which you want to upgrade the virtual machine. The valid values are v4, v7, v8, and v9. You cannot downgrade to an earlier version. | false | false |
VMSwapFilePolicy | VMSwapfilePolicy | Specifies the swapfile placement policy. The following values are valid: InHostDataStore - Stores the swapfile in the datastore specified by the VMSwapfileDatastoreID property of the virtual machine host. If the VMSwapfileDatastoreID property is not set or indicates a datastore with insufficient free space, the swapfile is stored in the same directory as the virtual machine. This setting might degrade the VMotion performance. WithVM - Stores the swapfile in the same directory as the virtual machine. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified VirtualMachine objects or the newly created Template objects

Notes

Applying customization specs works only in 32-bit mode.

Examples

-------------- Example 1 --------------

$template = Get-VM VM | Set-VM -ToTemplate -Name VMTemplate

Converts the VM virtual machine to a template and stores the template in the $template variable.

-------------- Example 2 --------------

Get-VM -Location ResourcePool01 | Set-VM -MemoryGB 2 -NumCPU 2

Upgrades the memory and CPU count of the virtual machines in ResourcePool01.

-------------- Example 3 --------------

Set-VM -VM VM -Version v7

Upgrades the virtual hardware version of the VM machine.

-------------- Example 4 --------------

$snapshot = Get-Snapshot -VM $vm -Name "Initial state"

Set-VM -VM $vm -Snapshot $snapshot

Revert the VM virtual machine to the "Initial state" snapshot.

-------------- Example 5 --------------

$spec = Get-OSCustomizationSpec -Name FinanceDepartmentSpec;

Set-VM -VM $vm -OSCustomizationSpec $spec

Apply a customization specification on the specified virtual machines.

-------------- Example 6 --------------

Set-VM $vm -Name "Web Server" -GuestID winNetStandardGuest -Description "Company's web server"

Changes the name, description, and guest ID of the specified virtual machine.


Set-VMGuestNetworkInterface - vSphere PowerCLI Cmdlets Reference

Set-VMGuestNetworkInterface

Synopsis

This cmdlet configures the network settings of a virtual machine using VMware Tools.

Syntax

Set-VMGuestNetworkInterface -VmGuestNetworkInterface <VMGuestNetworkInterface[]> [-WinsPolicy <DhcpPolicy>] [-Wins <String[]>] [-DnsPolicy <DhcpPolicy>] [-Dns <String[]>] [-IPPolicy <DhcpPolicy>] [[-Gateway] <Object>] [[-Netmask] <String>] [[-Ip] <IPAddress>] [-ToolsWaitSecs <Int32>] [-GuestPassword <SecureString>] [-GuestUser <String>] [-GuestCredential <PSCredential>] [-HostPassword <SecureString>] [-HostUser <String>] [-HostCredential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMGuestNetworkInterface

Detailed Description

This cmdlet configures the network settings of a virtual machine using VMware Tools. The cmdlet allows IP and routing configuration. You can modify Wins settings only for Windows virtual machines. The cmdlet sends a remote script which executes inside the virtual machine in the context of the specified user account. This cmdlet supports only Windows XP 32 SP3, Windows Server 2003 32bit SP2, Windows Server 2003 64bit SP2, Windows 7 64 bit, Windows Server 2008 R2 64bit and Redhat Enterprise 5 operating systems.

To run this cmdlet against vCenter Server/ESX/ESXi versions earlier than 5.0, you need to meet the following requirements:
*You must run the cmdlet on the 32-bit version of Windows PowerShell.
*You must have access to the ESX that hosts the virtual machine over TCP port 902.
*For vCenter Server/ESX/ESXi versions earlier than 4.1, you need VirtualMachine.Interact.ConsoleInteract privilege. For vCenter Server/ESX/ESXi 4.1 and later, you need VirtualMachine.Interact.GuestControl privilege.

To run this cmdlet against vCenter Server/ESXi 5.0 and later, you need VirtualMachine.GuestOperations.Execute and VirtualMachine.GuestOperations.Modify privileges.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Ip | IPAddress | Specifies an IP address. Use this parameter only if The IpPolicy parameter is set to Static. | false | false |
Netmask | String | Specifies a network mask. | false | false |
Gateway | Object | Specifies a gateway. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Dns | String[] | Specifies DNS addresses. Use this parameter only if The DnsPolicy parameter is set to Static. | false | false |
DnsPolicy | DhcpPolicy | Specifies the DNS policy. The valid values are Static and Dhcp. | false | false |
GuestCredential | PSCredential | Specifies a PSCredential object that contains credentials for authenticating with the guest OS. Do not use this parameter if the GuestUser and GuestPassword parameters are used. | false | false |
GuestPassword | SecureString | Specifies the password you want to use for authenticating with the guest OS. | false | false |
GuestUser | String | Specifies the user name you want to use for authenticating with the guest OS. | false | false |
HostCredential | PSCredential | Specifies a PSCredential object that contains credentials for authenticating with the host. Do not use this parameter if the HostUser and HostPassword parameters are used. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
HostPassword | SecureString | Specifies the password you want to use for authenticating with the host. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
HostUser | String | Specifies the user name you want to use for authenticating with the host. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. | false | false |
IPPolicy | DhcpPolicy | Specifies the IP policy. The valid values are Static and Dhcp. | false | false |
ToolsWaitSecs | Int32 | Specifies the time in seconds to wait for a response from VMware Tools. If a non-positive value is provided, the system waits indefinitely. | false | false |
VmGuestNetworkInterface | VMGuestNetworkInterface[] | Specifies the guest network interface you want to configure. | true | true (ByValue) |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |
Wins | String[] | Specifies WINS servers. Use this parameter only if the WinsPolicy parameter is set to Static. | false | false |
WinsPolicy | DhcpPolicy | Specifies the Wins policy. The valid values are Static and Dhcp. | false | false |

Return Type

Zero or more modified VMGuestNetworkInterface objects

Notes

This cmdlet is experimental and might be changed or removed in a future rel ease.

Examples

-------------- Example 1 --------------

Set-VMGuestNetworkInterface -VMGuestNetworkInterface $vmGuestNetworkInterface -GuestUser User -GuestPassword Pass02 -Netmask 255.255.255.255 -Gateway 10.23.112.58

Changes the net mask and the gateway of the specified guest network interface.


Set-VMHost - vSphere PowerCLI Cmdlets Reference

Set-VMHost

Synopsis

This cmdlet modifies the configuration of the host.

Syntax

Set-VMHost [-VMHost] <VMHost[]> [[-State] <VMHostState>] [-VMSwapfilePolicy <VMSwapfilePolicy>] [-VMSwapfileDatastore <Datastore>] [-Profile <VMHostProfile>] [-Evacuate] [-TimeZone <VMHostTimeZone>] [-LicenseKey <String>] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Add-VMHost
Get-VMHost
Move-VMHost
Remove-VMHost
Restart-VMHost
Start-VMHost
Stop-VMHost
Suspend-VMHost
Unknown

Detailed Description

This cmdlet modifies the configuration of the host.

The State parameter is set to Connected.
- If the host is currently connected and is not in a maintenance mode, it does nothing.
- If the host is in a maintenance mode, it exits the maintenance mode.
- If the host is not connected or is not responding, it tries to reconnect.

The State parameter is set to Disconnected.
- If the host is currently connected, it attempts to disconnect.
- If the host is not connected or not responding, it does nothing.

The State parameter is set to Maintenance.
- If the host is currently connected and not in a maintenance mode, it enters a maintenance mode.
- If the host is currently connected and in a maintenance mode, it does nothing.
- If the host is not connected or not responding, it attempts to reconnect and enter maintenance mode.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
State | VMHostState | Specifies the state of the host. The valid values are Connected, Disconnected, and Maintenance. If there are powered on virtual machines on the host, you can set the host into a maintenance mode, only if it is part of a DRS-enabled cluster. Before entering maintenance mode, if the host is fully automated, the cmdlet first relocates all powered on virtual machines. If the host is not automated or partially automated, you must first generate a DRS recommendation and wait until all powered on virtual machines are relocated or powered off. In this case, you must specify the RunAsync parameter, otherwise an error is thrown. | false | false |
VMHost | VMHost[] | Specifies the host you want to configure. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Evacuate | SwitchParameter | If the value is $true, vCenter automatically reregisters the virtual machines that are compatible for reregistration. If they are not compatible, they remain on the host. If there are powered-on virtual machines that cannot be reregistered the operation waits until they are powered off manually. The Evacuate parameter is valid only when connected to a vCenter Server system and the State parameter is set to Maintenance. Also, the virtual machine host must be in a DRS-enabled cluster. | false | false |
LicenseKey | String | Specifies the license key to be used by the host. You can set the host to evaluation mode by passing the 00000-00000-00000-00000-00000 evaluation key. | false | false |
Profile | VMHostProfile | Specifies a host profile you want to associate with the host. If the value of this parameter is $null, the current profile association is removed. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
TimeZone | VMHostTimeZone | Specifies the time zone for the host by using its name or by providing the corresponding time zone object. Time zone names support wildcards. If the wildcards match more than one time zones, an error is reported. Time zone objects can only be applied to the hosts they originate from. | false | false |
VMSwapfileDatastore | Datastore | Specifies a datastore that is visible to the host and can be used for storing swapfiles for the virtual machines that run on this host. Using a host-specific swap location might degrade the VMotion performance. | false | false |
VMSwapfilePolicy | VMSwapfilePolicy | Specifies the swapfile placement policy. The following values are valid: InHostDataStore - Stores the swapfile in the datastore specified by the VMSwapfileDatastoreID property of the virtual machine host. If the VMSwapfileDatastoreID property is not set or indicates a datastore with insufficient free space, the swapfile is stored in the same directory as the virtual machine. This setting might degrade the VMotion performance. WithVM - Stores the swapfile in the same directory as the virtual machine. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified VMHost objects

Notes

The TimeZone parameter is supported only on ESX 3.5 /VirtualCenter 2.5, ESX 4.0/vCenter Server 4.0, and later. The Evacuate parameter is valid only when connected to a vCenter Server hos t and the host is a part of a DRS-enabled cluster.

Examples

-------------- Example 1 --------------

Set-VMHost -VMHost Host -State "Disconnected"

Resets the state of the Host virtual host to disconnected.

-------------- Example 2 --------------

$cluster = Get-Cluster -VMHost Host

$task = Set-VMHost -VMHost Host -State "Maintenance" -RunAsync

Get-DrsRecommendation -Cluster $cluster | where {$_.Reason -eq "Host is entering maintenance mode"} | Apply-DrsRecommendation

$vmhost = Wait-Task $task

Activate a maintenance mode for a not automated host that is part of a DRS-enabled cluster and has powered on virtual machines on it.


Set-VMHostAccount - vSphere PowerCLI Cmdlets Reference

Set-VMHostAccount

Synopsis

This cmdlet configures a host account.

Syntax

Set-VMHostAccount [-GroupAccount] <HostGroupAccount[]> [-AssignUsers <String[]>] [-UnassignUsers <String[]>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VMHostAccount [-UserAccount] <HostUserAccount[]> [-Password <String>] [-Description <String>] [-AssignGroups <String[]>] [-UnassignGroups <String[]>] [-GrantShellAccess [<Boolean>]] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
New-VMHostAccount
Get-VIAccount
Remove-VMHostAccount

Detailed Description

This cmdlet configures a host account. When configuring a host user account, you can include or exclude the user from the specified groups.
When configuring a host group account, you can include or exclude the specified users from this group.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
GroupAccount | HostGroupAccount[] | Specifies the host group account you want to configure. Starting with ESXi 5.1, you cannot configure group host accounts. | true | true (ByValue) |
UserAccount | HostUserAccount[] | Specifies the host user account you want to configure. | true | true (ByValue) |
AssignGroups | String[] | If a user host account is to be configured, specifies the group to which you want to add the account. Starting with ESXi 5.1, you cannot configure group host accounts. | false | false |
AssignUsers | String[] | If a group host account is configured, specify the users you want to add to the account. Starting with ESXi 5.1, you cannot configure group host accounts. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Description | String | Provides a description of the specified account. The maximum length of the text is 255 symbols. | false | false |
GrantShellAccess | Boolean | Indicates that the account is allowed to access the ESX shell. | false | false |
Password | String | Specifies a new password for the account. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
UnassignGroups | String[] | If a user host account is to be configured, specifies a group from which you want to remove the account. Starting with ESXi 5.1, you cannot configure group host accounts. | false | false |
UnassignUsers | String[] | If a group host account is to be configured, specifies the users you want to remove from the account. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified HostUserAccount or HostGroupAccount objects

Notes

If both of the AssignUsers (AssignGroup) and UnassignUsers (UnassignGroup) parameters are specified, the Assign* parameter is applied first. If the sa me user and group are specified for Assign* and Unassign*, a terminating er ror is thrown. Starting with ESXi 5.1, you cannot configure group host accounts.

Examples

-------------- Example 1 --------------

$myUserAccount = New-VMHostAccount -ID MyUser1 -Password MyPassword1 -UserAccount
$myGroupAccount = New-VMHostAccount -ID MyGroup1 -GroupAccount -AssignUsers $myUserAccount
Set-VMHostAccount -UserAccount $myUserAccount -UnassignGroups $myGroupAccount

Creates a user account with an ID MyUser1. Then creates a group account with an ID MyGroup1 and assigns the user account MyUser1 to the group account MyGroup1. Finally, excludes the MyUser1 account from the MyGroup1 account.
Starting with ESXi 5.1, you cannot configure group host accounts.


Set-VMHostAdvancedConfiguration - vSphere PowerCLI Cmdlets Reference

Set-VMHostAdvancedConfiguration

Synopsis

This cmdlet modifies the advanced configuration settings of a host.

Syntax

Set-VMHostAdvancedConfiguration [[-Name] <String>] [[-Value] <Object>] [-VMHost] <VMHost[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VMHostAdvancedConfiguration [[-NameValue] <Hashtable>] [-VMHost] <VMHost[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostAdvancedConfiguration

Detailed Description

This cmdlet is deprecated. Use New-AdvancedSetting, Set-AdvancedSetting, or Remove-AdvancedSetting instead.

This cmdlet modifies the advanced configuration settings of a host.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies the name of the host configuration setting you want to change. | false | false |
NameValue | Hashtable | Provides a hash table that maps values to settings. | false | true (ByValue) |
Value | Object | Specifies a new value of the host configuration setting that you want to modify. | false | false |
VMHost | VMHost[] | Specifies the host whose advanced configuration settings you want to change. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The modified System.Collections.Hashtable object

Notes

Examples

-------------- Example 1 --------------

Get-VMHost 10.23.123.144 | Set-VmHostAdvancedConfiguration -Name Migrate.NetTimeout -Value ( [system.int32] 10 )

Change the migration timeout for the virtual machine host with an IP address 10.23.123.144.

-------------- Example 2 --------------

$migrationSettings = Get-VMHost 10.23.123.144| Get-VmHostAdvancedConfiguration -Name Migrate.*

Set-VmHostAdvancedConfiguration -VMHost 10.23.123.122  -NameValue $migrationSettings

Gets the advanced settings concerning migration from the host with an IP address 10.23.123.144 and applies them to the virtual machine host with an IP address 10.23.123.122.

-------------- Example 3 --------------

Set-VMHostAdvancedConfiguration -VMHost 10.23.112.120 -Name Migrate.Enabled -Value 1

Enable VMotion on a host using Set-VMHostAdvancedConfiguration.


Set-VMHostAuthentication - vSphere PowerCLI Cmdlets Reference

Set-VMHostAuthentication

Synopsis

This cmdlet modifies the host authentication information.

Syntax

Set-VMHostAuthentication [-Domain] <String> [[-Username] <String>] [[-Password] <SecureString>] [-Credential <PSCredential>] -JoinDomain -VMHostAuthentication <VMHostAuthentication[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VMHostAuthentication [-Force] -LeaveDomain -VMHostAuthentication <VMHostAuthentication[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostAuthentication

Detailed Description

This cmdlet modifies the host authentication information.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Domain | String | Specifies a domain you want to join. | true | false |
Username | String | Specifies a user name for authentication. | false | false |
Password | SecureString | Specifies a password for authentication. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
Credential | PSCredential | Specifies a credential object for authentication. | false | false |
Force | SwitchParameter | If the value is $true, any existing permissions on the managed objects for Active Directory users are deleted and the cmdlet completes. If the value is $false, the cmdlet cannot run if there are any existing permissions on managed objects for Active Directory users. | false | false |
JoinDomain | SwitchParameter | Indicates whether you want to join the specified domain. | true | false |
LeaveDomain | SwitchParameter | Indicates whether you want to leave the currently joined domain. | true | false |
VMHostAuthentication | VMHostAuthentication[] | Specifies the VMHostAuthentication object you want to modify. | true | true (ByValue) |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified VMHostAuthentication objects

Notes

Examples

-------------- Example 1 --------------

$vmhost | Get-VMHostAuthentication | Set-VMHostAuthentication -JoinDomain -Domain "DomainName.com" -User "Username1" -Password "Password1"

Include an ESX host in a domain.

-------------- Example 2 --------------

$vmhost | Get-VMHostAuthentication | Set-VMHostAuthentication -LeaveDomain

Exclude an ESX host from a domain.

-------------- Example 3 --------------

$vmhost | Get-VMHostAuthentication | Set-VMHostAuthentication -LeaveDomain -Force

Exclude an ESX host from a domain. If AD account permissions are defined on the host, they will be removed.


Set-VMHostDiagnosticPartition - vSphere PowerCLI Cmdlets Reference

Set-VMHostDiagnosticPartition

Synopsis

This cmdlet activates or deactivates the diagnostic partitions of hosts.

Syntax

Set-VMHostDiagnosticPartition [-Active] [<Boolean>] [-VMHostDiagnosticPartition] <VMHostDiagnosticPartition[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostDiagnosticPartition

Detailed Description

This cmdlet activates or deactivates the diagnostic partitions of hosts.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Active | Boolean | If the value of this parameter is $true, the partition state is changed to active. If the value is $false, the partition state is set to inactive. | true | false |
VMHostDiagnosticPartition | VMHostDiagnosticPartition[] | Specifies the host diagnostic partition you want to set. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified VMHostDiagnosticPartition objects

Notes

Examples

-------------- Example 1 --------------

$diagPartition = Get-VMHostDiagnosticPartition -VMHost $vmhost

$diagPartition | Set-VMHostDiagnosticPartition -Active $false -Confirm

Deactivates the active diagnostic partition of the specified host.


Set-VMHostFirewallDefaultPolicy - vSphere PowerCLI Cmdlets Reference

Set-VMHostFirewallDefaultPolicy

Synopsis

This cmdlet sets the default policy for the specified host firewall.

Syntax

Set-VMHostFirewallDefaultPolicy [[-AllowIncoming] [<Boolean>]] [[-AllowOutgoing] [<Boolean>]] [-Policy] <VMHostFirewallDefaultPolicy[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostFirewallDefaultPolicy

Detailed Description

This cmdlet sets the default policy for the specified host firewall. This policy specifies whether outgoing or incoming connections are allowed. At least one of the AllowIncoming and AllowOutgoing parameters must be set. When you configure the default firewall policy of an ESX/ESXi host version 5.0, you must provide the same value for the AllowIncoming and AllowOutgoing parameters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
AllowIncoming | Boolean | If the value of this parameter is $true, all incoming connections are allowed. If the value is $false, all incoming connections are disallowed. | false | false |
AllowOutgoing | Boolean | If the value of this parameter is $true, all outcoming connections are allowed. If the value is $false, all outcoming connections are disallowed. | false | false |
Policy | VMHostFirewallDefaultPolicy[] | Specifies the host firewall default policy you want to apply. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more VMHostFirewallDefaultPolicy objects

Notes

Firewall management functionality is not supported on ESX 3i.

Examples

-------------- Example 1 --------------

$firewallpolicy = Get-VMHostFirewallDefaultPolicy -VMHost 10.23.123.100

Set-VMHostFirewallDefaultPolicy -Policy $firewallpolicy -AllowOutGoing $true | fl

Changes the default firewall policy of the virtual machine host with IP address 10.23.123.100, so that the outgoing connections are allowed.

VMHostId : HostSystem-host-8
IncomingEnabled : False
OutgoingEnabled : True
Client : VMware.VimAutomation.Client20.VimClient


Set-VMHostFirewallException - vSphere PowerCLI Cmdlets Reference

Set-VMHostFirewallException

Synopsis

This cmdlet enables or disables host firewall exceptions.

Syntax

Set-VMHostFirewallException [-Enabled] [<Boolean>] [-Exception] <VMHostFirewallException[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostFirewallException

Detailed Description

This cmdlet enables or disables host firewall exceptions.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Enabled | Boolean | If the value is $true, the specified firewall exceptions are enabled. If the value is $false, the firewall exceptions are disabled. | true | false |
Exception | VMHostFirewallException[] | Specifies the firewall exceptions you want to enable or disable. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified VMHostFirewallException objects

Notes

Firewall management functionality is not supported on ESX 3i.

Examples

-------------- Example 1 --------------

$ftpFirewallExceptions = Get-VMHostFirewallException -VMHost $vmhost | where {$_.Name.StartsWith('FTP')}

$ftpFirewallExceptions | Set-VMHostFirewallException -Enabled $true

Enables the firewall exceptions for the FTP services on the specified host.


Set-VMHostFirmware - vSphere PowerCLI Cmdlets Reference

Set-VMHostFirmware

Synopsis

This cmdlet configures hosts firmware settings.

Syntax

Set-VMHostFirmware [-VMHost] <VMHost[]> [-BackupConfiguration] -DestinationPath <String> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VMHostFirmware [-VMHost] <VMHost[]> [-ResetToDefaults] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VMHostFirmware [-VMHost] <VMHost[]> [-Restore] [-SourcePath <String>] [-Force] [-HostCredential <PSCredential>] [-HostUser <String>] [-HostPassword <SecureString>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostFirmware

Detailed Description

This cmdlet configures hosts firmware settings.
If the BackupConfiguration parameter is set, backups the host configuration and downloads the bundle to the specified DestinationPath. In order to use the Restore and ResetToDefaults parameters, the host needs to be in maintenance mode. The Backup functionality of Set-VMHostFirmware is deprecated and scheduled for removal. For making backups, use the Get-VMHostFirmware cmdlet instead.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the host whose firmware you want to configure (it must be an ESX visor). | true | true (ByValue) |
BackupConfiguration | SwitchParameter | The Backup functionality of Set-VMHostFirmware is deprecated and scheduled for removal. For making backups, use the Get-VMHostFirmware cmdlet instead. Indicates that you want to backup the host firmware configuration and download the bundle to the path specified by the DestinationPath parameter. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
DestinationPath | String | Specifies a destination path where to download the host configuration backup bundle if the BackupConfiguration parameter is set. | true | false |
Force | SwitchParameter | Indicates that you want to apply the configuration even if the bundle is mismatched. Use this parameter in combination with the Restore parameter. | false | false |
HostCredential | PSCredential | Specifies the credential object you want to use for authenticating with the host when uploading a firmware configuration bundle. Do not use this parameter if the HostUser and HostPassword parameters are specified. | false | false |
HostPassword | SecureString | Specifies a password for the authenticating with the host when uploading a firmware configuration bundle. | false | false |
HostUser | String | Specifies a username for authenticating with the host when uploading a firmware configuration bundle. | false | false |
ResetToDefaults | SwitchParameter | Indicates that you want to reset all configuration settings, including the "admin" password, to the factory defaults. The host is rebooted immediately. The host needs to be in a maintenance in order to perform this operation. | false | false |
Restore | SwitchParameter | Indicates that you want to restore the configuration of the host to the one that is specified in the provided bundle. The bundle is uploaded to the URL retrieved via Get-VMHostFirmware. This method resets all configuration options, including the "admin" password, to the values in the bundle. The host is rebooted immediately. The host needs to be in maintenance mode in order to perform this operation. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
SourcePath | String | Specifies the path to the host configuration backup bundle you want to restore. The bundle is uploaded to an URL address which you can retrieve by using the Get-VMHostFirmware cmdlet. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified HostFirmware or HostFirmwareBundle objects

Notes

This functionality is available on ESXi Embedded only.

Examples

-------------- Example 1 --------------

Set-VMHost -VMHost Host -State 'Maintenance'

Set-VMHostFirmware -VMHost Host -Restore

Restore the host firmware by using the default path for the firmware bundle. You can store the bundle to the default path through HTTP by using the upload URL specified in the firmware bundle object:

$bundle = Get-VMHostFirmware

$uploadUrl = $bundle.UploadUrl

-------------- Example 2 --------------

Set-VMHost -VMHost Host -State 'Maintenance'

Set-VMHostFirmware -VMHost Host -Restore -SourcePath c:\bundleToRestore.tgz -HostUser user -HostPassword pass

Restore the host firmware by specifying a firmware bundle as a source path.

-------------- Example 3 --------------

Set-VMHost -VMHost Host -State 'Maintenance'

Set-VMHostFirmware -VMHost Host -ResetToDefaults

Reset the host configuration to the factory default settings.

-------------- Example 4 --------------

Get-VMHostFirmware -VMHost Host1, Host2 -BackupConfiguration -DestinationPath c:\StoredBundles

Set-VMHost -VMHost Host1, Host2 -State 'Maintenance'

Get-VMHost -Name Host1, Host2 | Set-VMHostFirmware -Restore -SourcePath c:\StoredBundles -HostUser user -HostPassword pass

Restore multiple hosts firmware by specifying the firmware bundle as a source path directory. The command determines which bundle is needed for each host by the bundle name.


Set-VMHostHba - vSphere PowerCLI Cmdlets Reference

Set-VMHostHba

Synopsis

This cmdlet configures the CHAP properties of the specified iSCSI HBAs.

Syntax

Set-VMHostHba -IScsiHba <IScsiHba[]> [-IScsiName <String>] [-ChapType <ChapType>] [-ChapName <String>] [-ChapPassword <String>] [-MutualChapEnabled [<Boolean>]] [-MutualChapName <String>] [-MutualChapPassword <String>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostHba
New-IScsiHbaTarget
Remove-IScsiHbaTarget
Set-IScsiHbaTarget

Detailed Description

This cmdlet configures the CHAP properties of the specified iSCSI HBAs.
If (Mutual)ChapType is set to a value different than ?Prohibited?, (Mutual)ChapPassword must be set.
ChapType, MutualChapType, MutualChapName, MutualChapPassword - these are only available on 4.0 or later.
Note: Run Set-VmHostHba directly against ESX. When Set-VmHostHba is run against vCenter Server, changing the iScsiName property of an iSCSI adapter modifies its AuthenticationCapabilities property.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
ChapName | String | Specifies the CHAP initiator name if CHAP is enabled. | false | false | Use the old name if any. Otherwise, use the initiator name.
ChapPassword | String | Specifies the CHAP password if CHAP is enabled. | false | false |
ChapType | ChapType | Specifies the type of the CHAP authorization. The valid values are Prohibited, Discouraged, Preferred, and Required. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
IScsiHba | IScsiHba[] | Specifies the iSCSI HBA device you want to configure. | true | true (ByValue) |
IScsiName | String | Specifies a new name for the host HBA device. | false | false |
MutualChapEnabled | Boolean | Indicates that Mutual CHAP authorization is enabled. | false | false |
MutualChapName | String | Specifies the Mutual CHAP initiator name if Mutual CHAP is enabled. | false | false | Use the old name if any. Otherwise, use the initiator name.
MutualChapPassword | String | Specifies the Mutual CHAP password if Mutual CHAP is enabled. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified IScsiHba objects

Notes

The ChapType, MutualChapType, MutualChapName, and MutualChapPassword parame ters are supported only on vCenter Server/ESX 4.0 or later.

Examples

-------------- Example 1 --------------

Get-VMHostHba -Type iScsi | Set-VMHostHba -ChapType Required -ChapName Admin -ChapPassword pass

Changes the CHAP type of the available iScsi to Required.

-------------- Example 2 --------------

Set-VMHostHba -IScsiHba $iscsi -MutualChapEnabled $true -ChapType Required -ChapName Admin -ChapPassword pass -MutualChapName Administrator -MutualChapPassword Pass

Enables Mutual CHAP for the iScsi devices stored in the $iscsi variable and changes the CHAP type to Required.


Set-VMHostModule - vSphere PowerCLI Cmdlets Reference

Set-VMHostModule

Synopsis

This cmdlet overrides the host module options with the given ones.

Syntax

Set-VMHostModule [-HostModule] <VmHostModule[]> [-Options] <String> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostModule

Detailed Description

This cmdlet overrides the host module options with the given ones.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
HostModule | VmHostModule[] | Specifies the host module you want to configure. | true | true (ByValue) |
Options | String | Specifies the new options of the host module. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified VmHostModule objects

Notes

Supported only on ESX 4.0, ESX 4i, and later.

Examples

-------------- Example 1 --------------

$module = Get-VMHostModule -Name Shaper

Set-VMHostModule -HostModule $module -Options "New options text"

Overrides the options of the Shaper host module with the provided ones.

-------------- Example 2 --------------

Get-VMHostModule Shaper | Set-VMHostModule -Options "New options text" -Confirm

Overrides the options of the Shaper host module with the provided ones.


Set-VMHostNetwork - vSphere PowerCLI Cmdlets Reference

Set-VMHostNetwork

Synopsis

This cmdlet updates the specified virtual network.

Syntax

Set-VMHostNetwork [-Network] <VMHostNetworkInfo[]> [-ConsoleGateway <String>] [-VMKernelGateway <String>] [-VMKernelGatewayDevice <String>] [-ConsoleGatewayDevice <String>] [-DomainName <String>] [-HostName <String>] [-DnsFromDhcp [<Boolean>]] [-DnsDhcpDevice <Object>] [-DnsAddress <String[]>] [-SearchDomain <String[]>] [-IPv6Enabled [<Boolean>]] [-ConsoleV6Gateway <String>] [-ConsoleV6GatewayDevice <String>] [-VMKernelV6Gateway <String>] [-VMKernelV6GatewayDevice <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostNetwork

Detailed Description

This cmdlet updates the specified virtual network. The service console and the VMkernel are often not connected to the same network, and therefore each needs its own gateway information. A gateway is needed for connectivity to machines not on the same IP subnet as the service console or VMkernel.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Network | VMHostNetworkInfo[] | Specifies the host network you want to configure. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
ConsoleGateway | String | Specifies a new console gateway. | false | false |
ConsoleGatewayDevice | String | Specifies a new console gateway device. | false | false |
ConsoleV6Gateway | String | Specifies a console V6 gateway address. Not supported on ESXi. | false | false |
ConsoleV6GatewayDevice | String | Specifies a console V6 gateway device. Not supported on ESXi. | false | false |
DnsAddress | String[] | Specifies a new DNS address. | false | false |
DnsDhcpDevice | Object | This parameter is mandatory if the value of the DnsFromDhcp parameter is 'true'. Otherwise, it is disregarded. If the DnsDhcpDevice parameter is set, the Dhcp DNS of the service console or VMKernel network adapter will override the system DNS. The parameter takes a ServiceConsoleNIC object, a VMKernelNIC object in case of an ESX visor, or the NIC name as a string. | false | false |
DnsFromDhcp | Boolean | Indicates that you want to obtain the network settings from a Dhcp server. | false | false |
DomainName | String | Specifies a new domain name. | false | false |
HostName | String | Specifies a new host name. | false | false |
IPv6Enabled | Boolean | Indicates that IPv6 configuration is enabled. Setting this parameter to $false disables the ConsoleV6Gateway, ConsoleV6GatewayDevice, and VMKernelV6Gateway parameters. IPv6 is supported only on vCenter 4.0 and ESX 4.0 or later. To use IPv6 on ESX, you must restart the host after enabling IPv6. | false | false |
SearchDomain | String[] | Specifies a new search domain. | false | false |
VMKernelGateway | String | Specifies a new kernel gateway. | false | false |
VMKernelGatewayDevice | String | Specifies a new kernel gateway device. | false | false |
VMKernelV6Gateway | String | Specifies a VMKernel V6 gateway address. This parameter is supported only on ESX hosts. | false | false |
VMKernelV6GatewayDevice | String | Specifies a VMKernel V6 gateway device. This parameter is supported only on ESX hosts. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified VMHostNetworkInfo objects

Notes

If "DnsFromDhcp" is enabled ?DomainName? and ?HostName? cannot be explicitl y set. To configure IPv6 settings, you must be working on ESX 4.0 or later, and IP v6 must be enabled on the host system. The new IPv6 settings take effect af ter the host is restarted.

Examples

-------------- Example 1 --------------

$vmHostNetworkInfo = Get-VmHostNetwork -Host Host

Set-VmHostNetwork -Network $vmHostNetworkInfo -VMKernelGateway 10.23.11.11 -DomainName eng.vmware.com -HostName Host1 -DnsFromDhcp $false

Gets the network configuration of the virtual machine host named Host. Sets the virtual machine kernel gateway, the domain name, the host name, and the Dhcp of the network.

-------------- Example 2 --------------

Get-VMHost Host | Get-VMHostNetwork | Set-VMHostNetwork -IPv6Enabled $true

Get-VMHost Host | Restart-VMHost -Force -Confirm:$false

Enables IPv6 support on the Host host and restarts the host.

-------------- Example 3 --------------

Get-VMHost Host | Get-VMHostNetwork | Set-VMHostNetwork -ConsoleV6Gateway $ipv6GatewayAddress -ConsoleV6GatewayDevice "vswif0"

Configures the IPv6 console default gateway on the Host host.

-------------- Example 4 --------------

Get-VMHost Host | Get-VMHostNetwork | Set-VMHostNetwork -VMKernelV6Gateway $ipv6GatewayAddress

Configures the IPv6 VMKernel default gateway on the Host host.


Set-VMHostNetworkAdapter - vSphere PowerCLI Cmdlets Reference

Set-VMHostNetworkAdapter

Synopsis

This cmdlet configures the specified host network adapter.

Syntax

Set-VMHostNetworkAdapter -PhysicalNic <PhysicalNic[]> [-Duplex <String>] [-BitRatePerSecMb <Int32>] [-AutoNegotiate] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VMHostNetworkAdapter -VirtualNic <HostVirtualNic[]> [-Dhcp] [-IP <String>] [-SubnetMask <String>] [-Mac <String>] [-Mtu <Int32>] [-VMotionEnabled [<Boolean>]] [-FaultToleranceLoggingEnabled [<Boolean>]] [-ManagementTrafficEnabled [<Boolean>]] [-VsanTrafficEnabled [<Boolean>]] [-IPv6ThroughDhcp [<Boolean>]] [-AutomaticIPv6 [<Boolean>]] [-IPv6 <String[]>] [-IPv6Enabled [<Boolean>]] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VMHostNetworkAdapter -VirtualNic <HostVirtualNic[]> -PortGroup <DistributedPortGroup> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
New-VMHostNetworkAdapter
Remove-VMHostNetworkAdapter

Detailed Description

This cmdlet configures the specified host network adapter. For a physical NIC, you can change the duplex and the bit rate settings (10, 100, 1000, 10000). For a regular virtual NIC, you can change the IP address and the subnet mask. For a console virtual NIC, you can modify the IP and the subnet mask, or choose DHCP mode.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
AutomaticIPv6 | Boolean | Indicates that the IPv6 address is obtained through a router advertisement. | false | false |
AutoNegotiate | SwitchParameter | Indicates that the host network adapter speed/duplex settings are configured automatically. Use this parameter only if the Duplex and BitRatePerSecMb parameters are not set. | false | false |
BitRatePerSecMb | Int32 | Specifies the bit rate of the link. Only valid when configuring a physical NIC. Use this parameter only if the AutoNegotiate parameter is not set. Note that updating the speed (BitRatePerSec) of a physical NIC might take some time due to the hardware configuration being performed, and the returned object might still contain the current configuration instead of the updated one. | false | false |
Confirm | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false | $true
Dhcp | SwitchParameter | Indicates whether the host network adapter uses a Dhcp server. This parameter works only on ESXi hosts. For VMKernel adapters, Dhcp is supported only on ESX 4.0 and later. | false | false |
Duplex | String | Indicates whether the link is capable of full-duplex. The valid values are Full and Half. You can set this parameter only when updating a PhysicalNIC. Use this parameter only if the AutoNegotiate parameter is not set. | false | false |
FaultToleranceLoggingEnabled | Boolean | Indicates that the network adapter is enabled for Fault Tolerance (FT) logging. This parameter is supported only on ESX/vCenter Server 4.0 and later. | false | false |
IP | String | Specifies an IP address for the network adapter using an IPv4 dot notation. If the NIC has no subnet mask previously defined, you must also set the SubnetMask parameter. If the IP parameter is not specified, DHCP mode is enabled. Only valid when configuring a virtual NIC. | false | false |
IPv6 | String[] | Specifies static addresses using the following format: <IPv6>/<subnet_prefix_length> or <IPv6>. If you skip <subnet_prefix_length>, the default value of 64 is used. Specifying a value for IPv6 parameter overrides the current configuration. To clear all configured static IP addresses, pass an empty array to the IPv6 parameter. | false | false |
IPv6Enabled | Boolean | Indicates that IPv6 configuration is enabled. Setting this parameter to $false disables all IPv6-related parameters. If the value is $true", you need to provide values for at least one of the IPv6ThroughDhcp, AutomaticIPv6, and IPv6 parameters. | false | false |
IPv6ThroughDhcp | Boolean | Indicates that the IPv6 address is obtained through DHCP. | false | false |
Mac | String | Specifies the media access control (MAC) address of the virtual network adapter. Only valid when configuring a virtual NIC. | false | false |
ManagementTrafficEnabled | Boolean | Indicates that you want to enable the network adapter for management traffic. This parameter is supported only on ESX/ESXi/vCenter Server 4.0 and later. | false | false |
Mtu | Int32 | Specifies the MTU size. | false | false |
PhysicalNic | PhysicalNic[] | Specifies the PhysicalNIC objects you want to update. | true | true (ByValue) |
PortGroup | DistributedPortGroup | Specifies a distributed port group to which you want to connect the host network adapter. You can use this parameter only to migrate a virtual network adapter from a standard port group to a distributed port group. | true | false |
SubnetMask | String | Specifies a subnet mask for the NIC. If the NIC has a subnet mask previously defined, specifying the SubnetMask parameter when configuring the IP address is not mandatory unless you want to modify the mask. Only valid when configuring a virtual NIC. | false | false |
VirtualNic | HostVirtualNic[] | Provide a list of the host network adapters you want to configure. | true | true (ByValue) |
VMotionEnabled | Boolean | Indicates that you want to use the virtual host/VMKernel network adapter for VMotion. | false | false |
VsanTrafficEnabled | Boolean | Specifies whether Virtual SAN traffic is enabled on this network adapter. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified HostNic objects

Notes

To configure IPv6 settings, you must be working on ESX 4.0 or later and IPv 6 must be enabled on the ESX system.

Examples

-------------- Example 1 --------------

$vswitch =  New-VirtualSwitch -VMHost 10.23.112.234  -Name VSwitch

$nic =  New-VMHostNetworkAdapter -VMHost 10.23.112.234 -PortGroup PortGroup -VirtualSwitch $vswitch -IP 10.23.123.234 -SubnetMask 255.255.254.0

Set-VMHostNetworkAdapter -VirtualNIC $nic -IP 10.23.112.245 -SubnetMask 255.255.255.0 -Mtu 4000

Updates the network adapter IP address, Subnet mask, and MTU size.

-------------- Example 2 --------------

Get-VMHost Host | Get-VMHostNetworkAdapter -VMKernel | Set-VMHostNetworkAdapter -VMotionEnabled $true

Enable VMotion on all VMKernel network adapters on the specified host.

-------------- Example 3 --------------

Get-VMHostNetworkAdapter | where { $_.PortGroupName -eq "Service Console 1" } | Set-VMHostNetworkAdapter -IPv6Enabled $false

Disables the IPv6 support on a network adapter.

-------------- Example 4 --------------

Get-VMHostNetworkAdapter | where { $_.PortGroupName -eq "Service Console 1" } | Set-VMHostNetworkAdapter -IPv6ThroughDhcp $true

Configures a network adapter to obtain IPv6 through DHCP.

-------------- Example 5 --------------

Get-VMHostNetworkAdapter | where { $_.PortGroupName -eq "Service Console 1" } | Set-VMHostNetworkAdapter -AutomaticIPv6 $true

Configures a network adapter to obtain IPv6 by a router advertisement.

-------------- Example 6 --------------

Get-VMHostNetworkAdapter | where { $_.PortGroupName -eq "Service Console 1" } | Set-VMHostNetworkAdapter -IPv6 $ipv6Address

Changes the IPv6 address of a network adapter.


Set-VMHostProfile - vSphere PowerCLI Cmdlets Reference

Set-VMHostProfile

Synopsis

This cmdlet modifies the specified host profile.

Syntax

Set-VMHostProfile [[-Name] <String>] [[-ReferenceHost] <VMHost>] [-Profile] <VMHostProfile[]> [-Description <String>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Apply-VMHostProfile
Export-VMHostProfile
Get-VMHostProfile
Import-VMHostProfile
New-VMHostProfile
Remove-VMHostProfile
Test-VMHostProfileCompliance

Detailed Description

This cmdlet modifies the specified host profile.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Name | String | Specifies a new name for the host profile. | false | false |
ReferenceHost | VMHost | Specifies a reference host for the host profile. | false | false |
Profile | VMHostProfile[] | Specifies the host profile you want to modify. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Description | String | Specifies a new description for the host profile. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more VMHostProfile objects

Notes

Examples

-------------- Example 1 --------------

$profile = ( Get-VMHostProfile -Name Profile )[0]

Set-VMHostProfile -Profile $profile -Description "New description."

Changes the description of the Profile host profile.


Set-VMHostRoute - vSphere PowerCLI Cmdlets Reference

Set-VMHostRoute

Synopsis

This cmdlet modifies a route in the host routing table.

Syntax

Set-VMHostRoute [-VMHostRoute] <VMHostRoute[]> [-Destination <IPAddress>] [-Gateway <IPAddress>] [-PrefixLength <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostRoute
New-VMHostRoute
Remove-VMHostRoute

Detailed Description

This cmdlet modifies a route in the host routing table.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHostRoute | VMHostRoute[] | Specifies the route you want to modify. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Destination | IPAddress | Changes the destination IP address of the route. | false | false |
Gateway | IPAddress | Changes the gateway IP address of the route. | false | false |
PrefixLength | Int32 | Modifies the prefix length of the destination IP address. For IPv4, the valid values are from 0 to 32, and for IPv6 - from 0 to 128. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified VMHostRoute objects

Notes

Supported only on ESX 4.0/ vCenter Server 4.0 and later.

Examples

-------------- Example 1 --------------

$vmhostroute = New-VMHostRoute -VMHost 10.23.114.189 -Destination 192.168.104.101 -Gateway 10.23.84.69 -PrefixLength 32

$vmhostroute | Set-VMHostRoute -Gateway 10.23.84.70

Creates a new host route and modifies its gateway.

-------------- Example 2 --------------

$vmhostroute1 = New-VMHostRoute -VMHost 10.23.114.189 -Destination 192.168.104.101 -Gateway 10.23.84.69 -PrefixLength 32

$vmhostroute2 = New-VMHostRoute -VMHost 10.23.114.190 -Destination 192.168.104.101 -Gateway 10.23.84.70 -PrefixLength 32

Set-VMHostRoute -VMHostRoute ($vmhostroute1, $vmhostroute2) -Destination 192.168.104.0 -PrefixLength 24

Modifies the destination and the prefix length of two host routes.


Set-VMHostService - vSphere PowerCLI Cmdlets Reference

Set-VMHostService

Synopsis

This cmdlet modifies a host service.

Syntax

Set-VMHostService [-HostService] <HostService[]> [-Policy] <HostServicePolicy> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostService
Start-VMHostService
Stop-VMHostService
Restart-VMHostService

Detailed Description

This cmdlet modifies a host service.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
HostService | HostService[] | Specifies the host service you want to update. | true | true (ByValue) |
Policy | HostServicePolicy | Specifies an activation policy for the host service. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified HostService objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHostService -VMHost Host | Set-VMHostService -Policy "Automatic"

Sets the policy of all services the Host virtual machine host to "Automatic".


Set-VMHostSnmp - vSphere PowerCLI Cmdlets Reference

Set-VMHostSnmp

Synopsis

This cmdlet modifies the host SNMP configuration.

Syntax

Set-VMHostSnmp [-HostSnmp] <VmHostSnmp[]> [-Enabled [<Boolean>]] [-Port <Int32>] [-ReadOnlyCommunity <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VMHostSnmp [-HostSnmp] <VmHostSnmp[]> [-Enabled [<Boolean>]] [-Port <Int32>] [-ReadOnlyCommunity <String[]>] -TargetCommunity <String> [-TargetPort <Int32>] -TargetHost <String> -AddTarget [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VMHostSnmp [-HostSnmp] <VmHostSnmp[]> [-Enabled [<Boolean>]] [-Port <Int32>] [-ReadOnlyCommunity <String[]>] [-TargetCommunity <String>] [-TargetPort <Int32>] [-TargetHost <String>] -RemoveTarget [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VMHostSnmp [-HostSnmp] <VmHostSnmp[]> [-Enabled [<Boolean>]] [-Port <Int32>] [-ReadOnlyCommunity <String[]>] [-RemoveTarget] -TrapTargetToRemove <TrapTarget> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostSNMP
Test-VMHostSNMP

Detailed Description

This cmdlet modifies the host SNMP configuration. If specified, adds or removes a trap target (removing can be specified by either TrapTargetToRemove parameter or by any of the following parameters (or combination of them): TargetCommunity, TargetHost, TargetPort). If the user passes $null, an empty array or string to the ReadOnlyCommunities parameter, the old values of this property are erased. This results in a NULL value of this property of the output object.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
HostSnmp | VmHostSnmp[] | Specifies the host Snmp object you want to modify. | true | true (ByValue) |
AddTarget | SwitchParameter | Indicates that you want to add a new trap target to the host SNMP configuration. A trap target consists of three elements - Community (mandatory), HostName (mandatory), Port (optional - defaults to 162), specified by the TargetCommunity, TargetHost, and TargetPort parameters. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Enabled | Boolean | Indicates that the SNMP feature is enabled on the specified host. | false | false |
Port | Int32 | Specifies the port on which the host listens to SNMP messages. | false | false |
ReadOnlyCommunity | String[] | Provide a list of communities, identifying who is able to send SNMP requests to that host. If $null, an empty array or string are passed to this parameter, its old values are erased and the output object for the ReadOnlyCommunity property is an empty array. In PowerShell an empty array is defined by @(). | false | false |
RemoveTarget | SwitchParameter | Indicates that you want to remove a trap target from the host SNMP configuration. There are two ways to specify a trap target: * Pass the trap target to the TrapTargetToRemove parameter. * Use a combination of the TargetCommunity, TargetHost, and TargetPort parameters to specify a criteria (for example, remove all trap targets that are using port 162). | true | false |
TargetCommunity | String | Specifies the community identifier of the trap target. | true | false |
TargetHost | String | Specifies the identifier of the target host - a host name or an IP address. | true | false |
TargetPort | Int32 | Specifies the port on which the target host listens to SNMP messages. | false | false |
TrapTargetToRemove | TrapTarget | Specifies the trap target you want to remove. The trap target can be obtained from the ?TrapTargets? property of the HostSNMP object (an array of TrapTarget objects). | true | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified VmHostSnmp objects

Notes

You must be connected to the ESX/ESXi host directly.

Examples

-------------- Example 1 --------------

$vmhostSNMP = Get-VMHostSNMP

Set-VMHostSNMP $vmhostSNMP -Enabled:$true -ReadOnlyCommunity 'example-community'

Enables SNMP on a virtual machine host.

-------------- Example 2 --------------

Get-VMHostSnmp | Set-VMHostSnmp -ReadonlyCommunity @()

Sets the virtual machine host SNMP by erasing the old value of the ReadOnlyCommunity parameter.


Set-VMHostStartPolicy - vSphere PowerCLI Cmdlets Reference

Set-VMHostStartPolicy

Synopsis

This cmdlet modifies the host default start policy.

Syntax

Set-VMHostStartPolicy [-VMHostStartPolicy] <VMHostStartPolicy[]> [-Enabled [<Boolean>]] [-StartDelay <Int32>] [-StopAction <VmStopAction>] [-StopDelay <Int32>] [-WaitForHeartBeat [<Boolean>]] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostStartPolicy

Detailed Description

This cmdlet modifies the host default start policy. Start policy defines what happens to virtual machines when the server starts up or stops.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHostStartPolicy | VMHostStartPolicy[] | Specifies the host start policy you want to modify. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Enabled | Boolean | Indicates that the service that controls the host start policies is enabled. If it is enabled, the default start policies and the start policies of the specified hosts are applied. If disabled, no start policy is applied. | false | false |
StartDelay | Int32 | Specifies a default start delay of the virtual machines in seconds. | false | false |
StopAction | VmStopAction | Specifies the default action that is applied to the virtual machines when the server stops. The valid values are None, Suspend, PowerOff, or GuestShutDown. | false | false |
StopDelay | Int32 | Specifies a default stop delay of the virtual machines in seconds. | false | false |
WaitForHeartBeat | Boolean | Specifies whether the virtual machines should start after receiving a heartbeat from the host, ignore heartbeats, and start after the StartDelay has elapsed ($true), or follow the system default before powering on ($false). When a virtual machine is next in the start order, the system either waits a specified period of time for a host to power on or it waits until it receives a successful heartbeat from a powered-on host. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified VMHostStartPolicy objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHost Host | Get-VMHostStartPolicy | Set-VMHostStartPolicy -Enabled:$true -StartOrder 2 -StartDelay 300 -StopAction GuestShutDown -StopDelay 300

Retrieves the start policy of the Host host and modifies its configuration settings.

-------------- Example 2 --------------

Get-VMHost Host | Get-VMHostStartPolicy | Set-VMHostStartPolicy -WaitForHeartbeat

Retrieves the start policy of the Host host and modifies its configuration settings, so that virtual machines on the specified host wait for the host heartbeat.


Set-VMHostStorage - vSphere PowerCLI Cmdlets Reference

Set-VMHostStorage

Synopsis

This cmdlet configures a host storage.

Syntax

Set-VMHostStorage -VMHostStorage <VMHostStorageInfo[]> -SoftwareIScsiEnabled [<Boolean>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostStorage

Detailed Description

This cmdlet configures a host storage. The cmdlet enables or disables the software iSCSI support for the specified VMHostStorage objects.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
SoftwareIScsiEnabled | Boolean | Indicates that on this storage, software iSCSI is enabled. | true | false |
VMHostStorage | VMHostStorageInfo[] | Specifies the host storage you want to configure. | true | true (ByValue) |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified VMHostStorageInfo objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHostStorage 10.23.112.234 | Set-VMHostStorage -SoftwareIScsiEnabled $true

Enables the iSCSI on the specified storage.


Set-VMHostSysLogServer - vSphere PowerCLI Cmdlets Reference

Set-VMHostSysLogServer

Synopsis

This cmdlet configures the remote syslog server of the specified hosts.

Syntax

Set-VMHostSysLogServer [[-SysLogServer] <NamedIPEndPoint[]>] [-VMHost] <VMHost[]> [-SysLogServerPort <Int32>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostSysLogServer

Detailed Description

This cmdlet configures the remote syslog server of the specified hosts.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
SysLogServer | NamedIPEndPoint[] | Specifies the sys log servers you want to configure. The parameter accepts objects of the NamedIPEndPoint, IPEndPoint, IPAddress, and String types. The accepted formats, if string is used, are DNS names and the standard IPv6/IPv4 format: FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:192.168.0.1:80, where the FFFF:FFFF:FFFF:FFFF:FFFF:FFFF can be replaced by any hex value with the same structure (both upper or lower case). It is only meaningful in case of IPv6 address and is omitted for IPv4. The 192.168.0.1 part is mandatory and can be any address in the IPv4 format. The :80 part is optional. If omitted, the port must be specified through the SysLogServerPort parameter. If Syslog is set to $null, the configured syslog server, if any, is removed. | false | true (ByValue) |
VMHost | VMHost[] | Specifies the host whose syslog servers you want to configure. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
SysLogServerPort | Int32 | Specifies the sys log server port. Must be specified if the string that is passed to the SysLogServer parameter does not contain the port value, or the argument of the SysLogServer is an IP address. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The modified NamedIPEndPoint object

Notes

Examples

-------------- Example 1 --------------

Set-VMHostSysLogServer -SysLogServer '192.168.0.1:133' -VMHost Host

Sets a SysLog server on the Host virtual machine host.

-------------- Example 2 --------------

Set-VMHostSysLogServer -SysLogServer $null -VMHost Host

Removes the SysLog server from the Host virtual machine host.


Set-VMQuestion - vSphere PowerCLI Cmdlets Reference

Set-VMQuestion

Synopsis

This cmdlet answers the specified virtual machine question.

Syntax

Set-VMQuestion -VMQuestion <VMQuestion[]> [-Option] <Object> [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VMQuestion -VMQuestion <VMQuestion[]> -DefaultOption [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMQuestion

Detailed Description

This cmdlet answers the specified virtual machine question using the value of the Option parameter. If the DefaultOption parameter is set to $true, the cmdlet answers the question with a default option, if any.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Option | Object | Specifies an object or string to provide an option to the virtual machine question. Wildcards are supported for string values. The string can be used to specify an option ID or label. If the string does not match a valid option ID or label, or if there are multiple matches, an error is generated. | true | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
DefaultOption | SwitchParameter | Indicates that you want to answer the virtual machine question using a default option. If no default option exists for the question, an error is generated. | true | false |
VMQuestion | VMQuestion[] | Specifies the virtual machine question you want to answer. | true | true (ByValue) |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The modified VMQuestion object

Notes

You can also call this cmdlet via the Answer-VMQuestion alias.

Examples

-------------- Example 1 --------------

Set-VMQuestion -VMQuestion $question -DefaultOption

Answers the question stored in the $question with a default option.

-------------- Example 2 --------------

Set-VMQuestion -VMQuestion $question -Option "Cancel"

Answers the question stored in the $question variable with "cancel".

-------------- Example 3 --------------

Get-VM VM | Get-VMQuestion | Set-VMQuestion -DefaultOption

Answers the question of VM virtual machine with a default option.


Set-VMResourceConfiguration - vSphere PowerCLI Cmdlets Reference

Set-VMResourceConfiguration

Synopsis

This cmdlet configures resource allocation between the virtual machines.

Syntax

Set-VMResourceConfiguration [-Configuration] <VMResourceConfiguration[]> [-HtCoreSharing <HTCoreSharing>] [-CpuAffinity <CpuAffinity>] [-CpuAffinityList <Int32[]>] [-CpuReservationMhz <Int64>] [-CpuLimitMhz <Int64>] [-CpuSharesLevel <SharesLevel>] [-NumCpuShares <Int32>] [-MemReservationMB <Int64>] [-MemReservationGB <Decimal>] [-MemLimitMB <Int64>] [-MemLimitGB <Decimal>] [-MemSharesLevel <SharesLevel>] [-NumMemShares <Int32>] [-Disk <HardDisk[]>] [-NumDiskShares <Int32>] [-DiskSharesLevel <SharesLevel>] [-DiskLimitIOPerSecond <Int64>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMResourceConfiguration

Detailed Description

This cmdlet configures resource allocation between the virtual machines. To retain the current value of a setting, omit the corresponding parameter. To disable a setting (only applicable to the nullable limit settings), pass $null.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Configuration | VMResourceConfiguration[] | Specifies the configuration object you want to modify. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
CpuAffinity | CpuAffinity | The use of this parameter is deprecated. Use CpuAffinityList instead. Specifies the distribution of virtual machine CPUs across the physical cores or hyperthreads of the host. You must pass exactly as many arguments as the number of CPUs of the virtual machine. Each argument specifies the physical core or hyperthread that the virtual machine will use. Valid arguments are NoAffinity, Cpu1, ?, Cpu63. When the virtual machine resides in a DRS cluster, you cannot use CpuAffinity. | false | false |
CpuAffinityList | Int32[] | Specifies the distribution of virtual machine CPUs across the physical cores or hyperthreads of the host. You must pass exactly as many arguments as the number of CPUs of the virtual machine. Each argument specifies the physical core or hyperthread that the virtual machine will use. Valid arguments are positive integers. To clear formerly specified arguments, pass an empty array. When the virtual machine resides in a DRS cluster, you cannot use CpuAffinityList. | false | false |
CpuLimitMhz | Int64 | Specifies the limit on CPU usage in MHz. Utilization will not exceed this limit even if there are available resources. | false | false |
CpuReservationMhz | Int64 | Specifies the number of CPU MHz that are guaranteed to be available. | false | false |
CpuSharesLevel | SharesLevel | Specifies the CPU allocation level. Used in relative allocation between virtual machines. The valid values are Custom, High, Low, and Normal. | false | false |
Disk | HardDisk[] | Specifies the virtual hard disk you want to configure. | false | false |
DiskLimitIOPerSecond | Int64 | Specifies the disk limit IO per second. The valid values are in the range between 16 and 2147483647. -1 means unlimited. | false | false |
DiskSharesLevel | SharesLevel | Specifies the allocation level. The level is a simplified view of shares. Levels map to a pre-determined set of numeric values for shares. If the shares value does not map to a predefined size, then the level is set as custom. | false | false |
HtCoreSharing | HTCoreSharing | Specifies whether a virtual machine is scheduled to share a physical processor core (assuming hyperthreading is enabled on the host at all). The following values are valid: Any - (default) the virtual CPUs of this virtual machine can freely share cores with other virtual CPUs of this or other virtual machines. None - the virtual CPUs of this virtual machine have exclusive use of a processor core whenever they are scheduled to it. The other hyperthread of the core is "halted" while this virtual machine is using the core. Internal - on a virtual machine with exactly two virtual processors, the two virtual processors are allowed to share one physical core (at the discretion of the ESX scheduler), but this virtual machine never shares a core with any other virtual machine. If this virtual machine has any other number of processors than two, this setting is the same as the None setting. | false | false |
MemLimitGB | Decimal | Specifies a memory usage limit in gigabytes (GB). If this parameter is set, utilization will not exceed the specified limit even if there are available resources. | false | false |
MemLimitMB | Int64 | This parameter is obsolete. Use MemLimitGB instead. Specifies a memory usage limit in megabytes (MB). If this parameter is set, utilization will not exceed the specified limit even if there are available resources. | false | false |
MemReservationGB | Decimal | Specifies the guaranteed available memory in gigabytes (GB). | false | false |
MemReservationMB | Int64 | This parameter is obsolete. Use MemReservationGB instead. Specifies the guaranteed available memory in megabytes (MB). | false | false |
MemSharesLevel | SharesLevel | Specifies the memory allocation level for this pool. Used in relative allocation between resource consumers. The valid values are Custom, High, Low, and Normal. | false | false |
NumCpuShares | Int32 | Specifies the CPU allocation level for this pool. Used in relative allocation between resource consumers. This parameter is ignored unless CpuSharesLevel is set to Custom. | false | false |
NumDiskShares | Int32 | Specifies the number of shares allocated. Used to determine resource allocation in case of resource contention. | false | false |
NumMemShares | Int32 | Specifies the number of memory shares allocated. Used to determine resource allocation in case of resource contention. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified VMResourceConfiguration objects

Notes

Examples

-------------- Example 1 --------------

Set-VMResourceConfiguration -Configuration $conf -CpuAffinity ([CpuAffinity]::Cpu1 -bor [CpuAffinity]::Cpu2)

Specifies two affinities for the virtual machine resource configuration in the $conf variable. Bit Or is used.


Set-VMStartPolicy - vSphere PowerCLI Cmdlets Reference

Set-VMStartPolicy

Synopsis

This cmdlet modifies the virtual machine start policy.

Syntax

Set-VMStartPolicy [-StartPolicy] <VMStartPolicy[]> [-StartAction <VmStartAction>] [-StartOrder <Int32>] [-InheritStopActionFromHost] [-InheritStopDelayFromHost] [-InheritWaitForHeartbeatFromHost] [-InheritStartDelayFromHost] [-UnspecifiedStartOrder] [-StartDelay <Int32>] [-StopAction <VmStopAction>] [-StopDelay <Int32>] [-WaitForHeartBeat [<Boolean>]] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMStartPolicy

Detailed Description

This cmdlet modifies the virtual machine start policy. Start policy defines what happens to virtual machines when the server starts up or stops.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
StartPolicy | VMStartPolicy[] | Specifies the virtual machine start policy you want to modify. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
InheritStartDelayFromHost | SwitchParameter | Indicates that the virtual machine uses the value of the StartDelay parameter of the host. | false | false |
InheritStopActionFromHost | SwitchParameter | Indicates that the virtual machine uses the value of the StopAction parameter of the host. | false | false |
InheritStopDelayFromHost | SwitchParameter | Indicates that the virtual machine uses the value of the StopDelay parameter of the host. | false | false |
InheritWaitForHeartbeatFromHost | SwitchParameter | Indicates that the virtual machine uses the value of the WaitforHeartbeat parameter of the host. | false | false |
StartAction | VmStartAction | Specifies a start action for virtual machines. It can be None or PowerOn. | false | false |
StartDelay | Int32 | Specifies a default start delay in seconds. | false | false |
StartOrder | Int32 | Specifies a number to define the virtual machines start order. | false | false |
StopAction | VmStopAction | Specifies the default action of the virtual machine when the server stops. The valid values are None, Suspend, PowerOff, and GuestShutDown. | false | false |
StopDelay | Int32 | Specifies the default stop delay in seconds. | false | false |
UnspecifiedStartOrder | SwitchParameter | Indicates that no order is defined for starting the virtual machines. | false | false |
WaitForHeartBeat | Boolean | Indicates whether the virtual machine should start after receiving a heartbeat, ignore heartbeats and start after the StartDelay has elapsed ($true), or follow the system default before powering on ($false). When a virtual machine is next in the start order, the system either waits a specified period of time for a virtual machine to power on or it waits until it receives a successful heartbeat from a powered on virtual machine. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more modified VMStartPolicy objects

Notes

Examples

-------------- Example 1 --------------

$vmstartpolicy = Get-VMStartPolicy -VM VM

Set-VMStartPolicy -StartPolicy $vmstartpolicy -StartAction PowerOn

Retrieves the start policy of the VM virtual machine and defines that when the server starts, the virtual machine is powered on.

-------------- Example 2 --------------

Get-VM VM | Get-VMStartPolicy | Set-VMStartpolicy -InheritStopActionFromHost -InheritStopDelayFromHost

Reconfigures the start policy of the VM virtual machine to inherit the values of the StopAction and StopDelay from the host.

-------------- Example 3 --------------

Get-VM VM | Get-VMStartPolicy | Set-VMStartpolicy -StartAction PowerOn -StartOrder 2 -StartDelay 300 -StopAction GuestShutDown -StopDelay 300

Retrieve the start policy of the specified virtual machine and modify its configuration settings.


Shutdown-VMGuest - vSphere PowerCLI Cmdlets Reference

Shutdown-VMGuest

Synopsis

This cmdlet shuts down the specified virtual machine guest OS.

Syntax

Shutdown-VMGuest [[-VM] <VirtualMachine[]>] [[-Server] <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Shutdown-VMGuest [[-Guest] <VMGuest[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMGuest
Restart-VMGuest
Suspend-VMGuest

Detailed Description

This cmdlet issues a command to the guest operating system asking it to prepare for a shutdown operation. Returns immediately and does not wait for the guest operating system to complete the operation.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Guest | VMGuest[] | Specifies the virtual machine guests you want to shut down. | false | true (ByValue) |
VM | VirtualMachine[] | Specifies the virtual machines whose operating systems you want to shut down. The virtual machines must have VMware Tools installed. | false | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more shutdown VMGuest objects

Notes

Examples

-------------- Example 1 --------------

Get-VM VM | Shutdown-VMGuest

Shutdowns the guest OS of the virtual machine named VM.


Start-CIVApp - vCloud Snapin Cmdlets Reference

Start-CIVApp

Synopsis

This cmdlet starts the specified vApp.

Syntax

Start-CIVApp [-VApp] <CIVApp[]> [-RunAsync] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVApp
New-CIVapp
Remove-CIVapp
Restart-CIVapp
Set-CIVapp
Stop-CIVapp
Suspend-CIVapp

Detailed Description

This cmdlet starts the specified vApp. Powers on all virtual machines in the vApp.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VApp | CIVApp[] | Specifies the vApp you want to start. The operation applies the start policy for the vApp, if any. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The specified CIVApp objects

Notes

Examples

-------------- Example 1 --------------

$myVapp = Get-CIVApp 'MyvApp'
Start-CIVApp $myVApp

Starts the specified vApp.

-------------- Example 2 --------------

$myVapp = Get-CIVApp 'MyvApp'
$task = $myVApp | Start-CIVApp -RunAsync

Starts the specified vApp asynchronously.


Start-CIVM - vCloud Snapin Cmdlets Reference

Start-CIVM

Synopsis

This cmdlet powers on the specified virtual machine.

Syntax

Start-CIVM [-VM] <CIVM[]> [-RunAsync] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVM
Restart-CIVM
Stop-CIVM
Suspend-CIVM

Detailed Description

This cmdlet powers on the specified virtual machine.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | CIVM[] | Specifies the virtual machine you want to power on. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The specified CIVM objects

Notes

Examples

-------------- Example 1 --------------

$myVM = Get-CIVM -Name 'MyVM'
Start-CIVM $myVM

Powers on the specified virtual machine.

-------------- Example 2 --------------

$myVM = Get-CIVM -Name 'MyVM'
$task = Start-CIVM $myVM -RunAsync

Powers on the specified virtual machine asynchronously.


Start-VApp - vSphere PowerCLI Cmdlets Reference

Start-VApp

Synopsis

This cmdlet starts vApps.

Syntax

Start-VApp [-VApp] <VApp[]> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Export-VApp
Get-VApp
Import-VApp
New-VApp
Remove-VApp
Set-VApp
Stop-VApp
Move-VApp

Detailed Description

This cmdlet starts vApps.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VApp | VApp[] | Specifies the vApp that you want to start. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more started VApp objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHost MyVMHost1 | Get-VApp | Start-VApp

Starts all vApps on the specified host.


Start-VM - vSphere PowerCLI Cmdlets Reference

Start-VM

Synopsis

This cmdlet powers on virtual machines.

Syntax

Start-VM [-RunAsync] [-VM] <VirtualMachine[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VM
Move-VM
New-VM
Remove-VM
Set-VM
Stop-VM
Suspend-VM
Move-VApp

Detailed Description

This cmdlet powers on the virtual machines specified by the VM parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines you want to power on. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more powered-on VirtualMachine objects

Notes

Examples

-------------- Example 1 --------------

Start-VM -VM VM -Confirm -RunAsync

Asynchronously starts the virtual machine named VM. Before initializing the task, asks for confirmation.


Start-VMHost - vSphere PowerCLI Cmdlets Reference

Start-VMHost

Synopsis

This cmdlet starts the specified hosts.

Syntax

Start-VMHost [-VMHost] <VMHost[]> [-TimeoutSeconds <Int32>] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Add-VMHost
Get-VMHost
Move-VMHost
Remove-VMHost
Restart-VMHost
Set-VMHost
Stop-VMHost
Suspend-VMHost

Detailed Description

This cmdlet starts the specified hosts. The task completes when the host successfully exits standby state and sends a heartbeat signal. If nothing is received from the host for the time defined by the TimeoutSeconds parameter, the host is declared timed out, and the task is assumed failed.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts you want to start. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
TimeoutSeconds | Int32 | Specifies a time period in seconds to wait for a heartbeat signal from the host. If nothing is received from the host for the specified time, the host is declared timed out, and the task is assumed failed. The default value is 300. | false | false | 300
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more powered-on VMHost objects

Notes

Examples

-------------- Example 1 --------------

Start-VMHost 10.23.112.235 -RunAsync

Starts the specified host. The command returns without waiting for the task to complete.


Start-VMHostService - vSphere PowerCLI Cmdlets Reference

Start-VMHostService

Synopsis

This cmdlet starts the specified host services.

Syntax

Start-VMHostService [-HostService] <HostService[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostService
Set-VMHostService
Stop-VMHostService
Restart-VMHostService

Detailed Description

This cmdlet starts the specified host services.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
HostService | HostService[] | Specifies the host services you want to start. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more restarted HostService objects

Notes

Examples

-------------- Example 1 --------------

Start-VMHostService -Service $vmHostService

Starts a host service.


Stop-CIVApp - vCloud Snapin Cmdlets Reference

Stop-CIVApp

Synopsis

This cmdlet stops the specified vApp.

Syntax

Stop-CIVApp [-VApp] <CIVApp[]> [-RunAsync] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVApp
New-CIVApp
Remove-CIVApp
Restart-CIVApp
Set-CIVApp
Start-CIVApp
Suspend-CIVApp

Detailed Description

This cmdlet stops the specified vApp. Powers off all virtual machines in the vApp.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VApp | CIVApp[] | Specifies the vApp you want to stop. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The specified CIVApp objects

Notes

Examples

-------------- Example 1 --------------

$myVapp = Get-CIVApp 'MyvApp'
Stop-CIVApp $myVApp

Stops the specified vApp.

-------------- Example 2 --------------

$myVapp = Get-CIVApp 'MyvApp'
$task = $myVApp | Stop-CIVApp -RunAsync

Stops the specified vApp asynchronously.


Stop-CIVAppGuest - vCloud Snapin Cmdlets Reference

Stop-CIVAppGuest

Synopsis

This cmdlet shuts down the guest operating systems of all virtual machines in the specified vApp.

Syntax

Stop-CIVAppGuest [-VApp] <CIVApp[]> [-RunAsync] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Restart-CIVAppGuest

Detailed Description

This cmdlet shuts down the guest operating systems of all virtual machines in the specified vApp.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VApp | CIVApp[] | Specifies the vApp whose virtual machine guest operating systems you want to shut down. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The specified CIVApp objects

Notes

Examples

-------------- Example 1 --------------

$myVApp = Get-CIVApp -Name 'MyVApp'
Stop-CIVAppGuest $myVApp

Shuts down the guest operating systems of all virtual machines in the specified vApp.

-------------- Example 2 --------------

$myVApp = Get-CIVApp -Name 'MyVApp'
$task = $myVApp | Stop-CIVAppGuest -RunAsync

Shuts down the guest operating systems of all virtual machines in the specified vApp asynchronously.


Stop-CIVM - vCloud Snapin Cmdlets Reference

Stop-CIVM

Synopsis

This cmdlet powers off the specified virtual machine.

Syntax

Stop-CIVM [-VM] <CIVM[]> [-RunAsync] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVM
Restart-CIVM
Start-CIVM
Suspend-CIVM

Detailed Description

This cmdlet powers off the specified virtual machine.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | CIVM[] | Specifies the virtual machine you want to power off. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The specified CIVM objects

Notes

Examples

-------------- Example 1 --------------

$myVM = Get-CIVM -Name 'MyVM'
Stop-CIVM $myVM

Powers off the specified virtual machine.

-------------- Example 2 --------------

$myVM = Get-CIVM -Name 'MyVM'
$task = Stop-CIVM $myVM -RunAsync

Powers off the specified virtual machine asynchronously.


Stop-CIVMGuest - vCloud Snapin Cmdlets Reference

Stop-CIVMGuest

Synopsis

This cmdlet shuts down the guest operating system of the specified virtual machine.

Syntax

Stop-CIVMGuest [-VM] <CIVM[]> [-RunAsync] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Restart-CIVMGuest

Detailed Description

This cmdlet shuts down the guest operating system of the specified virtual machine.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | CIVM[] | Specifies the virtual machine whose guest operating system you want to shut down. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The specified CIVM objects

Notes

Examples

-------------- Example 1 --------------

$myVM = Get-CIVM -Name 'MyVM'
Stop-CIVMGuest $myVM

Shuts down the guest operating system of the specified virtual machine.

-------------- Example 2 --------------

$myVM = Get-CIVM -Name 'MyVM'
$task = $myVM | Shutdown-CIVM -RunAsync

Shuts down the guest operating system of the specified virtual machine asynchronously.


Stop-Task - vSphere PowerCLI Cmdlets Reference

Stop-Task

Synopsis

This cmdlet stops the specified tasks.

Syntax

Stop-Task [-Task] <Task[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Task
Wait-Task

Detailed Description

This cmdlet stops the tasks specified by the Task parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Task | Task[] | Specifies the tasks you want to stop. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

None

Notes

Examples

-------------- Example 1 --------------

$vm = Get-VM -Name "VM1"

$datacenter = Get-Datacenter -Name "Datacenter1"

$task = New-Template -Name "Template1" -Location $datacenter -VM $vm -RunAsync

Stop-Task -Task $task

Stops the process of creating a new template from a virtual machine.


Stop-VApp - vSphere PowerCLI Cmdlets Reference

Stop-VApp

Synopsis

This cmdlet stops vApps.

Syntax

Stop-VApp [-Force] [-VApp] <VApp[]> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Export-VApp
Get-VApp
Import-VApp
New-VApp
Remove-VApp
Set-VApp
Start-VApp
Move-VApp

Detailed Description

This cmdlet stops vApps.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VApp | VApp[] | Specifies the vApp that you want to stop. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Force | SwitchParameter | Indicates that the virtual machines are powered off regardless of the auto-start configuration of the vApps. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more stopped VApp objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHost MyVMHost1 | Get-VApp | Stop-VApp

Stops all virtual appliances on the specified host.


Stop-VM - vSphere PowerCLI Cmdlets Reference

Stop-VM

Synopsis

This cmdlet powers off virtual machines.

Syntax

Stop-VM [-Kill] [-RunAsync] [-VM] <VirtualMachine[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VM
Move-VM
New-VM
Remove-VM
Set-VM
Start-VM
Suspend-VM

Detailed Description

This cmdlet stops the virtual machines specified by the VM parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines you want to power off. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Kill | SwitchParameter | Indicates that you want to stop the specified virtual machines by terminating their processes running on the ESX. You can use this parameter to stop a virtual machine that is not responding and cannot be stopped or restarted in other ways. To use the Kill parameter, you need to have a direct connection to ESX 4.1 or later. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more powered-off VirtualMachine objects

Notes

Examples

-------------- Example 1 --------------

Stop-VM -VM VM -Confirm

Stops the virtual machine named VM after confirmation by the user.

-------------- Example 2 --------------

Stop-VM -VM VM -Kill -Confirm:$false

Stops the virtual machine VM by terminating its process running on the ESX.


Stop-VMHost - vSphere PowerCLI Cmdlets Reference

Stop-VMHost

Synopsis

This cmdlet powers off the specified hosts.

Syntax

Stop-VMHost [-VMHost] <VMHost[]> [-Force] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Add-VMHost
Get-VMHost
Move-VMHost
Remove-VMHost
Restart-VMHost
Start-VMHost
Suspend-VMHost

Detailed Description

This cmdlet powers off the specified hosts. When the cmdlet runs asynchronously (with the RunAsync parameter) and you are connected directly to the host, the returned task object contains no indicator of success.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts you want to power off. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Force | SwitchParameter | Indicates that you want to stop the hosts even if they are not in a maintenance mode. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more powered-off VMHost objects

Notes

Examples

-------------- Example 1 --------------

Stop-VMHost 10.23.112.235 -Confirm

Shutdowns the specified host after user confirmation.


Stop-VMHostService - vSphere PowerCLI Cmdlets Reference

Stop-VMHostService

Synopsis

This cmdlet stops the specified host services.

Syntax

Stop-VMHostService [-HostService] <HostService[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostService
Start-VMHostService
Set-VMHostService
Restart-VMHostService

Detailed Description

This cmdlet stops the host service specified by the Service parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
HostService | HostService[] | Specifies the host services you want to stop. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more stopped HostService objects

Notes

Examples

-------------- Example 1 --------------

Start-VMHostService -Service $vmHostService

Stops a host service.


Suspend-CIVApp - vCloud Snapin Cmdlets Reference

Suspend-CIVApp

Synopsis

This cmdlet suspends the specified vApp.

Syntax

Suspend-CIVApp [-VApp] <CIVApp[]> [-RunAsync] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVApp
New-CIVApp
Remove-CIVApp
Restart-CIVApp
Set-CIVApp
Start-CIVApp
Stop-CIVApp

Detailed Description

This cmdlet suspends the specified vApp.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VApp | CIVApp[] | Specifies the vApp you want to suspend. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The specified CIVApp objects

Notes

Examples

-------------- Example 1 --------------

Get-CIVApp -Name 'MyVApp' | Suspend-CIVApp

Suspends the specified vApp.

-------------- Example 2 --------------

$task = (Get-CIVApp -Name 'MyVApp') | Suspend-CIVApp -RunAsync

Suspends the specified vApp asynchronously.


Suspend-CIVM - vCloud Snapin Cmdlets Reference

Suspend-CIVM

Synopsis

This cmdlet suspends the specified virtual machine.

Syntax

Suspend-CIVM [-VM] <CIVM[]> [-RunAsync] [-Server <CIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVM
Restart-CIVM
Start-CIVM
Stop-CIVM

Detailed Description

This cmdlet suspends the specified virtual machine.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | CIVM[] | Specifies the virtual machine you want to suspend. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

The specified CIVM objects

Notes

Examples

-------------- Example 1 --------------

Get-CIVM -Name 'MyVM' | Suspend-CIVM

Suspend the specified virtual machine.

-------------- Example 2 --------------

$task = (Get-CIVM -Name 'MyVM') | Suspend-CIVM -RunAsync

Suspends the specified virtual machine asynchronously.


Suspend-VM - vSphere PowerCLI Cmdlets Reference

Suspend-VM

Synopsis

This cmdlet suspends virtual machines.

Syntax

Suspend-VM [-RunAsync] [-VM] <VirtualMachine[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VM
Move-VM
New-VM
Remove-VM
Set-VM
Start-VM
Stop-VM

Detailed Description

This cmdlet suspends the virtual machines specified by the VM parameter. You can use the suspend feature to make resources available on a short-term basis or for other situations in which you want to put a virtual machine on hold without powering it down. Using wildcards is supported with virtual machine names.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VM | VirtualMachine[] | Specifies the virtual machines you want to suspend. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more suspended VirtualMachine objects

Notes

Examples

-------------- Example 1 --------------

Get-VM VM | Suspend-VM

Suspends the virtual machine named VM.


Suspend-VMGuest - vSphere PowerCLI Cmdlets Reference

Suspend-VMGuest

Synopsis

This cmdlet suspends the specified guest operating systems.

Syntax

Suspend-VMGuest [[-VM] <VirtualMachine[]>] [[-Server] <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Suspend-VMGuest [[-Guest] <VMGuest[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMGuest
Restart-VMGuest
Shutdown-VMGuest

Detailed Description

This cmdlet issues a command to the specified guest operating system asking it to prepare for a suspend operation.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Guest | VMGuest[] | Specifies the guest operating systems you want to suspend. | false | true (ByValue) |
VM | VirtualMachine[] | Specifies the virtual machines whose operating systems you want to suspend. The virtual machines must have VMware Tools installed. | false | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more suspended VMGuest objects

Notes

Examples

-------------- Example 1 --------------

Get-VM VM| Suspend-VMGuest

Suspends the guest OS of the virtual machine named VM.


Suspend-VMHost - vSphere PowerCLI Cmdlets Reference

Suspend-VMHost

Synopsis

This cmdlet suspends hosts.

Syntax

Suspend-VMHost [-VMHost] <VMHost[]> [-TimeoutSeconds <Int32>] [-Evacuate] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Add-VMHost
Get-VMHost
Move-VMHost
Remove-VMHost
Restart-VMHost
Start-VMHost
Stop-VMHost

Detailed Description

This cmdlet puts the specified host machines in standby mode. You can use the suspend feature to make resources available on a short-term basis or for other situations in which you want to put a host on hold without powering it off.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost[] | Specifies the hosts you want to suspend. | true | true (ByValue) |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false | $true
Evacuate | SwitchParameter | If the value is $true, vCenter Server automatically reregisters the virtual machines that are compatible for reregistration. If they are not compatible, they remain on the suspended host. If there are powered-on virtual machines that cannot be reregistered, the operation waits until they are powered off manually. The Evacuate parameter is valid only when connected to a vCenter Server system and the virtual machine host is part of a DRS-enabled cluster. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
TimeoutSeconds | Int32 | Specifies a time period in seconds to wait for the host to enter standby mode. If the host is not suspended for the specified time, the host is declared timed out, and the task is assumed failed. The default value is 300. | false | false | 300
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |

Return Type

Zero or more suspended VMHost objects

Notes

Works only against vCenter Server 4.0 and later. The host should be config ured to support standby mode using Wake-on-Lan or the Intelligent Platform Management Interface Protocol (IPMI) protocol (vCenter Server 4.0). The Evacuate parameter is valid only when the host is a part of a DRS-enabl ed cluster.

Examples

-------------- Example 1 --------------

Suspend-VMHost 10.23.112.54 -TimeOutSeconds 60 -Confirm

Suspends the specified host after user confirmation. If the host is not suspended within 60 seconds, the task is reported failed.


Switch-ActiveDeployRuleSet - vSphere Auto Deploy Reference

Switch-ActiveDeployRuleSet

Synopsis

Activates a rule set.

Syntax

Switch-ActiveDeployRuleSet [[-DeployRuleSet] <DeployRuleSet>] [<CommonParameters>]

Related Commands

Get-DeployRuleSet

Detailed Description

Activates a rule set so that new PXE requests are evaluated through the rule set. By default, the cmdlet activates the working rule set.

You must have the "AutoDeploy.RuleSet.Activate" privilege on the root folder of vCenter Server to use this cmdlet.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
DeployRuleSet | DeployRuleSet | The rule set to activate. | false | true (ByValue) |

Return Type

VMware.DeployAutomation.Types.DeployRuleSet

Notes

Examples

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Test-DeployRuleSetCompliance - vSphere Auto Deploy Reference

Test-DeployRuleSetCompliance

Synopsis

Checks whether hosts are compliant with rules.

Syntax

Test-DeployRuleSetCompliance [-DeployRuleSet <DeployRuleSet>] [-VMHost] <VMHost[]> [<CommonParameters>]

Related Commands

Get-DeployRuleSet
Repair-DeployRuleSetCompliance

Detailed Description

Checks whether the specified hosts are compliant with a specified rule set. If not rule set is specified, the currently active rule set is used.

For example, if a rule specifies a particular host profile should be attached to a host, and a different host profile is actually attached to that host, the host is out of compliance.

The output of this cmdlet is a TestResult object that contains the VMHost object and a list containing the current item associated with the host and the expected item, according to the rules. If the list of items is empty, the host is in compliance with the rule set.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
VMHost | VMHost | Host to check for compliance. | true | true (ByValue) |
DeployRuleSet | DeployRuleSet | Rule set to use for checking compliance. The active rule set is used by default. | false | false |

Return Type

VMware.DeployAutomation.Types.TestResult[]

Notes

Examples

-------------- Example 1 --------------

C:\PS> Test-DeployRuleSetCompliance h1

Check the compliance of ESXi host "h1" against the active rule set.

-------------- Example 2 --------------

C:\PS> Get-VMHost h1 | Test-DeployRuleSetCompliance

Check the compliance of ESXi host "h1" against the active rule set.

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Test-VMHostProfileCompliance - vSphere PowerCLI Cmdlets Reference

Test-VMHostProfileCompliance

Synopsis

This cmdlet tests hosts for profile compliance.

Syntax

Test-VMHostProfileCompliance [-VMHost] <VMHost[]> [-UseCache] [[-Server] <VIServer[]>] [<CommonParameters>]
Test-VMHostProfileCompliance [-Profile] <VMHostProfile[]> [-UseCache] [[-Server] <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Apply-VMHostProfile
Export-VMHostProfile
Get-VMHostProfile
Import-VMHostProfile
New-VMHostProfile
Remove-VMHostProfile
Set-VMHostProfile

Detailed Description

This cmdlet tests hosts for profile compliance. The Profile and VMHost parameters cannot be set at the same time. If the Profile parameter is set, the specified host profile is tested for compliance with the hosts, to which it is associated. If the VMHost parameter is specified, the host is tested for compliance with the profiles associated with it. If no profiles are associated with the host, then the profile associated with the cluster is applied.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Profile | VMHostProfile[] | Specifies a host profile against which to test the specified host for compliance with the host to which it is associated. Do not set this parameter if the VMHost parameter is set. | true | true (ByValue) |
VMHost | VMHost[] | Specifies the host you want to test for profile compliance with the profile associated with it. If no profile is associated with it, the host is tested for compliance with the profile associated with the cluster, to which the host belongs. Do not set this parameter if the Profile parameter is set. | true | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
UseCache | SwitchParameter | Indicates that you want the vCenter Server to return cached information. If vCenter Server does not have cached information, a compliance scanning is performed. | false | false |

Return Type

Zero or more VMHostProfileIncompliance objects

Notes

Examples

-------------- Example 2 --------------

Test-VMHostProfileCompliance -VMHost Host

Tests the specified host for compliance with the profiles associated with it.

-------------- Example 3 --------------

$profile = Get-VMHostProfile -Name Profile

Apply-VMHostProfile -AssociateOnly -Profile $profile -Entity 10.0.0.126

Test-VMHostProfileCompliance -VMHost 10.0.0.126 | fl *

Test the profile compliance of a non-compliant virtual machine host associated with the profile.

-------------- Example 4 --------------

Test-VMHostProfileCompliance -Profile $profile | fl *

Test the profile compliance of a virtual machine host profile with the hosts it is associated with.


Test-VMHostSnmp - vSphere PowerCLI Cmdlets Reference

Test-VMHostSnmp

Synopsis

This cmdlet tests the host SNMP.

Syntax

Test-VMHostSnmp [-HostSnmp] <VmHostSnmp[]> [<CommonParameters>]

Related Commands

Online version
Get-VMHostSNMP
Set-VMHostSNMP

Detailed Description

This cmdlet tests the host SNMP specified by the HostSNMP parameter.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
HostSnmp | VmHostSnmp[] | Specifies the host SNMP you want to test. | true | true (ByValue) |

Return Type

Zero or more VmHostSnmp objects

Notes

Examples

-------------- Example 1 --------------

Test-VMHostSNMP -HostSNMP (Get-VMHostSNMP)

Retrieves and tests the SNMP of the default server.


Update-Tools - vSphere PowerCLI Cmdlets Reference

Update-Tools

Synopsis

This cmdlet upgrades VMware Tools on the specified virtual machine guest OS.

Syntax

Update-Tools [-NoReboot] [-RunAsync] [[-Guest] <VMGuest[]>] [<CommonParameters>]
Update-Tools [-NoReboot] [-RunAsync] [[-VM] <VirtualMachine[]>] [[-Server] <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Mount-Tools
Dismount-Tools
Wait-Tools

Detailed Description

This cmdlet upgrades the VMware Tools on the specified virtual machine guest OS. VMware Tools must be installed prior to updating it. After VMware Tools is updated, the virtual machine is restarted unless the NoReboot parameter is specified.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Guest | VMGuest[] | Specifies the guest operating systems on which you want to update VMware Tools. | false | true (ByValue) |
VM | VirtualMachine[] | Specifies a list of the virtual machines whose VMware Tools you want to upgrade. | false | true (ByValue) |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
NoReboot | SwitchParameter | Indicates that you do not want to reboot the system after updating VMware Tools. This parameter is supported only for Windows operating systems. NoReboot passes the following set of options to the VMware Tools installer on the guest OS: /s /v"/qn REBOOT=ReallySuppress? However, the virtual machine might still reboot after updating VMware Tools, depending on the currently installed VMware Tools version, the VMware Tools version to which you want to upgrade, and the vCenter Center/ESX versions. | false | false |
RunAsync | SwitchParameter | Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console. | false | false |

Return Type

None

Notes

On non-Windows operating systems, Update-Tools might not be able to perform automatic upgrade of VMware Tools. In such cases, the cmdlet only mounts t he VMware Tools installation drive and you must do the upgrade manually.

Examples

-------------- Example 1 --------------

Update-Tools VM

Updates the VMware Tools on the specified virtual machine. The virtual machine must be powered on.

-------------- Example 2 --------------

Get-VMGuest VM | Update-Tools

Updates the VMware Tools on the virtual machine specified by its guest operating system. The virtual machine must be powered on.


Wait-Task - vSphere PowerCLI Cmdlets Reference

Wait-Task

Synopsis

This cmdlet waits for the completion of the specified tasks.

Syntax

Wait-Task [-Task] <Task[]> [<CommonParameters>]

Related Commands

Online version
Get-Task
Stop-Task

Detailed Description

This cmdlet waits for the specified tasks to complete or fail before allowing the next command input. The task progress is observed in real time on the console screen.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
Task | Task[] | Specifies the tasks you want to wait to complete. | true | true (ByValue) |

Return Type

The output of the operation specified by the Task parameter

Notes

Examples

-------------- Example 1 --------------

$task = Remove-VM -VM VM -Confirm -RunAsync

Wait-Task -Task $task

Waits for the virtual machine to be removed before allowing the next command input.


Wait-Tools - vSphere PowerCLI Cmdlets Reference

Wait-Tools

Synopsis

This cmdlet waits for VMware Tools on the specified virtual machines to load.

Syntax

Wait-Tools [-VM] <VirtualMachine[]> [[-TimeoutSeconds] <Int32>] [-HostCredential <PSCredential>] [-HostUser <String>] [-HostPassword <SecureString>] [-Server <VIServer[]>] [<CommonParameters>]
Wait-Tools [[-TimeoutSeconds] <Int32>] [-HostCredential <PSCredential>] [-HostUser <String>] [-HostPassword <SecureString>] [-Guest] <VMGuest[]> [<CommonParameters>]

Related Commands

Online version
Mount-Tools
Dismount-Tools
Update-Tools

Detailed Description

This cmdlet waits for VMware Tools of the specified virtual machines to load. The cmdlet returns the virtual machines or guests on which VMware Tools have loaded successfully within the specified time limits. You can cancel the operation before completion using Ctrl+C.
The successful completion of Wait-Tools means that VMware Tools have loaded, but it does not guarantee for the start of other services.
Updating the returned VMGuest objects requires additional communication with VMware Tools and some of their properties (OSFullName, IPAddress, HostName, and other) might be still empty right after the completion of Wait-Tools.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
TimeoutSeconds | Int32 | Specifies the time period in seconds to wait for VMware Tools to start before cancelling the operation. | false | false |
Guest | VMGuest[] | Specifies the guest operating systems for which you want to wait VMware Tools to load. | true | true (ByValue) |
VM | VirtualMachine[] | Specifies the virtual machines for which you want to wait VMware Tools to load. | true | true (ByValue) |
HostCredential | PSCredential | Specifies credentials for authenticating with the ESX/ESXi host of the specified virtual machine. This parameter is needed only if you have authenticated with vCenter Server via SSPI. If SSPI is not used, the credentials for authentication with vCenter Server are used. | false | false |
HostPassword | SecureString | Specifies a password for authenticating with the ESX host of the specified virtual machine. This parameter is needed only if you have authenticated with the vCenter Server via SSPI. If no SSPI is used, the password for authentication with vCenter Server is used. | false | false |
HostUser | String | Specifies a username for authenticating with the ESX/ESXi host of the specified virtual machine. This parameter is needed only if you have authenticated with vCenter Server via SSPI. If SSPI is not used, the username for authentication with vCenter Server is used. | false | false |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |

Return Type

Zero or more VirtualMachine or VMGuest objects

Notes

Examples

-------------- Example 1 --------------

$vm = Start-VM VM* | Wait-Tools

Starts the virtual machines with names starting with VM and Waits for their VMware Tools to load.

-------------- Example 2 --------------

Wait-Tools -VM $vm -TimeoutSeconds 180

Waits for the VMware Tools of the virtual machines in the $vm variable to start. If VMware Tools do not load after 180 seconds, the operation is aborted.

-------------- Example 3 --------------

Wait-Tools -VM VM* -TimeoutSeconds 120 -HostCredential $vmhostCredential

Waits for the VMware Tools of the virtual machines in the $vm variable to start. If VMware Tools do not load after 120 seconds, the operation is aborted. Host credentials are required when you run the cmdlet on environments older than vSphere 4.0.

-------------- Example 4 --------------

Restart-VMGuest WindowsXP | Wait-Tools

Restart the guest operating system WindowsXP and waits for the VMware Tools to load.


AcceptanceLevels

AcceptanceLevels - Enum

Property of
GetPackages, NewImageProfile, SetImageProfile, GetProfiles, ImageProfileDiff, SoftwarePackage, ImageProfile
Parameter to
New-EsxImageProfile, Get-EsxSoftwarePackage, Set-EsxImageProfile, Get-EsxImageProfile

Enum Constants

Name
VMwareCertified
VMwareAccepted
PartnerSupported
CommunitySupported
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


AccessControlledEntity

AccessControlledEntity - Object

Property of
CIAccessControlRule
Parameter to
Get-CIAccessControlRule, New-CIAccessControlRule

Properties

Name Type Notes


AccessLevel

AccessLevel - Enum

Property of
CIAccessControlRule
Parameter to
Get-CIAccessControlRule, New-CIAccessControlRule, Set-CIAccessControlRule

Enum Constants

Name
FullControl
ReadWrite
Read
Unknown


Action

Action - Object

Returned by
Get-AlarmActionTrigger
Extended by
AlarmAction
Extends
VIObjectCore

Properties

Name | Type | Notes
ActionType | ActionType |
Properties inherited from VIObjectCore
Uid


ActionType

ActionType - Enum

Property of
Action, ScriptAction, EmailAction, AlarmAction, SnmpAction
Parameter to
Get-AlarmAction

Enum Constants

Name
SendEmail
ExecuteScript
SendSNMP


AddDepot

AddDepot - Object

Properties

Name | Type
DepotUrl | String[]
ParameterSetName | String
MyInvocation | InvocationInfo
InvokeCommand | CommandInvocationIntrinsics
Host | PSHost
SessionState | SessionState
Events | PSEventManager
JobRepository | JobRepository
InvokeProvider | ProviderIntrinsics
Stopping | Boolean
CommandRuntime | ICommandRuntime
CurrentPSTransaction | PSTransactionContext
CommandOrigin | CommandOrigin
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


AddProfilePackage

AddProfilePackage - Object

Properties

Name | Type
ImageProfile | ImageProfile
SoftwarePackage | SoftwarePackage[]
Force | SwitchParameter
ParameterSetName | String
MyInvocation | InvocationInfo
InvokeCommand | CommandInvocationIntrinsics
Host | PSHost
SessionState | SessionState
Events | PSEventManager
JobRepository | JobRepository
InvokeProvider | ProviderIntrinsics
Stopping | Boolean
CommandRuntime | ICommandRuntime
CurrentPSTransaction | PSTransactionContext
CommandOrigin | CommandOrigin
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


AdminOrg

AdminOrg - Object

Returned by
Get-Org
Extends
Org

Properties

Name | Type | Notes
Enabled | bool |
CanPublish | bool |
DeployedVMQuota | int? |
StoredVMQuota | int? |
VdcCount | int |
CatalogCount | int |
VAppCount | int |
Properties inherited from Org
FullName, Description, Id, Name, Href, ExtensionData, Client, Uid


AdvancedOption

AdvancedOption - Object

Parameter to
New-VM, New-HardDisk, Move-VM
Extended by
SdrsVMDiskAntiAffinityRule, SdrsVMAntiAffinityRule

Properties

Name Type Notes


AdvancedSetting

AdvancedSetting - Object

Parameter to
Set-AdvancedSetting, Remove-AdvancedSetting
Returned by
Get-AdvancedSetting, Set-AdvancedSetting, New-AdvancedSetting
Extends
VIObject

Properties

Name | Type | Notes
Value | Object |
Entity | VIObject |
Type | AdvancedSettingType |
Description | String |
Properties inherited from VIObject
Name, Uid, Id, Client


AdvancedSettingType

AdvancedSettingType - Enum

Property of
AdvancedSetting
Parameter to
New-AdvancedSetting

Enum Constants

Name
ClusterHA
VM
ClusterDRS
VMHost
DatastoreClusterSdrs
VIServer


AlarmAction

AlarmAction - Object

Property of
AlarmActionTrigger
Parameter to
Remove-AlarmAction, New-AlarmActionTrigger , Get-AlarmActionTrigger
Returned by
New-AlarmAction, Remove-AlarmActionTrigger, Get-AlarmAction
Extended by
ScriptAction, EmailAction, SnmpAction
Extends
Action

Properties

Name | Type | Notes
AlarmDefinition | AlarmDefinition |
Trigger | AlarmActionTrigger[] |
Properties inherited from Action
ActionType, Uid


AlarmActionTrigger

AlarmActionTrigger - Object

Property of
ScriptAction, EmailAction, AlarmAction, SnmpAction
Parameter to
Remove-AlarmActionTrigger
Returned by
New-AlarmActionTrigger , Get-AlarmActionTrigger
Extends
VIObjectCore

Properties

Name | Type | Notes
StartStatus | InventoryItemStatus |
EndStatus | InventoryItemStatus |
Repeat | Boolean |
AlarmAction | AlarmAction |
Properties inherited from VIObjectCore
Uid


AlarmDefinition

AlarmDefinition - Object

Property of
ScriptAction, EmailAction, AlarmAction, SnmpAction
Parameter to
Get-AlarmAction, New-AlarmAction, Set-AlarmDefinition
Returned by
Get-AlarmDefinition, Set-AlarmDefinition
Extends
VIObject, ExtensionData

Properties

Name | Type | Notes
Entity | VIObject |
Description | String |
Enabled | Boolean |
ActionRepeatMinutes | Integer |
Properties inherited from VIObject
Id, Name, Uid, Client
Properties inherited from ExtensionData
ExtensionData


Annotation

Annotation - Object

Returned by
Set-Annotation, Get-Annotation

Properties

Name | Type | Notes
AnnotatedEntityId | String |
AnnotatedEntity | InventoryItem |
Name | String |
Value | String |
Uid | String |


BadCertificateAction

BadCertificateAction - Enum

Property of
PowerCLIConfiguration
Parameter to
Set-PowerCLIConfiguration

Enum Constants

Name
Ignore
Warn
Prompt
Fail
Unset


BlockedPolicy

BlockedPolicy - Object

Parameter to
Set-VDBlockedPolicy
Returned by
Get-VDBlockedPolicy, Set-VDBlockedPolicy
Extended by
VDPortgroupBlockedPolicy
Extends
VDObjectCore

Properties

Name | Type | Notes
Blocked | bool |
BlockedInherited | bool |
Properties inherited from VDObjectCore
Uid


Catalog

Catalog - Object

Property of
Media, CatalogItem, CIVAppTemplate
Parameter to
Get-Media, Import-CIVAppTemplate, New-CIVAppTemplate, Set-Catalog, Remove-Catalog, Get-CatalogItem, Get-CIAccessControlRule, New-CIAccessControlRule
Returned by
Set-Catalog, New-Catalog
Extends
CIObject, AccessControlledEntity

Properties

Name | Type | Notes
Published | bool |
Shared | bool |
Created | DateTime |
VAppTemplateCount | int |
MediaCount | int |
Org | Org |
Owner | CIUser |
Properties inherited from CIObject
Id, Description, Name, Href, ExtensionData, Client, Uid


CatalogItem

CatalogItem - Object

Returned by
Get-CatalogItem
Extended by
Media, CIVAppTemplate
Extends
CIObject

Properties

Name | Type | Notes
Catalog | Catalog |
Properties inherited from CIObject
Id, Description, Name, Href, ExtensionData, Client, Uid


CDDrive

CDDrive - Object

Property of
VirtualMachine
Parameter to
Set-CDDrive, Remove-CDDrive
Returned by
Get-CDDrive, Set-CDDrive, New-CDDrive
Extends
VirtualDevice

Properties

Name | Type | Notes
IsoPath | String |
HostDevice | String |
RemoteDevice | String |
Properties inherited from VirtualDevice
ExtensionData, ParentId, ConnectionState, Id, Name, Uid, Parent, Client


ChapType

ChapType - Enum

Property of
IScsiHbaAuthenticationProperties
Parameter to
New-IScsiHbaTarget, Set-IScsiHbaTarget, Set-VMHostHba

Enum Constants

Name
Prohibited
Discouraged
Preferred
Required


CIAccessControlRule

CIAccessControlRule - Object

Parameter to
Set-CIAccessControlRule, Remove-CIAccessControlRule
Returned by
Get-CIAccessControlRule, New-CIAccessControlRule

Properties

Name | Type | Notes
AccessLevel | AccessLevel |
Entity | AccessControlledEntity |
User | CIObject |


CIDatastore

CIDatastore - Object

Returned by
Add-CIDatastore, Get-CIDatastore
Extends
CIObject, DatastoreRelatedObject

Properties

Name | Type | Notes
FileSystem | String |
CapacityGB | Decimal |
ProvisionedSpaceGB | Decimal |
UsedSpaceGB | Decimal |
RequestedStorageGB | Decimal |
Enabled | Boolean |
Properties inherited from CIObject
Name, Id, Description, Href, ExtensionData, Client, Uid


CIGroup

CIGroup - Object

Extends
CIObject

Properties

Name Type Notes
Properties inherited from CIObject
Id, Description, Name, Href, ExtensionData, Client, Uid


CINetworkAdapter

CINetworkAdapter - Object

Parameter to
Set-CINetworkAdapter, Get-CIVAppNetwork
Returned by
Set-CINetworkAdapter, Get-CINetworkAdapter
Extends
ExtendedObject

Properties

Name | Type | Notes
MACAddress | string |
IPAddressAllocationMode | IPAddressAllocationMode |
VAppNetwork | CIVAppNetwork |
Connected | bool |
Index | int |
Primary | bool |
VM | CIVM |
IPAddress | IPAddress |
ExternalIPAddress | IPAddress |
Properties inherited from ExtendedObject
ExtensionData


CIObject

CIObject - Object

Property of
CIAccessControlRule
Parameter to
Get-CIView, Get-CIAccessControlRule, New-CIAccessControlRule
Extended by
OrgVdc, CIVAppNetwork, CIVM, ProviderVdc, CIRole, Org, CIGroup, CatalogItem, Catalog, CIVirtualCenterServer, CIUser, CIRight, ExternalNetwork, NetworkPool, OrgNetwork, CIVApp, CIDatastore
Extends
CIResource, VIObject

Properties

Name | Type | Notes
Id | string |
Description | string |
Name | string |
Properties inherited from CIResource
Href, ExtensionData, Client, Uid


CIObjectCore

CIObjectCore - Object

Extended by
CIVAppStartRule, CIVSphereObjectReference, CIResource
Extends

Properties

Name | Type | Notes
Uid | string | Deprecated. PowerCLI scripts should not use this property. The property will be removed in a future release.
Client | Object | Deprecated. PowerCLI scripts should not use this property. The property will be removed in a future release.


CIPortGroupReference

CIPortGroupReference - Object

Extends
CIVSphereObjectReference

Properties

Name | Type | Notes
PortGroupType | string |
ScopeType | CIPortGroupScopeType |
Network | CIExternalNetwork |
Properties inherited from CIVSphereObjectReference
VCenterServer, VSphereMoRef, Uid, Client


CIPortGroupScopeType

CIPortGroupScopeType - Enum

Property of
CIPortGroupReference

Enum Constants

Name
Global = 1
Organization = 2
VApp = 3


CIResource

CIResource - Object

Extended by
CIObject
Extends
CIObjectCore, ExtendedObject

Properties

Name | Type | Notes
Href | string |
Properties inherited from CIObjectCore
Client, Uid
Properties inherited from ExtendedObject
ExtensionData


CIRight

CIRight - Object

Property of
CIRole
Extends
CIObject

Properties

Name | Type | Notes
Category | string |
Properties inherited from CIObject
Id, Description, Name, Href, ExtensionData, Client, Uid


CIRole

CIRole - Object

Parameter to
Get-CIUser
Extends
CIObject

Properties

Name | Type | Notes
Rights | CIRight[] |
ReadOnly | bool |
Properties inherited from CIObject
Id, Description, Name, Href, ExtensionData, Client, Uid


CISearchResult

CISearchResult - Object

Parameter to
Get-CIView

Properties

Name Type Notes


CIServer

CIServer - Object

Parameter to
Get-Org, Disconnect-CIServer, Get-ProviderVdc, Get-CIVApp, Get-Media, Get-CIVAppTemplate, Get-OrgNetwork, Get-CIRole, Get-ExternalNetwork, Get-CIVM, Get-Catalog, Get-CIUser, Get-OrgVdc, Get-CIView, Import-CIVApp, Restart-CIVAppGuest, Restart-CIVMGuest, Stop-CIVApp, Stop-CIVM, Stop-CIVMGuest, Stop-CIVAppGuest, Restart-CIVM, Restart-CIVApp, New-CIVAppTemplate, Set-CIVAppTemplate, Start-CIVApp, Start-CIVM, Remove-CIVAppTemplate, Get-CIDatastore, Add-CIDatastore, New-Org, Set-Org, Remove-Org, New-Catalog, Set-Catalog, Remove-Catalog, Get-CatalogItem, New-ExternalNetwork, Set-ExternalNetwork, Remove-ExternalNetwork, Remove-OrgVdc, Get-CIAccessControlRule, New-CIAccessControlRule, New-OrgVdc, Set-OrgVdc, Get-CIVAppStartRule, Get-NetworkPool, Get-CINetworkAdapter, Set-CINetworkAdapter, Get-CIVAppNetwork, New-CIVApp, Set-CIVApp, Remove-CIVApp, Suspend-CIVApp, Suspend-VM, New-OrgNetwork, Remove-OrgNetwork, Set-OrgNetwork, New-CIVAppNetwork, Set-CIVAppNetwork, Remove-CIVAppNetwork
Extends
VIConnection, ExtendedObject

Properties

Name | Type | Notes
Org | Org |
RefCount | Int32 |
Version | string |
Properties inherited from ExtendedObject
ExtensionData
Properties inherited from VIConnection
Id, Name, Uid, ServiceUri, SessionSecret, User, IsConnected


CIUser

CIUser - Object

Property of
Media, Catalog, CIVAppTemplate, CIVApp
Parameter to
Get-CIVApp, Get-Media, Get-CIVAppTemplate, Get-CIRole, Set-CIVApp
Extends
CIObject

Properties

Name | Type | Notes
FullName | string |
Enabled | bool |
DeployedVMCount | int |
DeployedVMQuota | int |
StoredVMCount | int |
StoredVMQuota | int |
IsLdapUser | bool |
Email | string |
Phone | string |
IM | string |
Locked | bool |
LdapName | string |
External | bool |
UseGroupRole | bool |
Org | Org |
Properties inherited from CIObject
Id, Description, Name, Href, ExtensionData, Client, Uid


CIVApp

CIVApp - Object

Property of
CIVAppNetwork, CIVAppStartRule, CIVM
Parameter to
Get-CIVM, Import-CIVApp, Restart-CIVAppGuest, Stop-CIVApp, Stop-CIVAppGuest, Restart-CIVApp, New-CIVAppTemplate, Start-CIVApp, Get-CIVAppStartRule, Get-CIVAppNetwork, New-CIVApp, Set-CIVApp, Remove-CIVApp, Suspend-CIVApp, New-CIVAppNetwork
Returned by
Restart-CIVAppGuest, Start-CIVApp, Restart-CIVApp, New-CIVApp, Set-CIVApp, Stop-CIVAppGuest, Stop-CIVApp, Suspend-CIVApp
Extends
CIObject, AccessControlledEntity

Properties

Name | Type | Notes
Enabled | bool |
Status | CIVAppStatus |
SizeGB | Decimal |
CpuCount | double |
MemoryAllocationMB | double |
InMaintenanceMode | bool |
Owner | CIUser |
Org | Org |
Shared | bool |
MemoryAllocationGB | Decimal |
StorageLease | TimeSpan? |
RuntimeLease | TimeSpan? |
Properties inherited from CIObject
Id, Description, Name, Href, ExtensionData, Client, Uid


CIVAppNetwork

CIVAppNetwork - Object

Property of
CINetworkAdapter
Parameter to
Get-CINetworkAdapter, Set-CINetworkAdapter, Set-CIVAppNetwork, Remove-CIVAppNetwork
Returned by
Get-CIVAppNetwork
Extends
CIObject

Properties

Name | Type | Notes
Netmask | IPAddress |
Gateway | IPAddress |
PrimaryDns | IPAddress |
SecondaryDns | IPAddress |
DnsSuffix | string |
ParentOrgNetwork | OrgNetwork |
VApp | CIVApp |
ConnectionType | CIVAppNetworkConnectionType |
NatEnabled | bool |
FirewallEnabled | bool |
StaticIPPool | IPRangeList |
Properties inherited from CIObject
Id, Description, Name, Href, ExtensionData, Client, Uid


CIVAppNetworkConnectionType

CIVAppNetworkConnectionType - Enum

Property of
CIVAppNetwork
Parameter to
Get-CIVAppNetwork

Enum Constants

Name
Direct
Routed
Isolated
DirectFenced


CIVAppStartRule

CIVAppStartRule - Object

Parameter to
Set-CIVAppStartRule
Returned by
Get-CIVAppStartRule
Extends
CIObjectCore

Properties

Name | Type | Notes
VM | CIVM |
Group | ushort |
StartAction | CIVMStartAction |
StartDelaySeconds | ushort |
StopAction | CIVMStopAction |
StopDelaySeconds | ushort |
VApp | CIVApp |
Properties inherited from CIObjectCore
Uid, Client


CIVAppStatus

CIVAppStatus - Enum

Property of
CIVM, CIVAppTemplate, CIVApp
Parameter to
Get-CIVApp, Get-CIVM

Enum Constants

Name
FailedCreation
Unresolved
Resolved
Deployed
Suspended
PoweredOn
WaitingForUserInput
Unknown
Unrecognized
PoweredOff
Inconsistent
ChildrenWithDifferentStatus
OvfDescriptorPending
CopyingContents
DiskContentsPending
UploadGuaranteed
UploadQuarantineExpired


CIVAppTemplate

CIVAppTemplate - Object

Parameter to
Import-CIVAppTemplate, Set-CIVAppTemplate, Remove-CIVAppTemplate, New-CIVApp
Returned by
New-CIVAppTemplate
Extends
CatalogItem

Properties

Name | Type | Notes
Status | CIVAppStatus |
Created | DateTime |
Owner | CIUser |
IsGoldMaster | bool |
StorageUsedGB | Decimal |
OrgVdc | OrgVdc |
Published | bool |
StorageLease | TimeSpan? |
CustomizeOnInstantiate | bool |
Properties inherited from CatalogItem
Id, Description, Name, Href, Catalog, ExtensionData


CIViewLevel

CIViewLevel - Enum

Parameter to
Get-CIView

Enum Constants

Name
User
Admin
Extension


CIVirtualCenterServer

CIVirtualCenterServer - Object

Property of
CIPortGroupReference
Extends
CIObject

Properties

Name | Type | Notes
Url | string |
UserName | string |
Enabled | bool |
Version | string |
Status | string |
VShieldManagerHost | string |
Busy | bool |
Uuid | string |
Properties inherited from CIObject
Id, Description, Name, Href, ExtensionData, Client, Uid


CIVM

CIVM - Object

Property of
CIVAppStartRule, CINetworkAdapter
Parameter to
Get-OrgNetwork, Restart-CIVMGuest, Stop-CIVM, Stop-CIVMGuest, Restart-CIVM, Start-CIVM, Get-CIVAppStartRule, Get-CINetworkAdapter, Suspend-VM
Returned by
Stop-CIVMGuest, Suspend-VM, Start-CIVM, Restart-CIVMGuest, Restart-CIVM, Stop-CIVM
Extends
CIObject, VmRelatedObject

Properties

Name | Type | Notes
Status | CIVAppStatus |
Deleted | bool |
GuestOSFullName | string |
CpuCount | int |
MemoryMB | Decimal |
VMVersion | VMware.VimAutomation.ViCore.Types.V1.VM.VMVersion |
OrgVdc | OrgVdc |
VApp | CIVApp |
MemoryGB | Decimal |
Org | Org |
Properties inherited from CIObject
Id, Description, Name, Href, ExtensionData, Client, Uid


CIVMStartAction

CIVMStartAction - Enum

Property of
CIVAppStartRule
Parameter to
Set-CIVAppStartRule

Enum Constants

Name
None
PowerOn


CIVMStopAction

CIVMStopAction - Enum

Property of
CIVAppStartRule
Parameter to
Set-CIVAppStartRule

Enum Constants

Name
PowerOff
ShutDown


CIVSphereObjectReference

CIVSphereObjectReference - Object

Extended by
CIPortGroupReference
Extends
CIObjectCore

Properties

Name | Type | Notes
VSphereMoRef | string |
VCenterServer | CloudVirtualCenterServer |
Properties inherited from CIObjectCore
Uid, Client


Cluster

Cluster - Object

Property of
DrsRecommendation, DrsVMAntiAffinityRule, DrsRule, DrsVMHostAffinityRule, DrsVMAffinityRule
Parameter to
Get-Datacenter, Set-Cluster, Get-DrsRecommendation, Remove-Cluster, Get-DrsRule, Move-Cluster, New-DrsRule, Get-HAPrimaryVMHost
Returned by
New-Cluster, Move-Cluster, Set-Cluster, Get-Cluster
Extends
VIContainer, VIObject, ExtensionData

Properties

Name | Type | Notes
ParentId | String |
ParentFolder | Folder |
HAEnabled | Boolean |
HAAdmissionControlEnabled | Boolean |
HAFailoverLevel | Int32 |
HARestartPriority | HARestartPriority? |
HAIsolationResponse | HAIsolationResponse? |
VMSwapfilePolicy | VMSwapfilePolicy? |
DrsEnabled | Boolean |
DrsMode | DrsMode | Deprecated. As of PowerCLI 5.0 use DrsAutomationLevel instead.
DrsAutomationLevel | DrsAutomationLevel |
HATotalSlots | Int |
HAUsedSlots | Int |
HAAvailableSlots | Int |
HASlotCpuMHz | Int |
HASlotMemoryMb | Int |
HASlotNumVCpus | Int |
HASlotMemoryGB | Decimal |
VsanEnabled | Boolean |
VsanDiskClaimMode | VsanDiskClaimMode |
Properties inherited from VIContainer
CustomFields, ExtensionData, Id, Name, Uid, Client


CompareProfiles

CompareProfiles - Object

Properties

Name | Type
ReferenceProfile | ImageProfile
ComparisonProfile | ImageProfile
ParameterSetName | String
MyInvocation | InvocationInfo
InvokeCommand | CommandInvocationIntrinsics
Host | PSHost
SessionState | SessionState
Events | PSEventManager
JobRepository | JobRepository
InvokeProvider | ProviderIntrinsics
Stopping | Boolean
CommandRuntime | ICommandRuntime
CurrentPSTransaction | PSTransactionContext
CommandOrigin | CommandOrigin
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


ConfigManager

ConfigManager - Object

Property of
IfServer

Properties

Name Type
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


ConfigurationScope

ConfigurationScope - Enum

Property of
PowerCLIConfiguration
Parameter to
Get-PowerCLIConfiguration, Set-PowerCLIConfiguration

Enum Constants

Name
Session
User
AllUsers


ConnectInfo

ConnectInfo - Object

Property of
ScsiController, FloppyDrive, CDDrive, NetworkAdapter, HardDisk, UsbDevice, RawHardDisk, VirtualDevice, FlatHardDisk

Properties

Name | Type | Notes
AllowGuestControl | Boolean? |
Connected | Boolean? |
StartConnected | Boolean? |

Methods

Methods defined in this object
ToString()

ToString()

Returns the comma-separated values of the 3 properties: AllowGuestControl, Connected, and StartConnected in the following format: "Connected, GuestControl, StartConnected". For negative values: "NotConnected, NoGuestControl, NoStartConnected".
Syntax
String ToString()()
Return value
String

Parameters

Name Type Description
none


Counter

Counter - Object

Returned by
Get-Esxtop
Extends

Properties

Name | Type | Notes
Server | VIServer |
Name | String |
Uid | String |
Fields | CounterInfoField[] |


CounterInfoField

CounterInfoField - Object

Property of
Counter

Properties

Name | Type | Notes
Name | String |
Type | String |


CounterValue

CounterValue - Object

Returned by
Get-Esxtop
Extends
DynamicData

Properties

Name | Type | Notes
Server | VIServer |
Counter | String |


CpuAffinity

CpuAffinity - Enum

Property of
VMResourceConfiguration
Parameter to
Set-VMResourceConfiguration

Enum Constants

Name
NoAffinity
Cpu0
Cpu1
Cpu2
Cpu3
Cpu4
Cpu5
Cpu6
Cpu7
Cpu8
Cpu9
Cpu10
Cpu11
Cpu12
Cpu13
Cpu14
Cpu15
Cpu16
Cpu17
Cpu18
Cpu19
Cpu20
Cpu21
Cpu22
Cpu23
Cpu24
Cpu25
Cpu26
Cpu27
Cpu28
Cpu29
Cpu30
Cpu31
Cpu32
Cpu33
Cpu34
Cpu35
Cpu36
Cpu37
Cpu38
Cpu39
Cpu40
Cpu41
Cpu42
Cpu43
Cpu44
Cpu45
Cpu46
Cpu47
Cpu48
Cpu49
Cpu50
Cpu51
Cpu52
Cpu53
Cpu54
Cpu55
Cpu56
Cpu57
Cpu58
Cpu59
Cpu60
Cpu61
Cpu62
Cpu63


CustomAttribute

CustomAttribute - Object

Parameter to
Remove-CustomAttribute, Set-Annotation, Set-CustomAttribute, Get-Annotation
Returned by
New-CustomAttribute, Set-CustomAttribute, Get-CustomAttribute

Properties

Name | Type | Notes
ServerId | String |
Server | VIServer |
Key | Int32 |
Name | String |
TargetType | CustomAttributeTargetType? |
Uid | String |


CustomAttributeTargetType

CustomAttributeTargetType - Enum

Property of
CustomAttribute
Parameter to
Get-CustomAttribute, New-CustomAttribute

Enum Constants

Name
VirtualMachine
ResourcePool
Folder
VMHost
Cluster
Datacenter


Datacenter

Datacenter - Object

Property of
VmfsDatastore, Datastore, DistributedPortGroup, DistributedSwitch, NasDatastore
Parameter to
Remove-Datacenter, Move-Datacenter, Get-VirtualSwitch, Get-VirtualPortGroup, Set-Datacenter
Returned by
Set-Datacenter, Move-Datacenter, Get-Datacenter, New-Datacenter
Extends
FolderContainer, VIObject, ExtensionData, DatastoreRelatedObjectBase

Properties

Name | Type | Notes
ParentFolderId | String |
ParentFolder | Folder |
Properties inherited from FolderContainer
CustomFields, ExtensionData, Id, Name, Uid, Client


Datastore

Datastore - Object

Property of
DatastoreVMDiskFile, VMHost, DatastoreItem, DatastoreFolder, DatastoreFile
Parameter to
Remove-Datastore, Set-HardDisk, Get-HardDisk, Set-VMHost, Set-Datastore, New-VApp, Get-DatastoreCluster, Move-Datastore, Move-HardDisk
Returned by
New-Datastore, Move-Datastore, Get-Datastore, Set-Datastore
Extended by
VmfsDatastore, NasDatastore
Extends
StorageResource, ExtensionData

Properties

Name | Type | Notes
DatacenterId | String |
Datacenter | Datacenter |
ParentFolderId | String |
ParentFolder | Folder |
DatastoreBrowserPath | String |
FreeSpaceMB | Decimal |
CapacityMB | Decimal |
Accessible | Boolean | Deprecated. 'Accessible' property is obsolete. Use 'State' instead.
Type | String |
StorageIOControlEnabled | bool |
CongestionThresholdMillisecond | Int? |
State | DatastoreState |
Properties inherited from StorageResource
Id, Name, Uid, CapacityGB, FreeSpaceGB, Client
Properties inherited from ExtensionData
ExtensionData


DatastoreCluster

DatastoreCluster - Object

Property of
SdrsRecommendation
Parameter to
Get-DrsRecommendation, Remove-DatastoreCluster, Set-DatastoreCluster
Returned by
Get-DatastoreCluster, Set-DatastoreCluster, New-DatastoreCluster
Extends
StorageResource, ExtensionData, DatastoreRelatedObjectBase

Properties

Name | Type | Notes
SdrsAutomationLevel | DrsAutomationLevel |
IOLoadBalanceEnabled | Boolean |
IOLatencyThresholdMillisecond | Int? |
SpaceUtilizationThresholdPercent | Int? |
Properties inherited from StorageResource
Name, Id, Uid, CapacityGB, FreeSpaceGB, Client
Properties inherited from ExtensionData
ExtensionData


DatastoreFile

DatastoreFile - Object

Extended by
DatastoreVMDiskFile
Extends
DatastoreItem

Properties

Name | Type | Notes
Length | Long? |
Properties inherited from DatastoreItem
DatastoreId, Datastore, Name, FolderPath, DatastoreFullPath, FullName, ItemType, LastWriteTime, Uid


DatastoreFolder

DatastoreFolder - Object

Extends
DatastoreItem

Properties

Name Type Notes
Properties inherited from DatastoreItem
DatastoreId, Datastore, Name, FolderPath, DatastoreFullPath, FullName, ItemType, LastWriteTime, Uid


DatastoreItem

DatastoreItem - Object

Parameter to
Get-HardDisk
Returned by
Copy-DatastoreItem
Extended by
DatastoreFolder, DatastoreFile

Properties

Name | Type | Notes
DatastoreId | String |
Datastore | Datastore |
Name | String |
FolderPath | String |
DatastoreFullPath | String |
FullName | String |
ItemType | DatastoreItemType |
LastWriteTime | DateTime? |
Uid | String |


DatastoreItemType

DatastoreItemType - Enum

Property of
DatastoreVMDiskFile, DatastoreItem, DatastoreFolder, DatastoreFile

Enum Constants

Name
File
Folder
FloppyImageFile
IsoImageFile
VmConfigFile
VmDiskFile
VmLogFile
VmNvramFile
VmSnapshotFile
HiddenFile


DatastoreRelatedObject

DatastoreRelatedObject - Object

Extends
DatastoreRelatedObjectBase

Properties

Name Type Notes

Methods

Methods defined in this object
ToDatastore

ToDatastore

Converts the specified object to zero, one or more Datastore objects.
Syntax
IEnumerable<Datastore> ToDatastore()
Return value
IEnumerable

Parameters

Name Type Description
none


DatastoreRelatedObjectBase

DatastoreRelatedObjectBase - Object

Parameter to
Get-Datastore
Extended by
DatastoreRelatedObject

Properties

Name Type Notes


DatastoreState

DatastoreState - Enum

Property of
VmfsDatastore, Datastore, NasDatastore

Enum Constants

Name
Available
Maintenance
EnteringMaintenance
Unavailable


DatastoreUser

DatastoreUser - Object

Properties

Name | Type | Notes
DatastoreIdList | String[] |


DatastoreVMDiskFile

DatastoreVMDiskFile - Object

Extends
DatastoreFile, VIObjectCore

Properties

Name | Type | Notes
CapacityKb | Int64? |
ControllerType | String |
DiskType | DiskType |
DiskExtents | String[] |
Properties inherited from DatastoreFile
Length, DatastoreId, Name, FolderPath, DatastoreFullPath, FullName, ItemType, LastWriteTime, Uid, Datastore


DefaultVIServerMode

DefaultVIServerMode - Enum

Property of
PowerCLIConfiguration
Parameter to
Set-PowerCLIConfiguration

Enum Constants

Name
Single
Multiple


DeployRule

DeployRule - Object

Property of
DeployRuleSet

Properties

Name | Type
Name | String
Editable | Boolean
ItemList | Object[]
PatternList | String[]
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


DeployRuleSet

DeployRuleSet - Object

Property of
DeployRuleSet

Properties

Name | Type
Parent | DeployRuleSet
RuleList | DeployRule
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


DepotManager

DepotManager - Object

Property of
IfServer

Properties

Name | Type
configuredDepot | DepotManagerDepotSpec[]
configuredChannel | DepotManagerChannelSpec[]
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


Description

Description - Object

Property of
LogDescriptor

Properties

Name | Type | Notes
Label | String |
Summary | String |


DhcpPolicy

DhcpPolicy - Enum

Property of
VMGuestNetworkInterface
Parameter to
Set-VMGuestNetworkInterface

Enum Constants

Name
Static
Dhcp
Unknown


DiagnosticBundle

DiagnosticBundle - Object

Properties

Name | Type | Notes
Url | String |
Host | VMHost |
Data | FileInfo |


DiskInfo

DiskInfo - Object

Property of
VMGuest

Properties

Name | Type | Notes
Path | String |
Capacity | Int64 |
FreeSpace | Int64 |
CapacityGB | Decimal |
FreeSpaceGB | Decimal |


DiskType

DiskType - Enum

Property of
DatastoreVMDiskFile, HardDisk, RawHardDisk, FlatHardDisk
Parameter to
Get-HardDisk, New-HardDisk

Enum Constants

Name
RawVirtual
RawPhysical
Flat
Unknown


DistributedPortGroup

DistributedPortGroup - Object

Parameter to
Set-VMHostNetworkAdapter
Extends
VirtualPortGroupBase

Properties

Name | Type | Notes
Notes | String |
Datacenter | Datacenter |
PortBinding | DistributedPortGroupPortBinding |
NumPorts | Int32 |
Id | String |
Uid | String |
Properties inherited from VirtualPortGroupBase
Name, VirtualSwitch, ExtensionData, Key


DistributedPortgroupPortBinding

DistributedPortgroupPortBinding - Enum

Property of
VDPortgroup, VmwareVDPortgroup
Parameter to
New-VDPortgroup, Set-VDPortgroup

Enum Constants

Name
Static
Dynamic
Ephemeral


DistributedSwitch

DistributedSwitch - Object

Parameter to
Add-VDSwitchPhysicalNetworkAdapter

Properties

Name Type Notes


DomainMembershipStatus

DomainMembershipStatus - Enum

Property of
VMHostAuthentication

Enum Constants

Name
ClientTrustBroken
InconsistentTrust
NoServers
Ok
OtherProblem
ServerTrustBroken
Unknown


DrsAutomationLevel

DrsAutomationLevel - Enum

Property of
DatastoreCluster, VirtualMachine, Cluster
Parameter to
Set-Cluster, Set-VM, New-VM, New-Cluster, Set-DatastoreCluster

Enum Constants

Name
FullyAutomated
Manual
PartiallyAutomated
AsSpecifiedByCluster
Disabled


DrsMode

DrsMode - Enum

Property of
Cluster
Parameter to
Set-Cluster, New-Cluster

Enum Constants

Name
FullyAutomated
Manual
PartiallyAutomated


DrsRecommendation

DrsRecommendation - Object

Returned by
Get-DrsRecommendation
Extends
ExtensionData, ResourceSchedulingRecommendation

Properties

Name | Type | Notes
ClusterId | String | Deprecated. Use &quot;Cluster.Id&quot; instead.
Cluster | Cluster |
TargetId | String | Deprecated. Use &quot;Target.Id&quot; instead.
Uid | String |
Properties inherited from ResourceSchedulingRecommendation
Key, Priority, Recommendation, Reason, Target
Properties inherited from ExtensionData
ExtensionData


DrsRule

DrsRule - Object

Returned by
Get-DrsRule
Extends
ResourceSchedulingRule

Properties

Name | Type | Notes
Cluster | Cluster |
Uid | String |
ClusterId | string | Deprecated. Use Cluster.Id instead
ClusterUid | string | Deprecated. Use Cluster.Uid instead
Key | int |
Properties inherited from ResourceSchedulingRule
Name, Enabled, Type, ExtensionData, Mandatory


DrsVMAffinityRule

DrsVMAffinityRule - Object

Parameter to
Remove-DrsRule, Set-DrsRule
Returned by
New-DrsRule, Set-DrsRule
Extends
ExtensionData, DrsRule

Properties

Name | Type | Notes
KeepTogether | Boolean | Deprecated. This field is obsolete. Specify Type instead.
VMIds | String[] |
Properties inherited from DrsRule
Name, Enabled, ClusterId, Cluster, ClusterUid, Uid, Type, Mandatory, Key
Properties inherited from ExtensionData
ExtensionData


DrsVMAntiAffinityRule

DrsVMAntiAffinityRule - Object

Extends
ExtensionData, DrsRule

Properties

Name | Type | Notes
VMIds | String[] |
KeepTogether | Boolean | Deprecated. This field is obsolete. Specify Type instead.
Properties inherited from DrsRule
Name, Enabled, Cluster, Uid, Type, ClusterId, ClusterUid, Mandatory, Key
Properties inherited from ExtensionData
ExtensionData


DrsVMHostAffinityRule

DrsVMHostAffinityRule - Object

Extends
ExtensionData, DrsRule

Properties

Name | Type | Notes
VMIds | String[] |
AffineHostIds | String[] |
AntiAffineHostIds | String[] |
Properties inherited from DrsRule
Name, Enabled, Cluster, Uid, Mandatory, Type, ClusterId, ClusterUid, Key
Properties inherited from ExtensionData
ExtensionData


DynamicData

DynamicData - Object

Property of
TopologyInfo
Extended by
CounterValue

Properties

Name Type Notes


DynamicManagedObject

DynamicManagedObject - Object

Extended by
DynamicTypeManager

Properties

Name | Type | Notes
Id | String |
Uid | String |

Methods

Methods defined in this object
InvokeOperation

InvokeOperation

Invokes a method of an ESXCLI's application. The result is either a primitive type or a dictionary that maps a complex return type.
Syntax
Object InvokeOperation(String name, IDictionary parameters)
Return value
Object

Parameters

Name | Type | Description
name | String | The name of the method to invoke.
parameters | IDictionary | The parameters names/values.


DynamicTypeManager

DynamicTypeManager - Object

Property of
EsxCli
Extends
DynamicManagedObject

Properties

Name Type Notes
Properties inherited from DynamicManagedObject
Id, Uid

Methods

Methods defined in this object
QueryMoInstances, QueryTypeInfo, CreateDynamicManagedObject, InvokeOperation

QueryMoInstances

Retrieves information about the available ESXCLI namespaces/applications. You can use the returned IDs to create DynamicManagedObjects and to invoke methods.
Syntax
MoInstanceDescriptor QueryMoInstances()
Return value
MoInstanceDescriptor

Parameters

Name | Type | Description
id | String | optional; pass null to retrieve all MoInstanceDescriptors

QueryTypeInfo

Retrieves metadata information about the managed and data types available in ESXCLI. Keys are member names, and values are member values.
Syntax
IDictionary<string, object> QueryTypeInfo()
Return value
IDictionary

Parameters

Name | Type | Description
typeSubstring | String | optional; pass null to retrieve the info for all types

CreateDynamicManagedObject

Creates a DynamicManagedObject by initializing it's id. No server communication is involved. This object can be used to invoke operations.
Syntax
DynamicManagedObject CreateDynamicManagedObject()
Return value
DynamicManagedObject

Parameters

Name | Type | Description
Id | String | The ID of the managed object. You can obtain it by using the QueryMoInstances method.

InvokeOperation

Invokes a method of an ESXCLI's application. The result is either a primitive type or a dictionary that maps a complex return type.
Syntax
Object InvokeOperation(String name, IDictionary parameters)
Return value
Object

Parameters

Name | Type | Description
name | String | The name of the method to invoke.
parameters | IDictionary | The parameters names/values.


EmailAction

EmailAction - Object

Extends
AlarmAction

Properties

Name | Type | Notes
Body | String |
Cc | String[] |
To | String[] |
Subject | String |
Properties inherited from AlarmAction
ActionType, AlarmDefinition, Trigger, Uid


EntityLicenseData

EntityLicenseData - Object

Properties

Name | Type | Notes
Entity | ManagedObjectReference |
LicenseData | LicenseData |


EsxCli

EsxCli - Object

Returned by
Get-EsxCli

Properties

Name | Type | Notes
Uid | String |
VMHost | VMHost |
TypeManager | DynamicTypeManager |


EsxCliElement

EsxCliElement - Object

Properties

Name | Type | Notes
Id | String |
Name | String |
FullName | String |
Uid | String |

Methods

Methods defined in this object
help, help

help

Retrieves help information for the specified method.
Syntax
EsxCliMethodHelp help()
Return value
EsxCliMethodHelp

Parameters

Name | Type | Description
methodName | String | The name of the application's method for which to retrieve help information.

help

Retrieves help information for the ESXCLI namespace/application.
Syntax
EsxCliHelp help()
Return value
EsxCliHelp

Parameters

Name Type Description
none


EsxCliHelp

EsxCliHelp - Object

Property of
EsxCliHelp

Properties

Name | Type | Notes
DisplayName | String |
FullDisplayName | String |
Name | String |
Help | String |
ChildElement | EsxCliHelp[] |
Method | EsxCliMethodHelp[] |


EsxCliMethodHelp

EsxCliMethodHelp - Object

Property of
EsxCliHelp

Properties

Name | Type | Notes
DisplayName | String |
FullDisplayName | String |
Name | String |
Help | String |
Ret | EsxCliParameterHelp |
Param | EsxCliParameterHelp[] |
Hints | IDictionary |


EsxCliObject

EsxCliObject - Object

Extends

Properties

Name Type Notes


EsxCliParameterHelp

EsxCliParameterHelp - Object

Property of
EsxCliMethodHelp

Properties

Name | Type | Notes
DisplayName | String |
MethodFullDisplayName | String |
Name | String |
Help | String |
Constraint | String[] |
Default | String |
Aliases | String[] |


EventCategory

EventCategory - Enum

Parameter to
Get-VIEvent

Enum Constants

Name
Error
Info
Warning


ExportProfile

ExportProfile - Object

Properties

Name | Type
ImageProfile | ImageProfile
FilePath | String
ExportToIso | SwitchParameter
ExportToBundle | SwitchParameter
Force | SwitchParameter
NoSignatureCheck | SwitchParameter
RunAsync | SwitchParameter
ParameterSetName | String
MyInvocation | InvocationInfo
InvokeCommand | CommandInvocationIntrinsics
Host | PSHost
SessionState | SessionState
Events | PSEventManager
JobRepository | JobRepository
InvokeProvider | ProviderIntrinsics
Stopping | Boolean
CommandRuntime | ICommandRuntime
CurrentPSTransaction | PSTransactionContext
CommandOrigin | CommandOrigin
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


ExtendedObject

ExtendedObject - Object

Extended by
CINetworkAdapter

Properties

Name | Type | Notes
ExtensionData | object |


ExtensionData

ExtensionData - Object

Extends

Properties

Name | Type | Notes
ExtensionData | object |


ExternalNetwork

ExternalNetwork - Object

Property of
OrgNetwork
Parameter to
Get-ProviderVdc, Get-OrgNetwork, Set-ExternalNetwork, Remove-ExternalNetwork, New-OrgNetwork
Returned by
Set-ExternalNetwork, New-ExternalNetwork, Get-ExternalNetwork
Extends
CIObject, VirtualPortGroupRelatedObject, VDPortgroupRelatedObject

Properties

Name | Type | Notes
VlanId | int? |
Gateway | IPAddress |
PrimaryDns | IPAddress |
SecondaryDns | IPAddress |
UsedIpCount | int? |
TotalIpCount | int? |
Netmask | string |
DnsSuffix | string |
StaticIPPool | IPRangeList |
Properties inherited from CIObject
Id, Description, Name, Href, ExtensionData, Client, Uid


FibreChannelHba

FibreChannelHba - Object

Extends
Hba

Properties

Name | Type | Notes
NodeWorldWideName | Int64 |
PortType | FibreChannelPortType |
PortWorldWideName | Int64 |
Speed | Int64 |
Properties inherited from Hba
Device, Key, Model, Pci, Driver, Bus, VMHostId, VMHost, Status, Type, Uid, Name, ExtensionData, ScsiLunUids


FibreChannelPortType

FibreChannelPortType - Enum

Property of
FibreChannelHba

Enum Constants

Name
Fabric
Loop
PointToPoint
Unknown


FlatHardDisk

FlatHardDisk - Object

Extends
HardDisk

Properties

Name | Type | Notes
StorageFormat | VirtualDiskStorageFormat |
Properties inherited from HardDisk
Persistence, DiskType, Filename, CapacityKB, ParentId, ConnectionState, Id, Name, Uid, ExtensionData, Parent, CapacityGB, Client


FloatSample

FloatSample - Object

Returned by
Get-Stat
Extends
Sample

Properties

Name | Type | Notes
Value | Single |
Properties inherited from Sample
Timestamp, MetricId, Unit, Description, Entity, EntityId, IntervalSecs, Instance


FloppyDrive

FloppyDrive - Object

Property of
VirtualMachine
Parameter to
Remove-FloppyDrive, Set-FloppyDrive
Returned by
Get-FloppyDrive, Set-FloppyDrive, New-FloppyDrive
Extends
VirtualDevice

Properties

Name | Type | Notes
FloppyImagePath | String |
HostDevice | String |
RemoteDevice | String |
Properties inherited from VirtualDevice
ParentId, ConnectionState, Id, Name, Uid, ExtensionData, Parent, Client


Folder

Folder - Object

Property of
VmfsDatastore, Datastore, VirtualMachine, Cluster, Datacenter, NasDatastore
Parameter to
Remove-Folder, New-VM, Move-Folder, Set-Folder
Returned by
Get-Folder, New-Folder, Set-Folder, Move-Folder
Extends
FolderContainer, VIObject, ExtensionData, DatastoreRelatedObjectBase

Properties

Name | Type | Notes
ParentId | String |
Parent | InventoryItem |
IsChildTypeVm | Boolean | Deprecated. As of PowerCLI 5.0 use Type property instead.
IsChildTypeComputeResource | Boolean | Deprecated. As of PowerCLI 5.0 use Type property instead.
IsChildTypeDatacenter | Boolean | Deprecated. As of PowerCLI 5.0 use Type property instead.
IsChildTypeDatastore | Boolean | Deprecated. As of PowerCLI 5.0 use Type property instead.
Type | FolderType |
Properties inherited from FolderContainer
CustomFields, ExtensionData, Id, Name, Uid, Client


FolderContainer

FolderContainer - Object

Extended by
Folder, Datacenter
Extends
VIContainer

Properties

Name Type Notes
Properties inherited from VIContainer
CustomFields, Id, Name, Uid, ExtensionData, Client


FolderType

FolderType - Enum

Property of
Folder
Parameter to
Get-Folder

Enum Constants

Name
VM
HostAndCluster
Datastore
Network
Datacenter


GetChannels

GetChannels - Object

Properties

Name | Type
SoftwareDepot | SoftwareDepot[]
ParameterSetName | String
MyInvocation | InvocationInfo
InvokeCommand | CommandInvocationIntrinsics
Host | PSHost
SessionState | SessionState
Events | PSEventManager
JobRepository | JobRepository
InvokeProvider | ProviderIntrinsics
Stopping | Boolean
CommandRuntime | ICommandRuntime
CurrentPSTransaction | PSTransactionContext
CommandOrigin | CommandOrigin
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


GetPackages

GetPackages - Object

Properties

Name | Type
SoftwareChannel | SoftwareChannel[]
Name | String[]
Version | String[]
Vendor | String[]
AcceptanceLevel | AcceptanceLevels[]
CreatedBefore | DateTime
CreatedAfter | DateTime
Newest | SwitchParameter
ParameterSetName | String
MyInvocation | InvocationInfo
InvokeCommand | CommandInvocationIntrinsics
Host | PSHost
SessionState | SessionState
Events | PSEventManager
JobRepository | JobRepository
InvokeProvider | ProviderIntrinsics
Stopping | Boolean
CommandRuntime | ICommandRuntime
CurrentPSTransaction | PSTransactionContext
CommandOrigin | CommandOrigin
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


GetProfiles

GetProfiles - Object

Properties

Name | Type
SoftwareChannel | SoftwareChannel[]
Name | String[]
Vendor | String[]
AcceptanceLevel | AcceptanceLevels[]
ParameterSetName | String
MyInvocation | InvocationInfo
InvokeCommand | CommandInvocationIntrinsics
Host | PSHost
SessionState | SessionState
Events | PSEventManager
JobRepository | JobRepository
InvokeProvider | ProviderIntrinsics
Stopping | Boolean
CommandRuntime | ICommandRuntime
CurrentPSTransaction | PSTransactionContext
CommandOrigin | CommandOrigin
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


GuestState

GuestState - Enum

Property of
VMGuest

Enum Constants

Name
NotRunning
Resetting
Running
ShuttingDown
Standby
Unknown


HAIsolationResponse

HAIsolationResponse - Enum

Property of
VirtualMachine, Cluster
Parameter to
Set-Cluster, Set-VM, New-VM, New-Cluster

Enum Constants

Name
AsSpecifiedByCluster
PowerOff
DoNothing
Shutdown


HardDisk

HardDisk - Object

Property of
VirtualMachine
Parameter to
Copy-HardDisk, Set-HardDisk, Set-VMResourceConfiguration, Remove-HardDisk, Get-ScsiController, New-ScsiController, Move-HardDisk
Returned by
Get-HardDisk, Move-HardDisk, Set-HardDisk, Copy-HardDisk, New-HardDisk
Extended by
RawHardDisk, FlatHardDisk
Extends
VirtualDevice

Properties

Name | Type | Notes
Persistence | PersistencePolicy |
DiskType | DiskType |
Filename | String |
CapacityKB | Int64 |
CapacityGB | Decimal |
Properties inherited from VirtualDevice
ExtensionData, ParentId, ConnectionState, Id, Name, Uid, Parent, Client


HARestartPriority

HARestartPriority - Enum

Property of
VirtualMachine, Cluster
Parameter to
Set-Cluster, Set-VM, New-VM, New-Cluster

Enum Constants

Name
Disabled
Low
Medium
High
ClusterRestartPriority


Hba

Hba - Object

Parameter to
Get-ScsiLun
Returned by
Get-VMHostHba
Extended by
FibreChannelHba, IScsiHba
Extends
ExtensionData

Properties

Name | Type | Notes
Device | String |
Key | String |
Model | String |
Pci | String |
Driver | String |
Bus | Int32 |
VMHostId | String |
VMHost | VMHost |
Status | String |
Type | HbaType |
Uid | String |
Name | String |
ScsiLunUids | string[] |
Properties inherited from ExtensionData
ExtensionData


HbaType

HbaType - Enum

Property of
FibreChannelHba, Hba, IScsiHba
Parameter to
Get-VMHostHba

Enum Constants

Name
Block
FibreChannel
IScsi
ParallelScsi


HostAccount

HostAccount - Object

Parameter to
Remove-VMHostAccount
Returned by
Get-VMHostAccount
Extended by
HostUserAccount, HostGroupAccount
Extends
VIAccount

Notes

Deprecated. The type will be renamed to VMHostAccount in a future release.

Properties

Name | Type | Notes
ServerId | String | Deprecated. As of PowerCLI 5.0 use Server property instead.
Properties inherited from VIAccount
ExtensionData, Id, Uid, Name, Server, Domain, Description


HostConsoleVirtualNic

HostConsoleVirtualNic - Object

Extends
HostVirtualNic, ExtensionData

Properties

Name | Type | Notes
IPv6 | IPv6Address[] |
AutomaticIPv6 | Boolean? |
IPv6ThroughDhcp | Boolean? |
IPv6Enabled | Boolean? |
Properties inherited from HostVirtualNic
PortGroupName, Id, VMHostId, VMHost, VMHostUid, DeviceName, Mac, DhcpEnabled, IP, SubnetMask, Name, ExtensionData, Uid


HostFileSystemVolumeInfo

HostFileSystemVolumeInfo - Object

Property of
VMHostStorageInfo

Properties

Name | Type | Notes
AccessMode | String |
Path | String |
Capacity | Int64 |
Name | String |
Type | String |
CapacityGB | Decimal |


HostFirmware

HostFirmware - Object

Returned by
Get-VMHostFirmware, Set-VMHostFirmware
Extends
ExtensionData

Properties

Name | Type | Notes
UploadUrl | String |
Host | VMHost | Deprecated. As of PowerCLI 5.0 use VMHost property instead.
VMHost | VMHost |
VMHostId | String |
Uid | String |
Properties inherited from ExtensionData
ExtensionData


HostFirmwareBundle

HostFirmwareBundle - Object

Returned by
Get-VMHostFirmware, Set-VMHostFirmware

Properties

Name | Type | Notes
Url | String |
Data | FileInfo |
Host | VMHost |


HostGroupAccount

HostGroupAccount - Object

Parameter to
Set-VMHostAccount
Returned by
Set-VMHostAccount, New-VMHostAccount
Extends
HostAccount

Notes

Deprecated. The type will be renamed to VMHostGroupAccount in a future release.

Properties

Name | Type | Notes
Users | String[] |
Properties inherited from HostAccount
Id, ServerId, Server, Uid, ExtensionData, Name, Domain, Description


HostNic

HostNic - Object

Returned by
Set-VMHostNetworkAdapter
Extended by
HostVirtualNic, PhysicalNic
Extends
VIObjectCore, ExtensionData

Properties

Name | Type | Notes
Id | String |
VMHostId | String |
VMHost | VMHost |
VMHostUid | String |
DeviceName | String |
Mac | String |
DhcpEnabled | Boolean |
IP | String |
SubnetMask | String |
Name | String |
Properties inherited from VIObjectCore
Uid
Properties inherited from ExtensionData
ExtensionData


HostService

HostService - Object

Parameter to
Start-VMHostService, Stop-VMHostService, Restart-VMHostService, Set-VMHostService
Returned by
Stop-VMHostService, Restart-VMHostService, Set-VMHostService, Start-VMHostService, Get-VMHostService
Extends
ExtensionData

Properties

Name | Type | Notes
Key | String |
Label | String |
Policy | String |
Required | Boolean |
Ruleset | String[] |
Running | Boolean |
Uninstallable | Boolean |
VMHostId | String |
VMHost | VMHost |
VMHostUid | String |
Uid | String |
Properties inherited from ExtensionData
ExtensionData


HostServicePolicy

HostServicePolicy - Enum

Parameter to
Set-VMHostService

Enum Constants

Name
Automatic
On
Off


HostUserAccount

HostUserAccount - Object

Parameter to
Set-VMHostAccount
Returned by
Set-VMHostAccount, New-VMHostAccount
Extends
HostAccount

Notes

Deprecated. The type will be renamed to VMHostUserAccount in a future release.

Properties

Name | Type | Notes
Groups | String[] |
ShellAccessEnabled | Boolean |
Properties inherited from HostAccount
Id, ServerId, Server, Description, Uid, ExtensionData, Name, Domain


HostVirtualNic

HostVirtualNic - Object

Property of
VMHostNetworkInfo
Parameter to
Set-VMHostNetworkAdapter, Remove-VMHostNetworkAdapter
Returned by
New-VMHostNetworkAdapter, Get-VMHostNetworkAdapter
Extended by
HostVMKernelVirtualNic, HostConsoleVirtualNic
Extends
HostNic

Properties

Name | Type | Notes
PortGroupName | String |
Properties inherited from HostNic
Id, VMHostId, VMHost, VMHostUid, DeviceName, Mac, DhcpEnabled, IP, SubnetMask, Name, ExtensionData, Uid


HostVirtualNicType

HostVirtualNicType - Enum

Enum Constants

Name
ConsoleNic
VirtualNic


HostVMKernelVirtualNic

HostVMKernelVirtualNic - Object

Extends
HostVirtualNic

Properties

Name | Type | Notes
VMotionEnabled | Boolean |
FaultToleranceLoggingEnabled | Boolean? |
IPv6 | IPv6Address[] |
AutomaticIPv6 | Boolean? |
IPv6ThroughDhcp | Boolean? |
IPv6Enabled | Boolean? |
Mtu | int? |
ManagementTrafficEnabled | Boolean? |
VsanTrafficEnabled | Boolean? |
Properties inherited from HostVirtualNic
PortGroupName, Id, VMHostId, VMHost, VMHostUid, DeviceName, Mac, DhcpEnabled, IP, SubnetMask, Name, ExtensionData, Uid


HTCoreSharing

HTCoreSharing - Enum

Property of
VMResourceConfiguration
Parameter to
Set-VMResourceConfiguration

Enum Constants

Name
Any
None
Internal


IfServer

IfServer - Object

Property of
IfServer

Properties

Name | Type
DepotManager | DepotManager
ImageProfileEngine | ImageProfileEngine
ImageBuilder | ImageBuilder
ConfigManager | ConfigManager
Instance | IfServer
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


ImageBuilder

ImageBuilder - Object

Property of
IfServer

Properties

Name Type
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


ImageBuilderSnapIn

ImageBuilderSnapIn - Object

Properties

Name | Type
Name | String
Description | String
Vendor | String
Cmdlets | Collection`1
Providers | Collection`1
Formats | Collection`1
Types | Collection`1
VendorResource | String
DescriptionResource | String
Context | InstallContext
HelpText | String
Installers | InstallerCollection
Parent | Installer
Site | ISite
Container | IContainer
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


ImageProfile

ImageProfile - Object

Property of
RemoveProfilePackage, CompareProfiles, AddProfilePackage, NewImageProfile, SetImageProfile, ExportProfile
Parameter to
Export-EsxImageProfile, New-EsxImageProfile, Set-EsxImageProfile, Add-EsxSoftwarePackage, Compare-EsxImageProfile, Remove-EsxSoftwarePackage

Properties

Name | Type
Name | String
Vendor | String
Author | String
Description | String
CreationTime | DateTime
ModifiedTime | DateTime
ReadOnly | Boolean
VibList | SoftwarePackage[]
AcceptanceLevel | AcceptanceLevels
Guid | String
Rules | Dictionary`2
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


ImageProfileConverterAttribute

ImageProfileConverterAttribute - Object

Properties

Name | Type
TypeId | Object
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


ImageProfileDiff

ImageProfileDiff - Object

Properties

Name | Type
Equal | Boolean
PackagesEqual | Boolean
RefAcceptanceLevel | AcceptanceLevels
CompAcceptanceLevel | AcceptanceLevels
OnlyInRef | String[]
OnlyInComp | String[]
UpgradeFromRef | String[]
DowngradeFromRef | String[]
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


ImageProfileEngine

ImageProfileEngine - Object

Property of
IfServer

Properties

Name Type
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


InventoryItem

InventoryItem - Object

Property of
Annotation, Folder
Parameter to
Remove-Inventory, Set-CustomField, New-CustomField, Set-Annotation, Remove-CustomField, Get-VMHostProfile, Remove-VMHostProfile, Get-Annotation, Apply-VMHostProfile, Get-StatType, Move-Inventory
Returned by
Set-CustomField, New-CustomField, Get-Inventory, Move-Inventory
Extended by
VirtualMachine, Template, VIContainer
Extends
VIObject, ExtensionData

Properties

Name | Type | Notes
CustomFields | IDictionary<string, string> |
Properties inherited from VIObject
Id, Name, Uid, Client
Properties inherited from ExtensionData
ExtensionData


InventoryItemStatus

InventoryItemStatus - Enum

Property of
AlarmActionTrigger
Parameter to
New-AlarmActionTrigger

Enum Constants

Name
Green
Yellow
Red


IPAddressAllocationMode

IPAddressAllocationMode - Enum

Property of
CINetworkAdapter
Parameter to
Set-CINetworkAdapter

Enum Constants

Name
Pool
Dhcp
Manual
None
Unknown


IPRange

IPRange - Object

Properties

Name | Type | Notes
FirstAddress | IPAddress |
LastAddress | IPAddress |

Methods

Methods defined in this object
Contains

Contains

Checks if the specified IP is within the range of IP addresses.
Syntax
bool Contains()
Return value
bool

Parameters

Name | Type | Description
IP | IPAddress | Also accepts a string (e.g. implicit conversion to IPAddress).


IPRangeList

IPRangeList - Object

Property of
CIVAppNetwork, ExternalNetwork, OrgNetwork
Parameter to
New-OrgNetwork, Set-OrgNetwork, New-CIVAppNetwork, Set-CIVAppNetwork
Extends
IList

Properties

Name Type Notes

Methods

Methods defined in this object
ContainsIP

ContainsIP

Checks if the specified IP is within any of the ranges of IP addresses.
Syntax
bool ContainsIP()
Return value
bool

Parameters

Name | Type | Description
IP | IPAddress |


IPv6Address

IPv6Address - Object

Property of
HostVMKernelVirtualNic, HostConsoleVirtualNic

Properties

Name | Type | Notes
Address | String |
PrefixLength | Int32 |


IPVersion

IPVersion - Enum

Property of
VMHostRoute

Enum Constants

Name
IPv4
IPv6


IScsiHba

IScsiHba - Object

Parameter to
New-IScsiHbaTarget, Set-VMHostHba, Get-IScsiHbaTarget
Returned by
Set-VMHostHba
Extends
Hba

Properties

Name | Type | Notes
AuthenticationCapability | IScsiHbaAuthenticationCapability |
AuthenticationProperties | IScsiHbaAuthenticationProperties |
CurrentSpeedMb | Int32? |
IScsiAlias | String |
IScsiName | String |
IsSoftwareBased | Boolean |
MaxSpeedMb | Int32? |
Properties inherited from Hba
ExtensionData, Device, Key, Model, Pci, Driver, Bus, VMHostId, Status, Type, Uid, Name, VMHost, ScsiLunUids


IScsiHbaAuthenticationCapability

IScsiHbaAuthenticationCapability - Object

Property of
IScsiHba

Properties

Name | Type | Notes
Chap | Boolean |
Krb5 | Boolean |
MutualChap | Boolean? |
Spkm | Boolean |
Srp | Boolean |
TargetChap | Boolean? |
TargetMutualChap | Boolean? |


IScsiHbaAuthenticationProperties

IScsiHbaAuthenticationProperties - Object

Property of
IScsiHba, IScsiHbaStaticTarget, IScsiHbaSendTarget, IScsiHbaTarget

Properties

Name | Type | Notes
ChapType | ChapType? |
ChapInherited | Boolean? |
ChapName | String |
MutualChapEnabled | Boolean? |
MutualChapInherited | Boolean? |
MutualChapName | String |


IScsiHbaSendTarget

IScsiHbaSendTarget - Object

Returned by
Get-IScsiHbaTarget
Extends
IScsiHbaTarget

Properties

Name Type Notes
Properties inherited from IScsiHbaTarget
Address, Port, IScsiHbaKey, AuthenticationProperties, Type, Uid, Name, IScsiHbaName, ExtensionData


IScsiHbaStaticTarget

IScsiHbaStaticTarget - Object

Returned by
Get-IScsiHbaTarget
Extends
IScsiHbaTarget

Properties

Name | Type | Notes
IScsiName | String |
Properties inherited from IScsiHbaTarget
Address, Port, IScsiHbaKey, AuthenticationProperties, Type, Uid, Name, IScsiHbaName, ExtensionData


IScsiHbaTarget

IScsiHbaTarget - Object

Parameter to
Remove-IScsiHbaTarget, Set-IScsiHbaTarget
Returned by
Set-IScsiHbaTarget, New-IScsiHbaTarget
Extended by
IScsiHbaStaticTarget, IScsiHbaSendTarget
Extends
ExtensionData

Properties

Name | Type | Notes
Address | String |
Port | Int32? |
IScsiHbaKey | String |
AuthenticationProperties | IScsiHbaAuthenticationProperties |
Type | IScsiHbaTargetType |
Uid | String |
Name | String |
IScsiHbaName | String |
Properties inherited from ExtensionData
ExtensionData


IScsiHbaTargetType

IScsiHbaTargetType - Enum

Property of
IScsiHbaStaticTarget, IScsiHbaSendTarget, IScsiHbaTarget
Parameter to
New-IScsiHbaTarget, Get-IScsiHbaTarget

Enum Constants

Name
Static
Send


ItemPair

ItemPair - Object

Property of
TestResult

Properties

Name | Type
CurrentItem | Object
ExpectedItem | Object
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


LicenseData

LicenseData - Object

Property of
EntityLicenseData

Properties

Name | Type | Notes
LicenseKeys | LicenseKeyEntry[] |


LicenseDataManager

LicenseDataManager - Object

Properties

Name Type Notes


LicenseKeyEntry

LicenseKeyEntry - Object

Property of
LicenseData

Properties

Name | Type | Notes
TypeId | String |
LicenseKey | String |


LicenseMode

LicenseMode - Enum

Property of
OSCustomizationSpec
Parameter to
Set-OSCustomizationSpec, New-OSCustomizationSpec

Enum Constants

Name
PerSeat
PerServer
NotSpecified


LinkDiscoveryOperation

LinkDiscoveryOperation - Enum

Property of
VmwareVDSwitch
Parameter to
New-VDSwitch, Set-VDSwitch

Enum Constants

Name
Advertise
Both
Listen
Disabled
Unknown


LinkDiscoveryProtocol

LinkDiscoveryProtocol - Enum

Property of
VmwareVDSwitch
Parameter to
New-VDSwitch, Set-VDSwitch

Enum Constants

Name
CDP
LLDP
Unknown


LoadBalancingPolicy

LoadBalancingPolicy - Object

Property of
VDSwitchUplinkTeamingPolicy, VDPortUplinkTeamingPolicy, VDPortgroupUplinkTeamingPolicy, UplinkTeamingPolicy
Parameter to
Set-VDUplinkTeamingPolicy

Properties

Name Type Notes


Log

Log - Object

Returned by
Get-Log

Properties

Name | Type | Notes
Key | String |
SourceEntityId | String |
StartLineNum | Int32 |
LastLineNum | Int32 |
Entries | String[] |
Server | VIServer |
Host | VMHost |
SourceEntity | VIObject |


LogDescriptor

LogDescriptor - Object

Returned by
Get-LogType
Extends
ExtensionData

Properties

Name | Type | Notes
SourceEntityId | String |
Creator | String |
Filename | String |
Format | String |
Info | Description |
Key | String |
MimeType | String |
Properties inherited from ExtensionData
ExtensionData


LongSample

LongSample - Object

Returned by
Get-Stat
Extends
Sample

Properties

Name | Type | Notes
Value | Int64 |
Properties inherited from Sample
Timestamp, MetricId, Unit, Description, Entity, EntityId, IntervalSecs, Instance


Media

Media - Object

Extends
CatalogItem

Properties

Name | Type | Notes
Status | string |
StorageUsedMB | Decimal |
Owner | CIUser |
MediaType | MediaType |
OrgVdc | OrgVdc |
Published | bool |
StorageUsedGB | Decimal |
Properties inherited from CatalogItem
Id, Description, Name, Href, Catalog, ExtensionData


MediaType

MediaType - Enum

Property of
Media

Enum Constants

Name
Floppy
Iso


MoInstanceDescriptor

MoInstanceDescriptor - Object

Properties

Name | Type | Notes
Id | String |
Type | String |


MoWrapper

MoWrapper - Object

Properties

Name Type
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


MultiArgumentTransformAttribute

MultiArgumentTransformAttribute - Object

Properties

Name | Type
TypeId | Object
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


NamedIPEndPoint

NamedIPEndPoint - Object

Parameter to
Set-VMHostSysLogServer
Returned by
Get-VMHostSysLogServer, Set-VMHostSysLogServer

Properties

Name | Type | Notes
Host | String |
Port | Int? |


NamingScheme

NamingScheme - Enum

Property of
OSCustomizationSpec

Enum Constants

Name
Custom
Fixed
Prefix
Vm


NasDatastore

NasDatastore - Object

Extends
Datastore

Properties

Name | Type | Notes
RemoteHost | String |
RemotePath | String |
UserName | String |
Properties inherited from Datastore
DatacenterId, Datacenter, ParentFolderId, ParentFolder, DatastoreBrowserPath, FreeSpaceMB, CapacityMB, Accessible, Type, ExtensionData, Id, Name, Uid, StorageIOControlEnabled, CongestionThresholdMillisecond, CapacityGB, FreeSpaceGB, State, Client


NetworkAdapter

NetworkAdapter - Object

Property of
VirtualMachine, VMGuestNetworkInterface, NicInfo
Parameter to
Set-NetworkAdapter, Remove-NetworkAdapter
Returned by
Set-NetworkAdapter, Get-NetworkAdapter, New-NetworkAdapter
Extends
VirtualDevice

Properties

Name | Type | Notes
MacAddress | String |
WakeOnLanEnabled | Boolean |
NetworkName | String |
Type | VirtualNetworkAdapterType |
Properties inherited from VirtualDevice
ExtensionData, ParentId, ConnectionState, Id, Name, Uid, Parent, Client


NetworkAdapterRelatedObject

NetworkAdapterRelatedObject - Object

Extends
NetworkAdapterRelatedObjectBase

Properties

Name Type Notes

Methods

Methods defined in this object
ToNetworkAdapter

ToNetworkAdapter

Syntax
IEnumerable<NetworkAdapter> ToNetworkAdapter()
Return value
IEnumerable

Parameters

Name Type Description
none


NetworkAdapterRelatedObjectBase

NetworkAdapterRelatedObjectBase - Object

Parameter to
Get-NetworkAdapter
Extended by
NetworkAdapterRelatedObject

Properties

Name Type Notes


NetworkFailoverDetectionPolicy

NetworkFailoverDetectionPolicy - Object

Property of
VDSwitchUplinkTeamingPolicy, VDPortUplinkTeamingPolicy, VDPortgroupUplinkTeamingPolicy, UplinkTeamingPolicy
Parameter to
Set-VDUplinkTeamingPolicy

Properties

Name Type Notes


NetworkPool

NetworkPool - Object

Property of
OrgVdc, OrgNetwork
Parameter to
Get-OrgNetwork, New-OrgVdc, Set-OrgVdc, New-OrgNetwork
Returned by
Get-NetworkPool
Extends
CIObject, VirtualPortGroupRelatedObject, VirtualSwitchRelatedObject, VDPortgroupRelatedObject, VDSwitchRelatedObject

Properties

Name | Type | Notes
Used | int? |
Capacity | int? |
Properties inherited from CIObject
Id, Description, Name, Href, ExtensionData, Client, Uid


NewImageProfile

NewImageProfile - Object

Properties

Name | Type
NewProfile | SwitchParameter
CloneProfile | ImageProfile
Name | String
Vendor | String
SoftwarePackage | SoftwarePackage[]
AcceptanceLevel | AcceptanceLevels
Description | String
ReadOnly | SwitchParameter
ParameterSetName | String
MyInvocation | InvocationInfo
InvokeCommand | CommandInvocationIntrinsics
Host | PSHost
SessionState | SessionState
Events | PSEventManager
JobRepository | JobRepository
InvokeProvider | ProviderIntrinsics
Stopping | Boolean
CommandRuntime | ICommandRuntime
CurrentPSTransaction | PSTransactionContext
CommandOrigin | CommandOrigin
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


NicInfo

NicInfo - Object

Property of
VMGuest

Properties

Name | Type | Notes
Connected | Boolean |
Device | NetworkAdapter |
IPAddress | String[] |
MacAddress | String |
NetworkName | String |


NicTeamingPolicy

NicTeamingPolicy - Object

Returned by
Get-NicTeamingPolicy, Set-NicTeamingPolicy
Extended by
NicTeamingVirtualPortGroupPolicy, NicTeamingVirtualSwitchPolicy
Extends
ExtensionData

Properties

Name | Type | Notes
LoadBalancingPolicy | LoadBalancingPolicy |
NetworkFailoverDetectionPolicy | NetworkFailoverDetectionPolicy |
NotifySwitches | Boolean |
FailbackEnabled | Boolean |
ActiveNic | String[] |
StandbyNic | String[] |
UnusedNic | String[] |
CheckBeacon | Boolean |
VmHostId | String |
VMHost | VMHost |
Uid | String |
Properties inherited from ExtensionData
ExtensionData


NicTeamingVirtualPortGroupPolicy

NicTeamingVirtualPortGroupPolicy - Object

Parameter to
Set-NicTeamingPolicy
Extends
NicTeamingPolicy

Properties

Name | Type | Notes
VirtualPortGroupId | String |
VirtualPortGroup | VirtualPortGroup |
VirtualPortGroupUid | String |
IsLoadBalancingInherited | Boolean |
IsNetworkFailoverDetectionInherited | Boolean |
IsNotifySwitchesInherited | Boolean |
IsFailbackInherited | Boolean |
IsFailoverOrderInherited | Boolean |
IsCheckBeaconInherited | Boolean |
Properties inherited from NicTeamingPolicy
LoadBalancingPolicy, NetworkFailoverDetectionPolicy, NotifySwitches, FailbackEnabled, ActiveNic, StandbyNic, UnusedNic, CheckBeacon, VmHostId, ExtensionData


NicTeamingVirtualSwitchPolicy

NicTeamingVirtualSwitchPolicy - Object

Parameter to
Set-NicTeamingPolicy
Extends
NicTeamingPolicy

Properties

Name | Type | Notes
VirtualSwitchId | String |
BeaconInterval | Int32? |
VirtualSwitch | VirtualSwitch |
Properties inherited from NicTeamingPolicy
LoadBalancingPolicy, NetworkFailoverDetectionPolicy, NotifySwitches, FailbackEnabled, ActiveNic, StandbyNic, UnusedNic, CheckBeacon, VmHostId, ExtensionData


Org

Org - Object

Property of
OrgVdc, CIVM, CIServer, Catalog, CIUser, OrgNetwork, CIVApp
Parameter to
Get-CIVApp, Get-OrgNetwork, Get-CIVM, Get-Catalog, Get-CIUser, Get-OrgVdc, Set-Org, Remove-Org, New-Catalog, New-OrgVdc, New-OrgNetwork
Returned by
Get-Org
Extended by
AdminOrg
Extends
CIObject

Properties

Name | Type | Notes
FullName | string |
Properties inherited from CIObject
Description, Id, Name, Href, ExtensionData, Client, Uid


OrgNetwork

OrgNetwork - Object

Property of
CIVAppNetwork
Parameter to
Get-CIVApp, Get-CIVM, Get-CIVAppNetwork, Remove-OrgNetwork, Set-OrgNetwork, New-CIVAppNetwork, Set-CIVAppNetwork
Returned by
Set-OrgNetwork, New-OrgNetwork, Get-OrgNetwork
Extends
CIObject, VirtualPortGroupRelatedObject, VDPortgroupRelatedObject

Properties

Name | Type | Notes
Gateway | IPAddress |
Netmask | string |
PrimaryDns | IPAddress |
SecondaryDns | IPAddress |
DnsSuffix | string |
ExternalNetwork | ExternalNetwork |
Org | Org |
NetworkPool | NetworkPool |
NetworkType | OrgNetworkType |
StaticIPPool | IPRangeList |
Properties inherited from CIObject
Id, Description, Name, Href, ExtensionData, Client, Uid


OrgNetworkType

OrgNetworkType - Enum

Property of
OrgNetwork

Enum Constants

Name
Unknown = 0
Internal = 1
Direct = 2
Routed = 3


OrgVdc

OrgVdc - Object

Property of
Media, CIVM, CIVAppTemplate
Parameter to
Get-ProviderVdc, Get-CIVApp, Get-CIVM, Import-CIVApp, Import-CIVAppTemplate, New-CIVAppTemplate, Remove-OrgVdc, Set-OrgVdc, Get-NetworkPool, New-CIVApp, Set-CIVApp
Returned by
Set-OrgVdc, Get-OrgVdc, New-OrgVdc
Extends
CIObject

Properties

Name | Type | Notes
AllocationModel | OrgVdcAllocationModel |
Enabled | bool |
ProviderVdc | ProviderVdc |
Org | Org |
CpuUsedGhz | double |
CpuLimitGhz | double |
CpuAllocationGhz | double |
CpuOverheadGhz | double |
MemoryUsedGB | Decimal |
MemoryLimitGB | Decimal |
MemoryAllocationGB | Decimal |
MemoryOverheadGB | Decimal |
StorageUsedGB | Decimal |
StorageLimitGB | Decimal |
StorageAllocationGB | Decimal |
StorageOverheadGB | Decimal |
VAppCount | int |
Status | OrgVdcStatus |
NetworkPool | NetworkPool |
NetworkMaxCount | int? |
VMMaxCount | int? |
NicMaxCount | int? |
MemoryGuaranteedPercent | int? |
CpuGuaranteedPercent | int? |
VMCpuCoreMHz | long? |
ThinProvisioned | bool? |
UseFastProvisioning | bool? |
Properties inherited from CIObject
Name, Id, Description, Href, ExtensionData, Client, Uid

Methods

Methods defined in this object
ToString

ToString

Returns the name of the OrgVdc.
Syntax
string ToString()
Return value
string

Parameters

Name Type Description
none


OrgVdcAllocationModel

OrgVdcAllocationModel - Enum

Property of
OrgVdc

Enum Constants

Name
PayAsYouGo
AllocationPool
ReservationPool


OrgVdcStatus

OrgVdcStatus - Enum

Property of
OrgVdc

Enum Constants

Name
Ready = 1
NotReady = 0
Error = -1
Unknown = Int.MinValue


OSCustomizationIPMode

OSCustomizationIPMode - Enum

Property of
OSCustomizationNicMapping
Parameter to
Set-OSCustomizationNicMapping, New-OSCustomizationNicMapping

Enum Constants

Name
UseDhcp
PromptUser
UseVCApplication
UseStaticIP


OSCustomizationNicMapping

OSCustomizationNicMapping - Object

Parameter to
Set-OSCustomizationNicMapping, Remove-OSCustomizationNicMapping
Returned by
New-OSCustomizationNicMapping, Set-OSCustomizationNicMapping, Get-OSCustomizationNicMapping
Extends
ExtensionData

Properties

Name | Type | Notes
SpecId | String |
NetworkAdapterMac | String |
Position | Int32 |
IPMode | OSCustomizationIPMode |
IPAddress | String |
SubnetMask | String |
DefaultGateway | String |
AlternateGateway | String |
Spec | OSCustomizationSpec |
Uid | String |
Dns | String[] |
Id | String |
SpecType | OSCustomizationSpecType |
VCApplicationArgument | String |
Wins | String[] |
Properties inherited from ExtensionData
ExtensionData


OSCustomizationSpec

OSCustomizationSpec - Object

Property of
OSCustomizationNicMapping
Parameter to
Set-OSCustomizationSpec, New-OSCustomizationSpec, Set-VM, New-VM, Remove-OSCustomizationSpec, New-OSCustomizationNicMapping, Get-OSCustomizationNicMapping
Returned by
Get-OSCustomizationSpec, New-OSCustomizationSpec, Set-OSCustomizationSpec
Extends
VIObject, ExtensionData

Properties

Name | Type | Notes
Type | OSCustomizationSpecType |
ServerId | String |
Server | VIServer |
LastUpdate | DateTime? |
DomainAdminUsername | String | Deprecated. As of PowerCLI 5.0 use DomainUsername property instead.
DomainUsername | String |
Description | String |
AutoLogonCount | Int32? |
ChangeSid | Boolean? |
DeleteAccounts | Boolean? |
DnsServer | String[] |
DnsSuffix | String[] |
Domain | String |
FullName | String |
GuiRunOnce | String[] |
NamingPrefix | String |
NamingScheme | NamingScheme? |
OrgName | String |
OSType | OSType? |
ProductKey | String |
TimeZone | String |
Workgroup | String |
LicenseMode | LicenseMode? |
LicenseMaxConnections | Int32? |
EncryptionKey | String |
Properties inherited from VIObject
Name, Id, Uid, Client
Properties inherited from ExtensionData
ExtensionData


OSCustomizationSpecType

OSCustomizationSpecType - Enum

Property of
OSCustomizationNicMapping, OSCustomizationSpec
Parameter to
Set-OSCustomizationSpec, New-OSCustomizationSpec, Get-OSCustomizationSpec

Enum Constants

Name
NonPersistent
Persistent


OSType

OSType - Enum

Property of
OSCustomizationSpec

Enum Constants

Name
Windows
Linux


PackageNameConverterAttribute

PackageNameConverterAttribute - Object

Properties

Name | Type
TypeId | Object
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


PassthroughDevice

PassthroughDevice - Object

Parameter to
Add-PassthroughDevice, Remove-PassthroughDevice
Returned by
Get-PassthroughDevice, Add-PassthroughDevice
Extended by
ScsiPassthroughDevice, PciPassthroughDevice
Extends
ExtensionData

Properties

Name | Type | Notes
VendorName | String |
Name | String |
VMId | String |
VM | VirtualMachine |
VMHostId | String |
VMHost | VMHost |
Key | Int32? |
Uid | String |
Properties inherited from ExtensionData
ExtensionData


PassthroughDeviceType

PassthroughDeviceType - Enum

Parameter to
Get-PassthroughDevice

Enum Constants

Name
Pci
Scsi


PciPassthroughDevice

PciPassthroughDevice - Object

Extends
PassThroughDevice

Properties

Name | Type | Notes
Bus | Int32 |
ClassId | Int32 |
DeviceId | Int32 |
Function | Int32 |
Slot | Int32 |
State | PciPassthroughDeviceState |
VendorId | Int32 |
Properties inherited from PassThroughDevice
VendorName, Name, VMId, VM, VMHostId, VMHost, Key, Uid, ExtensionData


PciPassthroughDeviceState

PciPassthroughDeviceState - Enum

Property of
PciPassthroughDevice

Enum Constants

Name
Enabled
Active
NeedsHostReboot


Permission

Permission - Object

Parameter to
Set-VIPermission, Remove-VIPermission
Returned by
New-VIPermission, Set-VIPermission, Get-VIPermission
Extends
ExtensionData

Properties

Name | Type | Notes
EntityId | String |
Role | String |
Principal | String |
Propagate | Boolean |
IsGroup | Boolean |
Entity | VIObject |
Uid | String |
Properties inherited from ExtensionData
ExtensionData


PersistencePolicy

PersistencePolicy - Enum

Property of
HardDisk, RawHardDisk, FlatHardDisk

Enum Constants

Name
Persistent
NonPersistent
Undoable
IndependentPersistent
IndependentNonPersistent
Unknown


PhysicalNic

PhysicalNic - Object

Property of
VMHostNetworkInfo
Parameter to
Set-VMHostNetworkAdapter, Set-NicTeamingPolicy, New-VirtualSwitch
Extends
HostNic

Properties

Name | Type | Notes
BitRatePerSec | Int64 |
FullDuplex | Boolean |
WakeOnLanSupported | Boolean? |
Properties inherited from HostNic
Id, VMHostId, VMHost, VMHostUid, DeviceName, Mac, DhcpEnabled, IP, SubnetMask, Name, ExtensionData, Uid


PortGroupPort

PortGroupPort - Object

Property of
VirtualPortGroup

Properties

Name | Type | Notes
Key | String |
Mac | String[] |
Type | String |


PowerCLIConfiguration

PowerCLIConfiguration - Object

Returned by
Get-PowerCLIConfiguration, Set-PowerCLIConfiguration

Properties

Name | Type | Notes
DefaultVIServerMode | DefaultVIServerMode? |
ProxyPolicy | ProxyPolicy? |
DisplayDeprecationWarnings | bool? |
InvalidCertificateAction | BadCertificateAction? |
WebOperationTimeoutSeconds | Int? |
Scope | ConfigurationScope |
VMConsoleWindowBrowser | String |


PowerCLIVersion

PowerCLIVersion - Object

Returned by
Get-PowerCLIVersion

Properties

Name | Type | Notes
Major | Int32 |
Minor | Int32 |
Build | Int32 |
Revision | Int32 |
Copyright | String |
Company | String |
UserFriendlyVersion | String |
SnapinVersions | SnapinVersion |


PowerState

PowerState - Enum

Property of
VirtualMachine, Snapshot

Enum Constants

Name
PoweredOff
PoweredOn
Suspended


PrivateVlanConfiguration

PrivateVlanConfiguration - Object

Extends
VlanConfiguration

Properties

Name | Type | Notes
PrimaryVlanId | int |
SecondaryVlanId | int |
PrivateVlanType | PrivateVlanType |
Properties inherited from VlanConfiguration
VlanType


PrivateVlanType

PrivateVlanType - Enum

Property of
PrivateVlanConfiguration
Parameter to
Get-VDSwitchPrivateVlan

Enum Constants

Name
Promiscuous
Isolated
Community


Privilege

Privilege - Object

Parameter to
New-VIRole, Set-VIRole
Returned by
Get-VIPrivilege
Extended by
PrivilegeGroup, PrivilegeItem
Extends
ExtensionData

Properties

Name | Type | Notes
Description | String |
ServerId | String |
Server | VIServer |
Id | String |
Uid | String |
Name | String |
Properties inherited from ExtensionData
ExtensionData


PrivilegeGroup

PrivilegeGroup - Object

Property of
PrivilegeItem
Parameter to
Get-VIPrivilege
Extends
Privilege

Properties

Name | Type | Notes
PrivilegeList | String[] |
Properties inherited from Privilege
ExtensionData, Description, ServerId, Id, Uid, Name, Server


PrivilegeItem

PrivilegeItem - Object

Extends
Privilege

Properties

Name | Type | Notes
AppliedOnParent | Boolean |
ParentGroupId | String |
ParentGroup | PrivilegeGroup |
Properties inherited from Privilege
ExtensionData, Description, ServerId, Id, Uid, Name, Server


ProviderVdc

ProviderVdc - Object

Property of
OrgVdc
Parameter to
Get-ExternalNetwork, Get-OrgVdc, Get-CIDatastore, Add-CIDatastore, New-OrgVdc, Get-NetworkPool
Extends
CIObject, DatastoreRelatedObject, ResourcePoolRelatedObject

Properties

Name | Type | Notes
HighestSupportedHardwareVersion | VMVersion |
Enabled | bool |
CpuTotalGHz | double |
CpuUsedGHz | double |
CpuAllocatedGHz | double |
CpuOverheadGHz | double |
MemoryTotalGB | Decimal |
MemoryUsedGB | Decimal |
MemoryAllocatedGB | Decimal |
MemoryOverheadGB | Decimal |
StorageTotalGB | Decimal |
StorageUsedGB | Decimal |
StorageAllocatedGB | Decimal |
StorageOverheadGB | Decimal |
Status | ProviderVdcStatus |
Properties inherited from CIObject
Description, Id, Name, Href, ExtensionData, Client, Uid


ProviderVdcStatus

ProviderVdcStatus - Enum

Property of
ProviderVdc

Enum Constants

Name
CreationFailed
NotReady
Ready
Unknown
Unrecognized


ProxyPolicy

ProxyPolicy - Enum

Property of
PowerCLIConfiguration
Parameter to
Set-PowerCLIConfiguration

Enum Constants

Name
NoProxy
UseSystemProxy


QueryType

QueryType - Enum

Parameter to
Search-Cloud

Enum Constants

Name
AdminAllocatedExternalAddress
AdminCatalogItem
AdminCatalog
AdminGroup
AdminMedia
AdminOrgNetwork
AdminShadowVM
AdminTask
AdminUser
AdminVAppNetwork
AdminVApp
AdminVAppTemplate
AdminVM
AdminVdc
AllocatedExternalAddress
BlockingTask
CatalogItem
Catalog
Cell
DatastoreProviderVdcRelation
Datastore
DvSwitch
Event
Group
Host
Media
NetworkPool
Network
OrgNetwork
Org
OrgVdc
OrgVdcResourcePoolRelation
Portgroup
ProviderVdcResourcePoolRelation
ResourcePool
Right
Role
StrandedUser
Task
User
VAppNetwork
VAppOrgNetworkRelation
VApp
VAppTemplate
VM
VMWProviderVdc
VirtualCenter


RawHardDisk

RawHardDisk - Object

Extends
HardDisk

Properties

Name | Type | Notes
DeviceName | String |
ScsiCanonicalName | String |
Properties inherited from HardDisk
Persistence, DiskType, Filename, CapacityKB, ParentId, ConnectionState, Id, Name, Uid, ExtensionData, Parent, CapacityGB, Client


ReadOnlyProfileException

ReadOnlyProfileException - Object

Properties

Name | Type
Message | String
Data | IDictionary
InnerException | Exception
TargetSite | MethodBase
StackTrace | String
HelpLink | String
Source | String
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


RemoteConsoleVM

RemoteConsoleVM - Object

Parameter to
Open-VMConsoleWindow

Properties

Name Type Notes


RemoveDepot

RemoveDepot - Object

Properties

Name | Type
SoftwareDepot | SoftwareDepot[]
ParameterSetName | String
MyInvocation | InvocationInfo
InvokeCommand | CommandInvocationIntrinsics
Host | PSHost
SessionState | SessionState
Events | PSEventManager
JobRepository | JobRepository
InvokeProvider | ProviderIntrinsics
Stopping | Boolean
CommandRuntime | ICommandRuntime
CurrentPSTransaction | PSTransactionContext
CommandOrigin | CommandOrigin
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


RemoveProfilePackage

RemoveProfilePackage - Object

Properties

Name | Type
ImageProfile | ImageProfile
SoftwarePackage | SoftwarePackage[]
Force | SwitchParameter
ParameterSetName | String
MyInvocation | InvocationInfo
InvokeCommand | CommandInvocationIntrinsics
Host | PSHost
SessionState | SessionState
Events | PSEventManager
JobRepository | JobRepository
InvokeProvider | ProviderIntrinsics
Stopping | Boolean
CommandRuntime | ICommandRuntime
CurrentPSTransaction | PSTransactionContext
CommandOrigin | CommandOrigin
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


ResourcePool

ResourcePool - Object

Property of
VirtualMachine
Parameter to
Get-VMHost, Set-ResourcePool, Move-ResourcePool, Remove-ResourcePool
Returned by
New-ResourcePool, Set-ResourcePool, Get-ResourcePool, Move-ResourcePool
Extends
VIContainer

Properties

Name | Type | Notes
ParentId | String |
Parent | InvenrotyItem |
CpuSharesLevel | SharesLevel |
NumCpuShares | Int32 |
CpuReservationMHz | Int64 |
CpuExpandableReservation | Boolean |
CpuLimitMHz | Int64 |
MemSharesLevel | SharesLevel |
NumMemShares | Int32 |
MemReservationMB | Decimal |
MemExpandableReservation | Boolean |
MemLimitMB | Decimal |
MemLimitGB | Decimal |
MemReservationGB | Decimal |
Properties inherited from VIContainer
CustomFields, ExtensionData, Id, Name, Uid, Client


ResourcePoolRelatedObject

ResourcePoolRelatedObject - Object

Extends
ResourcePoolRelatedObjectBase

Properties

Name Type Notes

Methods

Methods defined in this object
ToResourcePool

ToResourcePool

Converts the specified object to zero, one or more ResourcePool objects.
Syntax
IEnumerable<ResourcePool> ToResourcePool()
Return value
IEnumerable

Parameters

Name Type Description
none


ResourcePoolRelatedObjectBase

ResourcePoolRelatedObjectBase - Object

Parameter to
Get-ResourcePool
Extended by
ResourcePoolRelatedObject

Properties

Name Type Notes


ResourceSchedulingRecommendation

ResourceSchedulingRecommendation - Object

Parameter to
Apply-DrsRecommendation
Extended by
SdrsRecommendation
Extends
ExtensionData

Properties

Name | Type | Notes
Key | String |
Priority | Int32 |
Recommendation | String |
Reason | String |
Target | VIObject |
Properties inherited from ExtensionData
ExtensionData


ResourceSchedulingRule

ResourceSchedulingRule - Object

Extended by
DrsRule
Extends
ExtensionData

Properties

Name | Type | Notes
Name | String |
Enabled | bool |
Type | ResourceSchedulingRuleType |
Mandatory | bool |
Properties inherited from ExtensionData
ExtensionData


ResourceSchedulingRuleType

ResourceSchedulingRuleType - Enum

Property of
ResourceSchedulingRule, DrsVMAntiAffinityRule, DrsRule, DrsVMHostAffinityRule, DrsVMAffinityRule
Parameter to
Get-DrsRule

Enum Constants

Name
VMAntiAffinity
VMAffinity
VMHostAffinity


Role

Role - Object

Parameter to
New-VIPermission, Remove-VIRole, Set-VIPermission, Get-VIPrivilege, Set-VIRole
Returned by
Get-VIRole, Set-VIRole, New-VIRole
Extends
ExtensionData

Properties

Name | Type | Notes
Id | Int32 |
Description | String |
IsSystem | Boolean |
PrivilegeList | String[] |
ServerId | String |
Server | VIServer |
Uid | String |
Name | String |
Properties inherited from ExtensionData
ExtensionData


Sample

Sample - Object

Extended by
LongSample, FloatSample

Properties

Name | Type | Notes
Timestamp | DateTime |
MetricId | String |
Unit | String |
Description | String |
Entity | VIObject |
EntityId | String | Deprecated. Use Entity parameter instead.
IntervalSecs | Int32 |
Instance | String |


ScriptAction

ScriptAction - Object

Extends
AlarmAction

Properties

Name | Type | Notes
ScriptFilePath | String |
Properties inherited from AlarmAction
ActionType, AlarmDefinition, Trigger, Uid


ScriptType

ScriptType - Enum

Parameter to
Invoke-VMScript

Enum Constants

Name
Powershell
Bat
Bash


ScsiBusSharingMode

ScsiBusSharingMode - Enum

Property of
ScsiController
Parameter to
Set-ScsiController, New-ScsiController

Enum Constants

Name
NoSharing
Physical
Virtual


ScsiController

ScsiController - Object

Parameter to
Set-HardDisk, New-HardDisk, Set-ScsiController
Returned by
Set-ScsiController, Get-ScsiController
Extends
VirtualDevice

Properties

Name | Type | Notes
BusSharingMode | ScsiBusSharingMode |
Type | ScsiControllerType |
UnitNumber | int |
Properties inherited from VirtualDevice
ParentId, ConnectionState, Id, Name, Uid, ExtensionData, Parent, Client


ScsiControllerType

ScsiControllerType - Enum

Property of
ScsiController
Parameter to
Set-ScsiController, New-ScsiController

Enum Constants

Name
Default
ParaVirtual
VirtualBusLogic
VirtualLsiLogic
VirtualLsiLogicSAS


ScsiLun

ScsiLun - Object

Property of
VMHostDisk, ScsiLunPath, VMHostStorageInfo
Parameter to
Get-ScsiLunPath, Set-ScsiLun, Get-VMHostDisk
Returned by
Get-ScsiLun, Set-ScsiLun
Extends
ExtensionData

Properties

Name | Type | Notes
Id | String |
CanonicalName | String |
Key | String |
LunType | String |
Model | String |
SerialNumber | String |
Vendor | String |
ConsoleDeviceName | String |
CapacityMB | Int64? |
MultipathPolicy | ScsiLunMultipathPolicy |
CommandsToSwitchPath | Int32? |
BlocksToSwitchPath | Int32? |
HostId | String | Deprecated. As of PowerCLI 5.0 use VMHostId property instead.
VMHostId | String |
VMHost | VMHost |
Uid | String |
RuntimeName | String |
IsLocal | bool |
CapacityGB | Decimal? |
Properties inherited from ExtensionData
ExtensionData


ScsiLunMultipathPolicy

ScsiLunMultipathPolicy - Enum

Property of
ScsiLun
Parameter to
Set-ScsiLun

Enum Constants

Name
Fixed
MostRecentlyUsed
RoundRobin
Unknown


ScsiLunPath

ScsiLunPath - Object

Parameter to
Set-ScsiLunPath, Set-ScsiLun
Returned by
Get-ScsiLunPath, Set-ScsiLunPath
Extends
ExtensionData

Properties

Name | Type | Notes
Name | String |
ScsiLunId | String |
ScsiLun | ScsiLun |
LunPath | String | Deprecated. As of PowerCLI 5.0 use Name property instead.
SanId | String |
State | ScsiLunPathState |
Preferred | Boolean |
ScsiCanonicalName | String |
Uid | String |
Properties inherited from ExtensionData
ExtensionData


ScsiLunPathState

ScsiLunPathState - Enum

Property of
ScsiLunPath

Enum Constants

Name
Active
Dead
Disabled
Standby
Unknown


ScsiPassthroughDevice

ScsiPassthroughDevice - Object

Extends
PassThroughDevice

Properties

Name | Type | Notes
ControllerKey | Int32 |
Class | String |
UnitNumber | Int32 |
Properties inherited from PassThroughDevice
VendorName, Name, VMId, VM, VMHostId, VMHost, Key, Uid, ExtensionData


SdrsRecommendation

SdrsRecommendation - Object

Extends
ResourceSchedulingRecommendation

Properties

Name | Type | Notes
DatastoreCluster | DatastoreCluster |
Properties inherited from ResourceSchedulingRecommendation
Key, Priority, Recommendation, Reason, Target, ExtensionData


SdrsVMAntiAffinityRule

SdrsVMAntiAffinityRule - Object

Extends
AdvancedOption

Properties

Name | Type | Notes
VM | VirtualMachine[] |


SdrsVMDiskAntiAffinityRule

SdrsVMDiskAntiAffinityRule - Object

Extends
AdvancedOption

Properties

Name | Type | Notes
DiskIdentifier | String[] |


SecurityPolicy

SecurityPolicy - Object

Parameter to
Set-VDSecurityPolicy
Returned by
Set-VDSecurityPolicy, Get-VDSecurityPolicy
Extended by
VDPortgroupSecurityPolicy, VDPortSecurityPolicy, VDSwitchSecurityPolicy

Properties

Name | Type | Notes
AllowPromiscuous | bool |
ForgedTransmits | bool |
MacChanges | bool |
AllowPromiscuousInherited | bool |
ForgedTransmitsInherited | bool |
MacChangesInherited | bool |


SessionVariables

SessionVariables - Object

Properties

Name Type
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


SetImageProfile

SetImageProfile - Object

Properties

Name | Type
ImageProfile | ImageProfile
Name | String
Vendor | String
SoftwarePackage | SoftwarePackage[]
AcceptanceLevel | AcceptanceLevels
Description | String
ReadOnly | SwitchParameter
Force | SwitchParameter
ParameterSetName | String
MyInvocation | InvocationInfo
InvokeCommand | CommandInvocationIntrinsics
Host | PSHost
SessionState | SessionState
Events | PSEventManager
JobRepository | JobRepository
InvokeProvider | ProviderIntrinsics
Stopping | Boolean
CommandRuntime | ICommandRuntime
CurrentPSTransaction | PSTransactionContext
CommandOrigin | CommandOrigin
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


SharesLevel

SharesLevel - Enum

Property of
VMDiskResourceConfiguration, ResourcePool, VApp, VMResourceConfiguration
Parameter to
Set-ResourcePool, Set-VApp, Set-VMResourceConfiguration, New-VApp, New-ResourcePool

Enum Constants

Name
Custom
High
Low
Normal


SingleVlanConfiguration

SingleVlanConfiguration - Object

Extends
VlanConfiguration

Properties

Name | Type | Notes
VlanId | int |
Properties inherited from VlanConfiguration
VlanType


SnapinVersion

SnapinVersion - Object

Property of
PowerCLIVersion

Properties

Name | Type | Notes
Major | int |
Minor | int |
Revision | int |
Build | int |
Name | string |
UserFriendlyVersion | string |
Description | string |


Snapshot

Snapshot - Object

Property of
Snapshot
Parameter to
Get-FloppyDrive, Get-CDDrive, Get-UsbDevice, Set-Snapshot, Set-VM, New-VM, Get-HardDisk, Get-NetworkAdapter, Remove-Snapshot, Get-ScsiController
Returned by
Set-Snapshot, New-Snapshot, Get-Snapshot
Extends
VIObject, ExtensionData

Properties

Name | Type | Notes
Description | String |
Created | DateTime |
Quiesced | Boolean | Deprecated. Quiesced property of Snapshot object is deprecated and scheduled for removal.
PowerState | PowerState |
VM | VirtualMachine |
VMId | String |
Parent | Snapshot | Deprecated. As of PowerCLI 5.0 use ParentSnapshot property instead.
ParentSnapshotId | String |
ParentSnapshot | Snapshot |
Children | Snapshot[] |
SizeMB | Decimal |
IsCurrent | Boolean |
IsReplaySupported | Boolean |
SizeGB | Decimal? |
Properties inherited from VIObject
Id, Name, Uid, Client
Properties inherited from ExtensionData
ExtensionData


SnmpAction

SnmpAction - Object

Extends
AlarmAction

Properties

Name Type Notes
Properties inherited from AlarmAction
ActionType, AlarmDefinition, Trigger, Uid


SoftwareChannel

SoftwareChannel - Object

Property of
GetPackages, GetProfiles, SoftwareDepot
Parameter to
Get-EsxSoftwarePackage, Get-EsxImageProfile

Properties

Name | Type
ChannelId | String
Name | String
Enabled | Boolean
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


SoftwareChannelConverterAttribute

SoftwareChannelConverterAttribute - Object

Properties

Name | Type
TypeId | Object
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


SoftwareConstraint

SoftwareConstraint - Object

Property of
SoftwarePackage

Properties

Name | Type
PackageName | String
Relation | String
Version | String
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


SoftwareDepot

SoftwareDepot - Object

Property of
GetChannels, RemoveDepot
Parameter to
Remove-EsxSoftwareDepot

Properties

Name | Type
DepotUrl | String
Channels | SoftwareChannel[]
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


SoftwarePackage

SoftwarePackage - Object

Property of
RemoveProfilePackage, AddProfilePackage, NewImageProfile, SetImageProfile, ImageProfile
Parameter to
New-EsxImageProfile, Set-EsxImageProfile, Add-EsxSoftwarePackage, Remove-EsxSoftwarePackage

Properties

Name | Type
Name | String
Version | String
Vendor | String
Summary | String
Description | String
CreationDate | DateTime
Depends | SoftwareConstraint[]
Conflicts | SoftwareConstraint[]
Replaces | SoftwareConstraint[]
AcceptanceLevel | AcceptanceLevels
MaintenanceMode | Boolean
LiveInstallOk | Boolean
LiveRemoveOk | Boolean
SourceUrls | String[]
Guid | String
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


StartPolicy

StartPolicy - Object

Extended by
VMHostStartPolicy, VMStartPolicy
Extends
ExtensionData

Properties

Name | Type | Notes
StartDelay | Int32 |
StopAction | VmStopAction |
StopDelay | Int32 |
WaitForHeartbeat | Boolean |
Properties inherited from ExtensionData
ExtensionData


StatInterval

StatInterval - Object

Parameter to
Set-StatInterval, Get-StatType, Remove-StatInterval
Returned by
New-StatInterval, Get-StatInterval, Set-StatInterval
Extends
ExtensionData

Properties

Name | Type | Notes
ServerId | String |
SamplingPeriodSecs | Int32 |
StorageTimeSecs | Int32 |
Server | VIServer |
Uid | String |
Name | String |
Properties inherited from ExtensionData
ExtensionData


StorageResource

StorageResource - Object

Parameter to
Get-VM, Get-ScsiLun, Get-VMHost, Import-VApp, New-VM, New-HardDisk, Move-VM, Get-Template, New-Template
Extended by
DatastoreCluster, Datastore
Extends
VIObject

Properties

Name | Type | Notes
CapacityGB | Decimal |
FreeSpaceGB | Decimal |
Properties inherited from VIObject
Id, Name, Uid, Client


Tag

Tag - Object

Property of
TagAssignment
Parameter to
Get-VM, Get-VMHost, Get-Datastore, Get-VirtualPortGroup, New-TagAssignment, Remove-TagAssignment
Returned by
Get-Tag
Extends
VIObject

Properties

Name | Type | Notes
Description | String |
Category | String |
Properties inherited from VIObject
Uid, Name, Id, Client


TagAssignment

TagAssignment - Object

Parameter to
Remove-TagAssignment
Returned by
New-TagAssignment, Get-TagAssignment
Extends
VIObjectCore

Properties

Name | Type | Notes
Tag | Tag |
Entity | VIObject |
Properties inherited from VIObjectCore
Uid


TagCategory

TagCategory - Object

Parameter to
Get-Tag, Get-TagAssignment
Extends
VIObject

Properties

Name Type Notes
Properties inherited from VIObject
Id, Name, Uid, Client


Task

Task - Object

Properties

Name | Type
Result | Object
Done | Boolean
Error | LocalizedMethodFault
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


TaskState

TaskState - Enum

Property of
Task
Parameter to
Get-Task

Enum Constants

Name
Error
Queued
Running
Success
Unknown


Template

Template - Object

Parameter to
Get-FloppyDrive, Get-PassthroughDevice, Get-CDDrive, Get-UsbDevice, Set-Template, New-VM, Get-HardDisk, Get-NetworkAdapter, Remove-Template, Move-Template, New-Template, Get-ScsiController, Get-DatastoreCluster
Returned by
New-Template, Set-Template, Move-Template, Get-Template
Extends
InventoryItem, DatastoreUser

Properties

Name | Type | Notes
FolderId | String |
Properties inherited from InventoryItem
CustomFields, ExtensionData, Id, Name, Uid, Client
Properties inherited from DatastoreUser
DatastoreIdList


TestResult

TestResult - Object

Properties

Name | Type
VMHost | VMHost
ItemList | ItemPair[]
Copyright © 1998 - 2011 VMware, Inc. All rights reserved.


TopologyInfo

TopologyInfo - Object

Returned by
Get-Esxtop
Extends

Properties

Name | Type | Notes
Server | VIServer |
Topology | String |
Uid | String |
Entries | DynamicData[] |


TrafficDirection

TrafficDirection - Enum

Property of
TrafficShapingPolicy, VDPortTrafficShapingPolicy, VDSwitchTrafficShapingPolicy, VDPortgroupTrafficShapingPolicy
Parameter to
Get-VDTrafficShapingPolicy

Enum Constants

Name
In
Out


TrafficShapingPolicy

TrafficShapingPolicy - Object

Parameter to
Set-VDTrafficShapingPolicy
Returned by
Get-VDTrafficShapingPolicy

Properties

Name | Type | Notes
Direction | TrafficDirection |
Enabled | bool |
AverageBandwidth | Long |
PeakBandwidth | Long |
BurstSize | Long |
EnabledInherited | bool |
AverageBandwidthInherited | Bool |
PeakBandwidthInherited | Bool |
BurstSizeInherited | Bool |


TrapTarget

TrapTarget - Object

Property of
VmHostSnmp
Parameter to
Set-VMHostSnmp

Properties

Name | Type | Notes
Community | String |
HostName | String |
Port | Int32 |
Uid | String |
Client | VIAutomation |


UplinkLacpMode

UplinkLacpMode - Enum

Property of
VDPortgroupUplinkLacpPolicy, VDSwitchUplinkLacpPolicy, UplinkLacpPolicy, VDPortUplinkLacpPolicy
Parameter to
Set-VDUplinkLacpPolicy

Enum Constants

Name
Active
Passive


UplinkLacpPolicy

UplinkLacpPolicy - Object

Parameter to
Set-VDUplinkLacpPolicy
Returned by
Get-VDUplinkLacpPolicy

Properties

Name | Type | Notes
Enabled | Bool |
EnabledInherited | Bool |
Mode | UplinkLacpMode |
ModeInherited | Bool |


UplinkTeamingPolicy

UplinkTeamingPolicy - Object

Parameter to
Set-VDUplinkTeamingPolicy
Returned by
Get-VDUplinkTeamingPolicy, Set-VDUplinkTeamingPolicy

Properties

Name | Type | Notes
NotifySwitches | Bool |
NotifySwitchesInherited | Bool |
LoadBalancingPolicy | LoadBalancingPolicy |
LoadBalancingPolicyInherited | Bool |
FailoverDetectionPolicy | NetworkFailoverDetectionPolicy |
ActiveUplinkPort | String[] |
StandbyUplinkPort | String[] |
UplinkPortOrderInherited | Bool |
FailBack | Bool |
FailBackInherited | Bool |
UnusedUplinkPort | String[] |
FailoverDetectionPolicyInherited | Bool |


UsbDevice

UsbDevice - Object

Property of
VirtualMachine
Parameter to
Remove-UsbDevice
Returned by
Get-UsbDevice
Extends
VirtualDevice

Properties

Name Type Notes
Properties inherited from VirtualDevice
ExtensionData, ParentId, ConnectionState, Id, Name, Uid, Parent, Client


VApp

VApp - Object

Property of
VirtualMachine
Parameter to
Export-VApp, Set-VApp, New-VM, Remove-VApp, Start-VApp, New-VApp, Stop-VApp, Move-VApp
Returned by
Move-VApp, New-VApp, Start-VApp, Set-VApp, Get-VApp, Stop-VApp, Import-VApp
Extends
VIContainer

Properties

Name | Type | Notes
ParentId | String |
Parent | InvenrotyItem |
Status | VAppStatus |
NumCpuShares | Int32 |
CpuReservationMhz | Int64 |
CpuExpandableReservation | Boolean |
CpuLimitMhz | Int64 |
CpuSharesLevel | SharesLevel |
NumMemShares | Int32 |
MemReservationMB | Int64 |
MemExpandableReservation | Boolean |
MemLimitMB | Int64 |
MemSharesLevel | SharesLevel |
MemLimitGB | Decimal |
MemReservationGB | Decimal |
Properties inherited from VIContainer
CustomFields, ExtensionData, Id, Name, Uid, Client


VAppStatus

VAppStatus - Enum

Property of
VApp

Enum Constants

Name
Started
Starting
Stopped
Stopping


VAppStorageFormat

VAppStorageFormat - Enum

Parameter to
Export-VApp

Enum Constants

Name
Ovf
Ova


VDObject

VDObject - Object

Extended by
VDPortgroup, VDPort, VDSwitch
Extends
VDObjectCore, VIObject

Properties

Name | Type | Notes
Name | string |
Properties inherited from VDObjectCore
Uid


VDObjectCore

VDObjectCore - Object

Extended by
VDObject, VDSwitchPrivateVlan, VDPortPolicy, VDPortgroupPolicy, VDSwitchPolicy, BlockedPolicy
Extends
VIObjectCore

Properties

Name | Type | Notes
Uid | string |


VDPort

VDPort - Object

Property of
VDPortUplinkTeamingPolicy, VDPortUplinkLacpPolicy, VDPortPolicy, VDPortTrafficShapingPolicy, VDPortBlockedPolicy, VDPortSecurityPolicy
Parameter to
Set-VDPort, Set-VDVlanConfiguration, Get-VDBlockedPolicy, Get-VDSecurityPolicy, Get-VDTrafficShapingPolicy, Get-VDUplinkLacpPolicy, Get-VDUplinkTeamingPolicy
Returned by
Set-VDPort, Get-VDPort, Set-VDVlanConfiguration
Extends
VDObject, ExtensionData

Properties

Name | Type | Notes
Description | string |
IsBlocked | bool |
ConnectedEntity | VIObjectCore |
Portgroup | VDPortgroup |
ProxyHost | VMHost |
IsLinkUp | bool? |
MacAddress | string |
Key | string |
Switch | VDSwitch |
IsBlockedInherited | bool |
VlanConfiguration | VlanConfiguration |
Properties inherited from VDObject
Uid, Name
Properties inherited from ExtensionData
ExtensionData


VDPortBlockedPolicy

VDPortBlockedPolicy - Object

Extends
VDPortPolicy, BlockedPolicy

Properties

Name Type Notes
Properties inherited from VDPortPolicy
Uid, VDPort
Properties inherited from BlockedPolicy
Blocked, BlockedInherited


VDPortgroup

VDPortgroup - Object

Property of
VDPortgroupOverridePolicy, VDPortgroupUplinkLacpPolicy, VDPortgroupUplinkTeamingPolicy, VDPortgroupSecurityPolicy, VDPortgroupPolicy, VDPort, VDPortgroupBlockedPolicy, VDPortgroupTrafficShapingPolicy
Parameter to
Add-VDSwitchPhysicalNetworkAdapter, Remove-VDPortgroup, Set-VDPortgroup, Export-VDPortGroup, Get-VDPort, Set-VDVlanConfiguration, Get-VDPortgroupOverridePolicy, Get-VDBlockedPolicy, Get-VDSecurityPolicy, Get-VDTrafficShapingPolicy, Get-VDUplinkLacpPolicy, Get-VDUplinkTeamingPolicy
Returned by
Get-VDPortgroup, New-VDPortgroup, Set-VDPortgroup, Set-VDVlanConfiguration
Extended by
VmwareVDPortgroup
Extends
VDObject, ExtensionData, DistributedPortGroup

Properties

Name | Type | Notes
Notes | string |
VDSwitch | VDSwitch |
PortBinding | DistributedPortgroupPortBinding |
NumPorts | int |
Key | string |
Id | string |
IsUplink | bool |
VirtualSwitch | VirtualSwitch | Deprecated. PowerCLI scripts should not use this property. The property will be removed in a future release.
Properties inherited from VDObject
Uid, Name
Properties inherited from ExtensionData
ExtensionData


VDPortgroupBlockedPolicy

VDPortgroupBlockedPolicy - Object

Extends
BlockedPolicy, VDPortgroupPolicy

Properties

Name Type Notes
Properties inherited from BlockedPolicy
Uid, Blocked, BlockedInherited
Properties inherited from VDPortgroupPolicy
VDPortgroup


VDPortgroupOverridePolicy

VDPortgroupOverridePolicy - Object

Parameter to
Set-VDPortgroupOverridePolicy
Returned by
Get-VDPortgroupOverridePolicy, Set-VDPortgroupOverridePolicy
Extends
VDPortgroupPolicy

Properties

Name | Type | Notes
BlockOverrideAllowed | bool |
TrafficShapingOverrideAllowed | bool |
ResetPortConfigAtDisconnect | bool |
VlanOverrideAllowed | Bool |
UplinkTeamingOverrideAllowed | Bool |
SecurityOverrideAllowed | Bool |
Properties inherited from VDPortgroupPolicy
Uid, VDPortgroup


VDPortgroupPolicy

VDPortgroupPolicy - Object

Extended by
VDPortgroupOverridePolicy, VDPortgroupUplinkLacpPolicy, VDPortgroupUplinkTeamingPolicy, VDPortgroupTrafficShapingPolicy
Extends
VDObjectCore

Properties

Name | Type | Notes
VDPortgroup | VDPortgroup |
Properties inherited from VDObjectCore
Uid


VDPortgroupRelatedObject

VDPortgroupRelatedObject - Object

Extends
VDPortgroupRelatedObjectBase

Properties

Name Type Notes

Methods

Methods defined in this object
ToVDPortgroup

ToVDPortgroup

Syntax
IEnumerable<VDPortgroup> ToVDPortgroup()
Return value
IEnumerable

Parameters

Name Type Description
none


VDPortgroupRelatedObjectBase

VDPortgroupRelatedObjectBase - Object

Parameter to
Get-VDPortgroup
Extended by
VDPortgroupRelatedObject

Properties

Name Type Notes


VDPortgroupSecurityPolicy

VDPortgroupSecurityPolicy - Object

Extends
SecurityPolicy, VDPortgroupPolicy

Properties

Name Type Notes
Properties inherited from SecurityPolicy
AllowPromiscuous, ForgedTransmits, MacChanges, AllowPromiscuousInherited, ForgedTransmitsInherited, MacChangesInherited
Properties inherited from VDPortgroupPolicy
Uid, VDPortgroup


VDPortgroupTrafficShapingPolicy

VDPortgroupTrafficShapingPolicy - Object

Extends
VDPortgroupPolicy, TrafficShapingPolicy

Properties

Name Type Notes
Properties inherited from VDPortgroupPolicy
Uid, VDPortgroup
Properties inherited from TrafficShapingPolicy
Direction, Enabled, AverageBandwidth, PeakBandwidth, BurstSize, EnabledInherited, AverageBandwidthInherited, PeakBandwidthInherited, BurstSizeInherited


VDPortgroupUplinkLacpPolicy

VDPortgroupUplinkLacpPolicy - Object

Extends
VDPortgroupPolicy, UplinkLacpPolicy

Properties

Name Type Notes
Properties inherited from UplinkLacpPolicy
Enabled, EnabledInherited, Mode, ModeInherited
Properties inherited from VDPortgroupPolicy
Uid, VDPortgroup


VDPortgroupUplinkTeamingPolicy

VDPortgroupUplinkTeamingPolicy - Object

Extends
VDPortgroupPolicy, UplinkTeamingPolicy

Properties

Name Type Notes
Properties inherited from VDPortgroupPolicy
Uid, VDPortgroup
Properties inherited from UplinkTeamingPolicy
NotifySwitches, NotifySwitchesInherited, LoadBalancingPolicy, LoadBalancingPolicyInherited, FailoverDetectionPolicy, ActiveUplinkPort, StandbyUplinkPort, UplinkPortOrderInherited, FailBack, FailBackInherited, UnusedUplinkPort, FailoverDetectionPolicyInherited


VDPortPolicy

VDPortPolicy - Object

Extended by
VDPortUplinkTeamingPolicy, VDPortUplinkLacpPolicy, VDPortTrafficShapingPolicy, VDPortBlockedPolicy
Extends
VDObjectCore

Properties

Name | Type | Notes
VDPort | VDPort |
Properties inherited from VDObjectCore
Uid


VDPortSecurityPolicy

VDPortSecurityPolicy - Object

Extends
SecurityPolicy, VDPortPolicy

Properties

Name | Type | Notes
Port | VDPort |
Properties inherited from VDPortPolicy
Uid
Properties inherited from SecurityPolicy
AllowPromiscuousInherited, ForgedTransmitsInherited, MacChangesInherited, AllowPromiscuous, ForgedTransmits, MacChanges


VDPortTrafficShapingPolicy

VDPortTrafficShapingPolicy - Object

Extends
VDPortPolicy, TrafficShapingPolicy

Properties

Name | Type | Notes
Port | VDPort |
Properties inherited from VDPortPolicy
Uid
Properties inherited from TrafficShapingPolicy
EnabledInherited, AverageBandwidthInherited, PeakBandwidthInherited, BurstSizeInherited, Direction, Enabled, AverageBandwidth, PeakBandwidth, BurstSize


VDPortUplinkLacpPolicy

VDPortUplinkLacpPolicy - Object

Extends
VDPortPolicy, UplinkLacpPolicy

Properties

Name Type Notes
Properties inherited from VDPortPolicy
Uid, VDPort
Properties inherited from UplinkLacpPolicy
Enabled, EnabledInherited, Mode, ModeInherited


VDPortUplinkTeamingPolicy

VDPortUplinkTeamingPolicy - Object

Extends
VDPortPolicy, UplinkTeamingPolicy

Properties

Name Type Notes
Properties inherited from VDPortPolicy
Uid, VDPort
Properties inherited from UplinkTeamingPolicy
NotifySwitches, NotifySwitchesInherited, LoadBalancingPolicy, LoadBalancingPolicyInherited, FailoverDetectionPolicy, ActiveUplinkPort, StandbyUplinkPort, UplinkPortOrderInherited, FailBack, FailBackInherited, UnusedUplinkPort, FailoverDetectionPolicyInherited


VDSwitch

VDSwitch - Object

Property of
VDSwitchUplinkTeamingPolicy, VDSwitchPrivateVlan, VDSwitchUplinkLacpPolicy, VDPortgroup, VDSwitchTrafficShapingPolicy, VDPort, VDSwitchPolicy, VDSwitchSecurityPolicy, VDSwitchBlockedPolicy
Parameter to
Remove-VDSwitchVMhost, Add-VDSwitchVMhost, Get-VDPortgroup, Set-VDSwitch, Remove-VDSwitch, Get-VDPort, Get-VDSwitchPrivateVlan, Set-VDVlanConfiguration, Get-VDBlockedPolicy, Get-VDSecurityPolicy, Get-VDTrafficShapingPolicy, Get-VDUplinkLacpPolicy, Get-VDUplinkTeamingPolicy, New-VDSwitchPrivateVlan
Returned by
New-VDSwitch, Get-VDSwitch, Set-VDSwitch, Set-VDVlanConfiguration
Extended by
VmwareVDSwitch
Extends
VDObject, ExtensionData, DistributedSwitch

Properties

Name | Type | Notes
Id | string |
Notes | string |
NumPorts | int |
Mtu | int |
Datacenter | Datacenter |
Key | string |
NumUplinkPorts | int |
ContactName | string |
ContactDetails | string |
Version | string |
Vendor | string |
Folder | Folder |
MaxPorts | int |
Properties inherited from VDObject
Uid, Name
Properties inherited from ExtensionData
ExtensionData


VDSwitchBlockedPolicy

VDSwitchBlockedPolicy - Object

Extends
VDSwitchPolicy, BlockedPolicy

Properties

Name Type Notes
Properties inherited from VDSwitchPolicy
Uid, VDSwitch
Properties inherited from BlockedPolicy
Blocked, BlockedInherited


VDSwitchPolicy

VDSwitchPolicy - Object

Extended by
VDSwitchUplinkTeamingPolicy, VDSwitchUplinkLacpPolicy, VDSwitchTrafficShapingPolicy, VDSwitchBlockedPolicy
Extends
VDObjectCore

Properties

Name | Type | Notes
VDSwitch | VDSwitch |
Properties inherited from VDObjectCore
Uid


VDSwitchPrivateVlan

VDSwitchPrivateVlan - Object

Parameter to
Remove-VDSwitchPrivateVlan
Returned by
Get-VDSwitchPrivateVlan, New-VDSwitchPrivateVlan
Extends
VDObjectCore

Properties

Name | Type | Notes
PrimaryVlanId | int |
PrivateVlanType | VDSwitchPrivateVlanType |
SecondaryVlanId | int |
VDSwitch | VDSwitch |
Properties inherited from VDObjectCore
Uid


VDSwitchRelatedObject

VDSwitchRelatedObject - Object

Extends
VDSwitchRelatedObjectBase

Properties

Name Type Notes

Methods

Methods defined in this object
ToVdSwitch

ToVdSwitch

Converts the specified object to zero, one or more VirtualDistributedSwtich objects.
Syntax
IEnumerable<VirtualDistributedSwitch> ToVdSwitch()
Return value
IEnumerable

Parameters

Name Type Description
none


VDSwitchRelatedObjectBase

VDSwitchRelatedObjectBase - Object

Parameter to
Get-VDSwitch
Extended by
VDSwitchRelatedObject
Extends

Properties

Name Type Notes


VDSwitchSecurityPolicy

VDSwitchSecurityPolicy - Object

Extends
SecurityPolicy, VDSwitchPolicy

Properties

Name Type Notes
Properties inherited from VDSwitchPolicy
Uid, VDSwitch
Properties inherited from SecurityPolicy
AllowPromiscuous, ForgedTransmits, MacChanges, AllowPromiscuousInherited, ForgedTransmitsInherited, MacChangesInherited


VDSwitchTrafficShapingPolicy

VDSwitchTrafficShapingPolicy - Object

Extends
VDSwitchPolicy, TrafficShapingPolicy

Properties

Name Type Notes
Properties inherited from VDSwitchPolicy
Uid, VDSwitch
Properties inherited from TrafficShapingPolicy
Direction, Enabled, AverageBandwidth, PeakBandwidth, BurstSize, EnabledInherited, AverageBandwidthInherited, PeakBandwidthInherited, BurstSizeInherited


VDSwitchUplinkLacpPolicy

VDSwitchUplinkLacpPolicy - Object

Extends
VDSwitchPolicy, UplinkLacpPolicy

Properties

Name Type Notes
Properties inherited from VDSwitchPolicy
Uid, VDSwitch
Properties inherited from UplinkLacpPolicy
Enabled, EnabledInherited, Mode, ModeInherited


VDSwitchUplinkTeamingPolicy

VDSwitchUplinkTeamingPolicy - Object

Extends
VDSwitchPolicy, UplinkTeamingPolicy

Properties

Name Type Notes
Properties inherited from VDSwitchPolicy
Uid, VDSwitch
Properties inherited from UplinkTeamingPolicy
NotifySwitches, NotifySwitchesInherited, LoadBalancingPolicy, LoadBalancingPolicyInherited, FailoverDetectionPolicy, ActiveUplinkPort, StandbyUplinkPort, UplinkPortOrderInherited, FailBack, FailBackInherited, UnusedUplinkPort, FailoverDetectionPolicyInherited


Versionable

Versionable - Object

Properties

Name | Type | Notes
Id | String |
Version | UInt64 |


VIAccount

VIAccount - Object

Parameter to
New-VIPermission, Get-VIPermission
Returned by
Get-VIAccount
Extended by
VIGroupAccount, HostAccount, VIUserAccount
Extends
ExtensionData

Properties

Name | Type | Notes
Id | String |
Server | VIServer |
Uid | String |
Name | String |
Domain | String |
Description | String |
Properties inherited from ExtensionData
ExtensionData


VIAutomation

VIAutomation - Object

Property of
TrapTarget

Properties

Name | Type | Notes
MoCacheService | MoCacheService |
MoService | MoService |
TaskService | TaskService |
VmService | VmService |
VappService | VappService |
VmGuestService | VmGuestService |
ComputeResourceService | ComputeResourceService |
InventoryService | InventoryService |
DatastoreService | DatastoreService |
RuntimeDataService | RuntimeDataService |
StorageService | StorageService |
SystemManagementService | SystemManagementService |
ConnectivityService | ConnectivityService |
VirtualDeviceService | VirtualDeviceService |
VirtualNetworkService | VirtualNetworkService |
ServerUri | String |
ErrorService | ErrorService |
ConnectionId | String |
RefCount | Int32 |


VIConnection

VIConnection - Object

Extended by
CIServer
Extends
VIObject

Properties

Name | Type | Notes
Id | String |
Name | String |
Uid | String |
ServiceUri | Uri |
SessionSecret | String |
User | String |
IsConnected | bool |


VIContainer

VIContainer - Object

Parameter to
Get-ResourcePool, New-Folder, Add-VMHost, Get-VM, Get-Datacenter, Get-Cluster, Get-VMHost, Move-ResourcePool, Get-Folder, Import-VApp, New-VM, New-Cluster, Move-Datacenter, Move-VMHost, Move-VM, Move-Folder, Get-Template, Move-Cluster, Move-Template, Get-VApp, Get-Inventory, New-Template, New-Datacenter, New-VApp, New-ResourcePool, Move-Inventory, Move-VApp, Get-DatastoreCluster, New-DatastoreCluster
Extended by
FolderContainer, ResourcePool, VApp, VMHost, Cluster
Extends
InventoryItem

Properties

Name Type Notes
Properties inherited from InventoryItem
CustomFields, Id, Name, Uid, ExtensionData, Client


VICredentialStoreItem

VICredentialStoreItem - Object

Parameter to
Remove-VICredentialStoreItem
Returned by
New-VICredentialStoreItem, Get-VICredentialStoreItem

Properties

Name | Type | Notes
Host | String |
User | String |
Password | String |
File | String |


ViewBaseMirroredObject

ViewBaseMirroredObject - Object

Parameter to
Get-View

Properties

Name Type Notes

Methods

Methods defined in this object
GetVIView

GetVIView

Returns the View(s) related to this object.
Syntax
object GetVIView()
Return value
object

Parameters

Name | Type | Description
properties | string[] | List of properties to retrieve for the View. If null - all properties are retrieved.


VIGroupAccount

VIGroupAccount - Object

Extends
VIAccount

Properties

Name Type Notes
Properties inherited from VIAccount
Id, Server, Description, Name, Uid, Domain, ExtensionData


VIObject

VIObject - Object

Property of
ScsiController, SdrsRecommendation, DrsRecommendation, FloppyDrive, CDDrive, Log, Sample, AlarmDefinition, TagAssignment, AdvancedSetting, Permission, NetworkAdapter, LongSample, HardDisk, UsbDevice, RawHardDisk, VirtualDevice, ResourceSchedulingRecommendation, FloatSample, FlatHardDisk
Parameter to
Get-VIEvent, New-VIPermission, Get-VIPermission, Get-View, Get-Stat, Get-Datastore, Get-AlarmDefinition, Get-AdvancedSetting, New-AdvancedSetting, Move-Datastore, Get-TagAssignment, New-TagAssignment, Remove-TagAssignment
Returned by
Get-VIObjectByVIView
Extended by
Task, AlarmDefinition, VMHostAuthentication, InventoryItem, AdvancedSetting, TagCategory, VMHostNetworkInfo, OSCustomizationSpec, VMHostProfile, Tag, VIConnection, StorageResource, VirtualDevice, VirtualSwitchBase, VMHostStorageInfo, Snapshot
Extends
VIObjectCore

Properties

Name | Type | Notes
Id | String |
Name | String |
Client | Object | Deprecated. PowerCLI scripts should not use this property. The property will be removed in a future release.
Properties inherited from VIObjectCore
Uid


VIObjectCore

VIObjectCore - Object

Extended by
Action, TagAssignment, VIObject, HostNic, AlarmActionTrigger, VMScriptResult

Properties

Name | Type | Notes
Uid | String |


VIProperty

VIProperty - Object

Parameter to
Remove-VIProperty
Returned by
New-VIProperty, Get-VIProperty

Properties

Name | Type | Notes
Name | String |
RetrievingType | String |
DeclaringType | String |
Value | String |


VirtualDevice

VirtualDevice - Object

Extended by
ScsiController, FloppyDrive, CDDrive, NetworkAdapter, HardDisk, UsbDevice
Extends
VIObject, ExtensionData

Properties

Name | Type | Notes
ParentId | String |
ConnectionState | ConnectInfo |
Parent | VIObject |
Properties inherited from VIObject
Id, Name, Uid, Client
Properties inherited from ExtensionData
ExtensionData


VirtualDiskStorageFormat

VirtualDiskStorageFormat - Enum

Property of
FlatHardDisk
Parameter to
Copy-HardDisk, Import-VApp, Set-HardDisk, New-VM, New-HardDisk, Move-VM, New-Template, Move-HardDisk

Enum Constants

Name
Thin2GB
Thick
Thick2GB
Thin
EagerZeroedThick


VirtualMachine

VirtualMachine - Object

Property of
VMResourceConfiguration, SdrsVMAntiAffinityRule, PassthroughDevice, ScsiPassthroughDevice, VMGuestNetworkInterface, VMGuestRoute, VMQuestion, VMGuest, Snapshot, VMStartPolicy, VMScriptResult, PciPassthroughDevice
Parameter to
Get-ResourcePool, Get-FloppyDrive, Get-VMResourceConfiguration, Get-PassthroughDevice, Export-VApp, Get-CDDrive, Get-Datacenter, Get-Cluster, Get-VMGuest, Remove-VM, Get-VMHost, Get-UsbDevice, Stop-VM, Mount-Tools, New-CDDrive, Restart-VMGuest, Set-HardDisk, Set-VM, New-VM, Get-HardDisk, Get-NetworkAdapter, Update-Tools, Get-VMStartPolicy, Dismount-Tools, Copy-VMGuestFile, Set-DrsRule, New-HardDisk, New-FloppyDrive, Get-VMGuestRoute, Get-DrsRule, Move-VM, New-NetworkAdapter, Add-PassthroughDevice, Start-VM, Get-Snapshot, Get-VMQuestion, New-Template, Restart-VM, Get-VirtualSwitch, Invoke-VMScript, Get-VirtualPortGroup, Suspend-VM, New-Snapshot, New-DrsRule, Get-VMGuestNetworkInterface, Suspend-VMGuest, Shutdown-VMGuest, New-VMGuestRoute, Wait-Tools, Get-ScsiController, Get-DatastoreCluster
Returned by
Restart-VM, Move-VM, Suspend-VM, New-VM, Start-VM, Get-VM, Set-VM, Stop-VM, Wait-Tools, Import-VApp
Extends
InventoryItem, DatastoreUser, DatastoreRelatedObjectBase, RemoteConsoleVM

Properties

Name | Type | Notes
PowerState | PowerState |
Version | VMVersion |
Description | String | Deprecated. As of PowerCLI 5.0 use Notes property instead.
Notes | String |
Guest | VMGuest |
NumCpu | Int32 |
MemoryMB | Decimal |
HardDisks | HardDisk[] | Deprecated. As of PowerCLI 5.0 use Get-HardDisk cmdlet instead.
NetworkAdapters | NetworkAdapter[] | Deprecated. As of PowerCLI 5.0 use Get-NetworkAdapter cmdlet instead.
UsbDevices | UsbDevice[] | Deprecated. As of PowerCLI 5.0 use Get-UsbDevice cmdlet instead.
CDDrives | CDDrive[] | Deprecated. As of PowerCLI 5.0 use Get-CDDrive cmdlet instead.
FloppyDrives | FloppyDrive[] | Deprecated. As of PowerCLI 5.0 use Get-FloppyDrive cmdlet instead.
Host | VMHost | Deprecated. As of PowerCLI 5.0 use VMHost property instead.
HostId | String | Deprecated. As of PowerCLI 5.0 use VMHostId property instead.
VMHostId | String |
VMHost | VMHost |
VApp | VApp |
FolderId | String |
Folder | Folder |
ResourcePoolId | String |
ResourcePool | ResourcePool |
PersistentId | string |
UsedSpaceGB | Decimal |
ProvisionedSpaceGB | Decimal |
HARestartPriority | HARestartPriority? |
HAIsolationResponse | HAIsolationResponse? |
DrsAutomationLevel | DrsAutomationLevel? |
VMSwapfilePolicy | VMSwapfilePolicy? |
VMResourceConfiguration | VMResourceConfiguration |
MemoryGB | Decimal |
Properties inherited from InventoryItem
CustomFields, ExtensionData, Id, Name, Uid, Client
Properties inherited from DatastoreUser
DatastoreIdList


VirtualNetworkAdapterType

VirtualNetworkAdapterType - Enum

Property of
NetworkAdapter
Parameter to
Set-NetworkAdapter, New-NetworkAdapter

Enum Constants

Name
Unknown
e1000
Flexible
Vmxnet
EnhancedVmxnet
Vmxnet3


VirtualPortGroup

VirtualPortGroup - Object

Property of
NicTeamingVirtualPortGroupPolicy
Parameter to
Set-VirtualPortGroup, Remove-VirtualPortGroup, Get-NicTeamingPolicy
Returned by
New-VirtualPortGroup, Set-VirtualPortGroup
Extends
VirtualPortGroupBase

Properties

Name | Type | Notes
VirtualSwitchId | String |
VirtualSwitchUid | String |
Port | PortGroupPort[] |
VLanId | Int32 |
VirtualSwitchName | String |
VMHostId | String | Deprecated. As of PowerCLI 5.0 use VirtualSwitch.VMHostId property instead.
VMHostUid | String |
Uid | String |
Properties inherited from VirtualPortGroupBase
Name, VirtualSwitch, Key, ExtensionData


VirtualPortGroupBase

VirtualPortGroupBase - Object

Parameter to
Set-NetworkAdapter, New-VM, New-NetworkAdapter
Returned by
Get-VirtualPortGroup
Extended by
VirtualPortgroupBaseInterop, DistributedPortGroup, VirtualPortGroup
Extends
ExtensionData

Properties

Name | Type | Notes
Name | String |
VirtualSwitch | VirtualSwitchBase |
Key | String |
Properties inherited from ExtensionData
ExtensionData


VirtualPortgroupBaseInterop

VirtualPortgroupBaseInterop - Object

Extends
VirtualPortGroupBase, VmRelatedObject, NetworkAdapterRelatedObject

Properties

Name Type Notes

Methods

Methods defined in this object
AttachNetworkAdapter

AttachNetworkAdapter

Attaches a network adapter to a virtual portgroup.
Syntax
TaskInterop AttachNetworkAdapter()
Return value
TaskInterop

Parameters

Name | Type | Description
networkAdapter | NetworkAdapter | The network adapter to be attached.


VirtualPortGroupRelatedObject

VirtualPortGroupRelatedObject - Object

Extends
VirtualPortGroupRelatedObjectBase

Properties

Name Type Notes

Methods

Methods defined in this object
ToVirtualPortGroup

ToVirtualPortGroup

Converts the specified object to zero, one or more VirtualPortGroupBase objects.
Syntax
IEnumerable<VirtualPortGroupBase> ToVirtualPortGroup()
Return value
IEnumerable

Parameters

Name Type Description
none


VirtualPortGroupRelatedObjectBase

VirtualPortGroupRelatedObjectBase - Object

Parameter to
Get-VirtualPortGroup
Extended by
VirtualPortGroupRelatedObject

Properties

Name Type Notes


VirtualSwitch

VirtualSwitch - Object

Property of
VMHostNetworkInfo, NicTeamingVirtualSwitchPolicy
Parameter to
New-VirtualPortGroup, Set-VirtualSwitch, Remove-VirtualSwitch, Get-NicTeamingPolicy
Returned by
Set-VirtualSwitch, New-VirtualSwitch
Extends
VirtualSwitchBase

Properties

Name | Type | Notes
Key | String |
NumPortsAvailable | Int32 |
Nic | String[] |
VMHostId | String |
VMHost | VMHost |
VMHostUid | String |
Uid | String |
Properties inherited from VirtualSwitchBase
Id, Name, NumPorts, Mtu, ExtensionData, Client


VirtualSwitchBase

VirtualSwitchBase - Object

Property of
DistributedPortGroup, VirtualPortGroup, VirtualPortGroupBase
Parameter to
New-VMHostNetworkAdapter, Get-VirtualPortGroup
Returned by
Get-VirtualSwitch
Extended by
DistributedSwitch, VirtualSwitch
Extends
VIObject, ExtensionData

Properties

Name | Type | Notes
NumPorts | Int32 |
Mtu | Int32 |
Properties inherited from VIObject
Name, Id, Client
Properties inherited from ExtensionData
ExtensionData


VirtualSwitchRelatedObject

VirtualSwitchRelatedObject - Object

Extends
VirtualSwitchRelatedObjectBase

Properties

Name Type Notes

Methods

Methods defined in this object
ToVirtualSwitch

ToVirtualSwitch

Converts the specified object to zero, one or more VirtualSwitchBase objects.
Syntax
IEnumerable<VirtualSwitchBase> ToVirtualSwitch()
Return value
IEnumerable

Parameters

Name Type Description
none


VirtualSwitchRelatedObjectBase

VirtualSwitchRelatedObjectBase - Object

Parameter to
Get-VirtualSwitch
Extended by
VirtualSwitchRelatedObject

Properties

Name Type Notes


VIServer

VIServer - Object

Property of
Log, Counter, StatInterval, Privilege, HostUserAccount, PrivilegeGroup, CustomAttribute, VIGroupAccount, VmHostModule, HostGroupAccount, Role, HostAccount, OSCustomizationSpec, VMHostProfile, VIUserAccount, TopologyInfo, VIAccount, PrivilegeItem, CounterValue
Parameter to
Remove-Folder, Get-ResourcePool, Get-FloppyDrive, Start-VMHost, Set-OSCustomizationSpec, Restart-VMHost, New-IScsiHbaTarget, Get-VMHostHba, Get-VMResourceConfiguration, Get-VIEvent, New-VIPermission, Get-VIPermission, Get-View, Disconnect-VIServer, Set-OSCustomizationNicMapping, New-Folder, Remove-VIRole, New-VMHostNetworkAdapter, Get-VMHostSnmp, Get-PassthroughDevice, Export-VApp, Add-VMHost, Get-VM, Get-CDDrive, Get-Datacenter, Get-Cluster, Set-Cluster, Remove-Datastore, Remove-Inventory, New-VirtualPortGroup, Remove-IScsiHbaTarget, Set-VMHostProfile, Get-ScsiLun, Export-VMHostProfile, Get-VMGuest, Remove-VM, Get-VMHost, Set-ResourcePool, Get-UsbDevice, Move-ResourcePool, Set-Template, Get-VMHostAvailableTimeZone, Set-VIPermission, Stop-VM, Remove-ResourcePool, Get-Folder, Set-VApp, Mount-Tools, Set-VirtualSwitch, New-CDDrive, New-OSCustomizationSpec, Restart-VMGuest, Get-VIPrivilege, Import-VApp, Get-VMHostSysLogServer, Get-LogType, Remove-CustomAttribute, Set-NetworkAdapter, Set-HardDisk, Remove-VMHostNtpServer, Set-VMHostAccount, New-VMHostProfile, Get-VMHostService, Set-VM, New-VM, Get-HardDisk, New-VIRole, Import-VMHostProfile, Add-VmHostNtpServer, Get-DrsRecommendation, Get-NetworkAdapter, Update-Tools, Suspend-VMHost, Stop-VMHost, Remove-Datacenter, New-Cluster, New-VirtualSwitch, Get-VMStartPolicy, Set-Annotation, Get-VIObjectByVIView, Dismount-Tools, Copy-VMGuestFile, Set-DrsRule, New-HardDisk, New-FloppyDrive, Get-Stat, Remove-Template, Remove-Cluster, Move-Datacenter, Set-VMHost, Move-VMHost, Set-VMHostAdvancedConfiguration, Get-VMHostFirewallException, Get-VMHostFirewallDefaultPolicy, Get-VMGuestRoute, Get-DrsRule, Move-VM, Move-Folder, New-NetworkAdapter, Get-Template, Move-Cluster, Set-Datastore, Get-VIRole, Move-Template, New-VMHostAccount, Get-VMHostStartPolicy, Get-VMHostProfile, Get-VMHostDiagnosticPartition, Get-VMHostNetworkAdapter, Add-PassthroughDevice, Start-VM, Set-Folder, Remove-OSCustomizationSpec, Set-CustomAttribute, New-StatInterval, New-OSCustomizationNicMapping, Set-VMHostFirmware, Remove-VMHostProfile, Get-StatInterval, Install-VMHostPatch, Get-VApp, Get-Snapshot, Get-Log, Set-VMHostSysLogServer, Get-VMHostAdvancedConfiguration, Get-VMQuestion, Get-Datastore, Get-Inventory, Get-Annotation, Get-CustomAttribute, New-Template, Restart-VM, Set-IScsiHbaTarget, New-Datastore, Get-VMHostStorage, Get-VMHostNetwork, Get-VMHostFirmware, Get-VirtualSwitch, Get-OSCustomizationSpec, Set-StatInterval, Remove-VApp, Invoke-VMScript, Test-VMHostProfileCompliance, Remove-VirtualSwitch, Get-VirtualPortGroup, Get-NicTeamingPolicy, New-CustomAttribute, Suspend-VM, New-Snapshot, Start-VApp, New-Datacenter, New-VApp, New-DrsRule, Set-VMHostHba, Get-IScsiHbaTarget, Get-VMHostModule, Get-VMHostAccount, Get-VIAccount, Apply-VMHostProfile, Get-VMGuestNetworkInterface, Get-StatType, Remove-VMHost, Get-OSCustomizationNicMapping, New-ResourcePool, Suspend-VMGuest, Stop-VApp, Shutdown-VMGuest, Set-Datacenter, Remove-StatInterval, Set-VIRole, New-VMGuestRoute, Move-Inventory, Remove-VMHostAccount, Get-VMHostNtpServer, Get-VMHostRoute, New-VMHostRoute, Get-VMHostPatch, Get-AlarmDefinition, Get-AlarmAction, New-AlarmAction, Set-AlarmDefinition, Get-Esxtop, Wait-Tools, Get-HAPrimaryVMHost, Get-ScsiController, Get-VMHostDisk, Get-VMHostDiskPartition, Get-AdvancedSetting, New-AdvancedSetting, Get-EsxCli, Move-VApp, Get-VMHostProfileRequiredInput, Get-VMHostAuthentication, Get-DatastoreCluster, Move-Datastore, New-DatastoreCluster, Remove-DatastoreCluster, Set-DatastoreCluster, Move-HardDisk, Open-VMConsoleWindow, Get-Tag, Get-TagAssignment, New-TagAssignment
Returned by
Connect-VIServer
Extends
VIConnection, ExtensionData

Properties

Name | Type | Notes
Port | Int32 |
SessionId | String |
Version | String |
Build | String |
ProductLine | String |
RefCount | Int32 |
InstanceUuid | String |
Properties inherited from VIConnection
IsConnected, Id, ServiceUri, SessionSecret, Name, User, Uid, Client
Properties inherited from ExtensionData
ExtensionData


VIUserAccount

VIUserAccount - Object

Extends
VIAccount

Properties

Name Type Notes
Properties inherited from VIAccount
Id, Server, Description, Name, Uid, Domain, ExtensionData


VlanConfiguration

VlanConfiguration - Object

Property of
VmwareVDSwitch, VDPort, VmwareVDPortgroup
Extended by
SingleVlanConfiguration, PrivateVlanConfiguration, VlanTrunkConfiguration

Properties

Name | Type | Notes
VlanType | VlanType |


VlanRange

VlanRange - Object

Properties

Name | Type | Notes
StartVlanId | int |
EndVlanId | int |


VlanRangeList

VlanRangeList - Object

Property of
VlanTrunkConfiguration
Parameter to
New-VDPortgroup, Set-VDPortgroup, Set-VDVlanConfiguration
Extends
IList

Properties

Name Type Notes


VlanTrunkConfiguration

VlanTrunkConfiguration - Object

Extends
VlanConfiguration

Properties

Name | Type | Notes
Ranges | VlanRangeList |


VlanType

VlanType - Enum

Property of
SingleVlanConfiguration, PrivateVlanConfiguration, VlanConfiguration

Enum Constants

Name
None
Trunk
Vlan
Unknown
PrivateVlan


VMDiskResourceConfiguration

VMDiskResourceConfiguration - Object

Property of
VMResourceConfiguration

Properties

Name | Type | Notes
Key | Int32 |
NumDiskShares | Int32 |
DiskSharesLevel | SharesLevel |
DiskLimitIOPerSecond | Int64? |


VmfsDatastore

VmfsDatastore - Object

Extends
Datastore

Properties

Name | Type | Notes
FileSystemVersion | String |
Properties inherited from Datastore
DatacenterId, Datacenter, ParentFolderId, ParentFolder, DatastoreBrowserPath, FreeSpaceMB, CapacityMB, Accessible, Type, ExtensionData, Id, Name, Uid, StorageIOControlEnabled, CongestionThresholdMillisecond, FreeSpaceGB, CapacityGB, State, Client


VMGuest

VMGuest - Object

Property of
VirtualMachine
Parameter to
Mount-Tools, Restart-VMGuest, Update-Tools, Dismount-Tools, Get-VMGuestRoute, Get-VMGuestNetworkInterface, Suspend-VMGuest, Shutdown-VMGuest, New-VMGuestRoute, Wait-Tools
Returned by
Shutdown-VMGuest, Suspend-VMGuest, Restart-VMGuest, Get-VMGuest, Wait-Tools
Extends
ExtensionData

Properties

Name | Type | Notes
OSFullName | String |
IPAddress | String[] |
State | GuestState |
Disks | DiskInfo[] |
HostName | String |
Nics | NicInfo[] |
ScreenDimensions | Size? |
VmId | String |
VM | VirtualMachine |
VmUid | String |
VmName | String |
Uid | String |
GuestId | String |
Properties inherited from ExtensionData
ExtensionData


VMGuestNetworkInterface

VMGuestNetworkInterface - Object

Parameter to
Set-VMGuestNetworkInterface
Returned by
Set-VMGuestNetworkInterface, Get-VMGuestNetworkInterface

Properties

Name | Type | Notes
VMId | String |
VM | VirtualMachine |
NetworkAdapter | NetworkAdapter |
SubnetMask | String |
NicId | String | Deprecated. As of PowerCLI 5.0 use NetworkAdapterId property instead.
Name | String |
IPPolicy | DhcpPolicy |
Ip | String |
Dns | String[] |
DefaultGateway | String |
Description | String |
Mac | String |
RouteInterfaceId | String |
Uid | String |
DnsPolicy | DhcpPolicy? |
WinsPolicy | DhcpPolicy? |
Wins | String[] |
NetworkAdapterId | String |


VMGuestRoute

VMGuestRoute - Object

Parameter to
Remove-VMGuestRoute
Returned by
Get-VMGuestRoute, New-VMGuestRoute

Properties

Name | Type | Notes
Destination | String |
Gateway | String |
Interface | String |
Netmask | String |
VMId | String |
VM | VirtualMachine |
Persistent | Boolean? |
Uid | String |


VMHost

VMHost - Object

Property of
VMHostProfileInput, HostVMKernelVirtualNic, EsxCli, VirtualMachine, VMHostFirewallDefaultPolicy, Log, VMHostPatchResult, HostService, VMHostAuthentication, VmHostSnmp, DiagnosticBundle, VMHostDisk, PassthroughDevice, ScsiPassthroughDevice, FibreChannelHba, HostFirmware, Hba, HostVirtualNic, VMHostDiagnosticPartition, VirtualSwitch, VmHostModule, VMHostNetworkInfo, HostNic, IScsiHba, VMHostProfile, VMHostPatch, HostConsoleVirtualNic, ScsiLun, VMHostTimeZone, VMHostRoute, VMHostStorageInfo, HostFirmwareBundle, PhysicalNic, VMHostFirewallException, NicTeamingPolicy, VMHostProfileIncompliance, PciPassthroughDevice
Parameter to
Start-VMHost, Restart-VMHost, Get-VMHostHba, New-VMHostNetworkAdapter, Get-PassthroughDevice, Get-Datacenter, Get-Cluster, Remove-Datastore, Set-VMHostProfile, Get-ScsiLun, Get-VMHostAvailableTimeZone, Import-VApp, Get-VMHostSysLogServer, Get-LogType, Remove-VMHostNtpServer, New-VMHostProfile, Get-VMHostService, New-VM, Import-VMHostProfile, Add-VmHostNtpServer, Suspend-VMHost, Stop-VMHost, New-VirtualSwitch, Get-VMStartPolicy, Set-VMHost, Move-VMHost, Set-VMHostAdvancedConfiguration, Get-VMHostFirewallException, Get-VMHostFirewallDefaultPolicy, Get-DrsRule, Get-VMHostStartPolicy, Get-VMHostProfile, Get-VMHostDiagnosticPartition, Get-VMHostNetworkAdapter, Set-VMHostFirmware, Install-VMHostPatch, Get-Log, Set-VMHostSysLogServer, Get-VMHostAdvancedConfiguration, New-Template, New-Datastore, Get-VMHostStorage, Get-VMHostNetwork, Get-VMHostFirmware, Get-VirtualSwitch, Test-VMHostProfileCompliance, Get-VirtualPortGroup, New-VApp, Get-VMHostModule, Remove-VMHost, Get-VMHostNtpServer, Get-VMHostRoute, New-VMHostRoute, Get-VMHostPatch, Get-VMHostDisk, Get-EsxCli, Get-VMHostProfileRequiredInput, Get-VMHostAuthentication
Returned by
Start-VMHost, Add-VMHost, Set-VMHost, Suspend-VMHost, Stop-VMHost, Restart-VMHost, Get-VMHost, Move-VMHost, Get-HAPrimaryVMHost
Extends
VIContainer, DatastoreRelatedObjectBase

Properties

Name | Type | Notes
State | VMHostState | Deprecated. As of PowerCLI 5.0 use ConnectionState property instead.
ConnectionState | VMHostState |
PowerState | VMHostPowerState |
VMSwapfileDatastoreId | String |
VMSwapfilePolicy | VMSwapfilePolicy? |
ParentId | String |
IsStandalone | Boolean |
Manufacturer | String |
Model | String |
NumCpu | Int32 |
CpuTotalMhz | Int32 |
CpuUsageMhz | Int32 |
MemoryTotalMB | Decimal |
MemoryUsageMB | Decimal |
ProcessorType | String |
HyperthreadingActive | Boolean |
TimeZone | VMHostTimeZone |
Version | String |
Build | String |
Parent | InvenrotyItem |
VMSwapfileDatastore | Datastore |
StorageInfo | VMHostStorageInfo |
NetworkInfo | VMHostNetworkInfo |
DiagnosticPartition | VMHostDiagnosticPartition |
FirewallDefaultPolicy | VMHostFirewallDefaultPolicy |
ApiVersion | String |
MemoryUsageGB | Decimal |
MemoryTotalGB | Decimal |
DatastoreIdList | String[] | Deprecated. PowerCLI scripts should not use this property. The property will be removed in a future release.
LicenseKey | String |
Properties inherited from VIContainer
CustomFields, ExtensionData, Id, Name, Uid, Client


VMHostAuthentication

VMHostAuthentication - Object

Parameter to
Set-VMHostAuthentication
Returned by
Get-VMHostAuthentication, Set-VMHostAuthentication
Extends
VIObject, ExtensionData

Properties

Name | Type | Notes
VMHost | VMHost |
Domain | String |
TrustedDomains | String[] |
DomainMembershipStatus | DomainMembershipStatus? |
Properties inherited from VIObject
Id, Uid, Client
Properties inherited from ExtensionData
ExtensionData


VMHostDiagnosticPartition

VMHostDiagnosticPartition - Object

Property of
VMHost
Parameter to
Set-VMHostDiagnosticPartition
Returned by
Get-VMHostDiagnosticPartition, Set-VMHostDiagnosticPartition
Extends
ExtensionData

Properties

Name | Type | Notes
HostId | String | Deprecated. As of PowerCLI 5.0 use VMHostId property instead.
VMHostId | String |
VMHost | VMHost |
HostUid | String |
CanonicalName | String |
DiagnosticType | String |
SlotCount | Int32 |
StorageType | String |
Active | Boolean |
Uid | String |
Properties inherited from ExtensionData
ExtensionData


VMHostDisk

VMHostDisk - Object

Property of
VMHostDiskPartition
Returned by
Get-VMHostDisk

Properties

Name | Type | Notes
DeviceName | String |
Cylinders | long |
Heads | int |
Sectors | int |
TotalSectors | long |
VMHost | VMHost |
Id | String |
Uid | String |
ScsiLun | ScsiLun |
ExtensionData | Object |


VMHostDiskPartition

VMHostDiskPartition - Object

Parameter to
Format-VMHostDiskPartition
Returned by
Get-VMHostDiskPartition

Properties

Name | Type | Notes
PartitionNumber | int |
Attributes | sbyte |
Logical | bool |
StartSector | long |
EndSector | long |
Type | HostDiskPartitionType |
VMHostDisk | VMHostDisk |
Id | String |
Uid | String |
ExtensionData | Object |


VMHostDiskPartitionType

VMHostDiskPartitionType - Enum

Enum Constants

Name
None
Extended
LinuxNative
LinuxSwap
Ntfs
Vmfs
VmkDiagnostic
Unknown


VMHostFirewallDefaultPolicy

VMHostFirewallDefaultPolicy - Object

Property of
VMHost
Parameter to
Set-VMHostFirewallDefaultPolicy
Returned by
Set-VMHostFirewallDefaultPolicy, Get-VMHostFirewallDefaultPolicy
Extends
ExtensionData

Properties

Name | Type | Notes
VMHostId | String |
IncomingEnabled | Boolean |
OutgoingEnabled | Boolean |
VMHost | VMHost |
Uid | String |
Properties inherited from ExtensionData
ExtensionData


VMHostFirewallException

VMHostFirewallException - Object

Parameter to
Set-VMHostFirewallException
Returned by
Set-VMHostFirewallException, Get-VMHostFirewallException
Extends
ExtensionData

Properties

Name | Type | Notes
VMHostId | String |
Name | String |
Enabled | Boolean |
IncomingPorts | String |
OutgoingPorts | String |
Protocols | String |
ServiceRunning | Boolean? |
VMHost | VMHost |
Uid | String |
Properties inherited from ExtensionData
ExtensionData


VmHostModule

VmHostModule - Object

Parameter to
Set-VMHostModule
Returned by
Get-VMHostModule, Set-VMHostModule

Properties

Name | Type | Notes
ServerId | String | Deprecated. As of PowerCLI 5.0 use VMHost property instead.
Server | VIServer | Deprecated. As of PowerCLI 5.0 use VMHost property instead.
Name | String |
Options | String |
Uid | String |
VMHost | VMHost |


VMHostNetworkInfo

VMHostNetworkInfo - Object

Property of
VMHost
Parameter to
Set-VMHostNetwork
Returned by
Get-VMHostNetwork, Set-VMHostNetwork
Extends
VIObject, ExtensionData

Properties

Name | Type | Notes
VMHostId | String |
VMHost | VMHost |
VMKernelGateway | String |
VMKernelGatewayDevice | String | Deprecated. This parameter is deprecated and scheduled for removal.
ConsoleGateway | String |
ConsoleGatewayDevice | String |
DnsAddress | String[] |
DnsFromDhcp | Boolean |
DnsDhcpDevice | String |
DomainName | String |
HostName | String |
SearchDomain | String[] |
VirtualSwitch | VirtualSwitch[] | Deprecated. As of PowerCLI 5.0 use Get-VirtualSwitch cmdlet instead.
PhysicalNic | PhysicalNic[] | Deprecated. As of PowerCLI 5.0 use Get-VMHostNetworkAdapter cmdlet instead.
ConsoleNic | HostVirtualNic[] | Deprecated. As of PowerCLI 5.0 use Get-VMHostNetworkAdapter cmdlet instead.
VirtualNic | HostVirtualNic[] | Deprecated. As of PowerCLI 5.0 use Get-VMHostNetworkAdapter cmdlet instead.
IPv6Enabled | Boolean? |
ConsoleV6Gateway | String |
ConsoleV6GatewayDevice | String |
VMKernelV6Gateway | String |
VMKernelV6GatewayDevice | String |
ExtensionData2 | object |
Properties inherited from VIObject
Uid, Client
Properties inherited from ExtensionData
ExtensionData


VMHostPatch

VMHostPatch - Object

Returned by
Get-VMHostPatch

Properties

Name | Type | Notes
Id | String |
VMHostId | String |
VMHost | VMHost |
InstallDate | DateTime? |
Description | String |
Uid | String |


VMHostPatchResult

VMHostPatchResult - Object

Returned by
Install-VMHostPatch

Properties

Name | Type | Notes
Id | String |
VMHostId | String |
VMHost | VMHost |
IsApplicable | Boolean |
IsInstalled | Boolean |
NeedsReconnect | Boolean |
NeedsRestart | Boolean |
Uid | String |


VMHostPowerState

VMHostPowerState - Enum

Property of
VMHost

Enum Constants

Name
PoweredOff
PoweredOn
StandBy
Unknown


VMHostProfile

VMHostProfile - Object

Property of
VMHostProfileInput, VMHostProfileIncompliance
Parameter to
Set-Cluster, Set-VMHostProfile, Export-VMHostProfile, Set-VMHost, Remove-VMHostProfile, Test-VMHostProfileCompliance, Apply-VMHostProfile, Get-VMHostProfileRequiredInput
Returned by
Get-VMHostProfile, New-VMHostProfile, Import-VMHostProfile, Set-VMHostProfile
Extends
VIObject, ExtensionData

Properties

Name | Type | Notes
ServerId | String |
Server | VIServer |
Description | String |
ReferenceHostId | String |
ReferenceHost | VMHost |
Properties inherited from VIObject
Id, Name, Uid, Client
Properties inherited from ExtensionData
ExtensionData


VMHostProfileComplianceStatus

VMHostProfileComplianceStatus - Enum

Enum Constants

Name
Compliant
NonCompliant
Unknown


VMHostProfileIncompliance

VMHostProfileIncompliance - Object

Returned by
Test-VMHostProfileCompliance
Extends
ExtensionData

Properties

Name | Type | Notes
VMHostId | String |
VMHost | VMHost |
VMHostUid | String |
VMHostProfileId | String |
VMHostProfile | VMHostProfile |
VMHostProfileUid | String |
IncomplianceElementList | VMHostProfileIncomplianceElement[] |
Uid | String |
Properties inherited from ExtensionData
ExtensionData


VMHostProfileIncomplianceElement

VMHostProfileIncomplianceElement - Object

Property of
VMHostProfileIncompliance

Properties

Name | Type | Notes
PropertyName | String |
Description | String |


VMHostProfileInput

VMHostProfileInput - Object

Returned by
Get-VMHostProfileRequiredInput

Properties

Name | Type | Notes
Key | String |
Type | VMHostProfileInputType |
VMHostProfile | VMHostProfile |
VMHost | VMHost |


VMHostProfileInputType

VMHostProfileInputType - Enum

Property of
VMHostProfileInput

Enum Constants

Name
Required
Inapplicable


VMHostRoute

VMHostRoute - Object

Parameter to
Set-VMHostRoute, Remove-VMHostRoute
Returned by
New-VMHostRoute, Set-VMHostRoute, Get-VMHostRoute
Extends
ExtensionData

Properties

Name | Type | Notes
Destination | IPAddress |
Gateway | IPAddress |
PrefixLength | Int32 |
IPVersion | IPVersion |
VMHostId | String |
Uid | String |
VMHost | VMHost |
Properties inherited from ExtensionData
ExtensionData


VmHostSnmp

VmHostSnmp - Object

Parameter to
Test-VMHostSnmp, Set-VMHostSnmp
Returned by
Set-VMHostSnmp, Get-VMHostSnmp, Test-VMHostSnmp
Extends
ExtensionData

Properties

Name | Type | Notes
Enabled | Boolean |
Port | Int32 |
ReadOnlyCommunities | String[] |
VmHostId | String |
VMHost | VMHost |
VmHostUid | String |
TrapTargets | TrapTarget[] |
Uid | String |
Properties inherited from ExtensionData
ExtensionData


VMHostStartPolicy

VMHostStartPolicy - Object

Parameter to
Set-VMHostStartPolicy
Returned by
Set-VMHostStartPolicy, Get-VMHostStartPolicy
Extends
StartPolicy

Properties

Name | Type | Notes
VMHostId | String |
VMHostUid | String |
Enabled | Boolean |
Uid | string |
Properties inherited from StartPolicy
StartDelay, StopAction, StopDelay, WaitForHeartbeat, ExtensionData


VMHostState

VMHostState - Enum

Property of
VMHost
Parameter to
Get-VMHost, Set-VMHost

Enum Constants

Name
Connected
Disconnected
NotResponding
Maintenance


VMHostStorageInfo

VMHostStorageInfo - Object

Property of
VMHost
Parameter to
Set-VMHostStorage
Returned by
Get-VMHostStorage, Set-VMHostStorage
Extends
VIObject, ExtensionData

Properties

Name | Type | Notes
VMHost | VMHost |
FileSystemVolumeInfo | HostFileSystemVolumeInfo[] |
SoftwareIScsiEnabled | Boolean |
ScsiLun | ScsiLun[] | Deprecated. As of PowerCLI 5.0 use Get-ScsiLun cmdlet instead.
VMHostId | String |
Properties inherited from VIObject
Id, Uid, Client
Properties inherited from ExtensionData
ExtensionData


VMHostTimeZone

VMHostTimeZone - Object

Property of
VMHost
Parameter to
Set-VMHost
Returned by
Get-VMHostAvailableTimeZone

Properties

Name | Type | Notes
VMHostId | String |
VMHost | VMHost |
Description | String |
GmtOffset | Int32 |
Key | String |
Name | String |


VMQuestion

VMQuestion - Object

Property of
VMQuestionOption
Parameter to
Set-VMQuestion
Returned by
Get-VMQuestion, Set-VMQuestion
Extends
ExtensionData

Properties

Name | Type | Notes
VMId | String |
VM | VirtualMachine |
QuestionId | String |
Text | String |
Options | VMQuestionOption[] |
DefaultOption | VMQuestionOption |
Uid | String |
Properties inherited from ExtensionData
ExtensionData


VMQuestionOption

VMQuestionOption - Object

Property of
VMQuestion

Properties

Name | Type | Notes
QuestionId | String |
Question | VMQuestion |
OptionId | String |
Label | String |
Summary | String |


VmRelatedObject

VmRelatedObject - Object

Extends
VmRelatedObjectBase

Properties

Name Type Notes

Methods

Methods defined in this object
ToVirtualMachine

ToVirtualMachine

Converts the specified object to zero, one or more VM objects.
Syntax
IEnumerable<VirtualMachine> ToVirtualMachine()
Return value
IEnumerable

Parameters

Name Type Description
none


VmRelatedObjectBase

VmRelatedObjectBase - Object

Parameter to
Get-VM
Extended by
VmRelatedObject

Properties

Name Type Notes


VMResourceConfiguration

VMResourceConfiguration - Object

Property of
VirtualMachine
Parameter to
Set-VMResourceConfiguration
Returned by
Get-VMResourceConfiguration, Set-VMResourceConfiguration

Properties

Name | Type | Notes
VirtualMachineId | String | Deprecated. As of PowerCLI 5.0 use VMId property instead.
VM | VirtualMachine |
VMId | String |
NumCpuShares | Int32 |
CpuReservationMhz | Int64 |
CpuLimitMhz | Int64? |
CpuSharesLevel | SharesLevel |
NumMemShares | Int32 |
MemReservationMB | Int64 |
MemLimitMB | Int64? |
MemSharesLevel | SharesLevel |
DiskResourceConfiguration | VMDiskResourceConfiguration[] |
HTCoreSharing | HTCoreSharing |
CpuAffinity | CpuAffinity | Deprecated. Doesn't support values greater than 64. Use CpuAffinityList instead.
Uid | String |
CpuAffinityList | Int[] |
MemLimitGB | Decimal? |
MemReservationGB | Decimal |


VMScriptResult

VMScriptResult - Object

Returned by
Invoke-VMScript
Extends
VIObjectCore

Properties

Name | Type | Notes
VM | VirtualMachine |
ExitCode | Int |
ScriptOutput | String |
Length | int |
Properties inherited from VIObjectCore
Uid


VmStartAction

VmStartAction - Enum

Property of
VMStartPolicy
Parameter to
Set-VMStartPolicy

Enum Constants

Name
None
PowerOn


VMStartPolicy

VMStartPolicy - Object

Parameter to
Set-VMStartPolicy
Returned by
Get-VMStartPolicy, Set-VMStartPolicy
Extends
StartPolicy

Properties

Name | Type | Notes
VirtualMachineId | String | Deprecated. As of PowerCLI 5.0 use VMId property instead.
VMId | String |
VM | VirtualMachine |
VirtualMachineName | String |
VmHostId | String |
StartAction | VmStartAction |
StartOrder | Int32? |
IsStartDelayInherited | Boolean |
IsStopActionInherited | Boolean |
IsStopDelayInherited | Boolean |
IsWaitForHeartbeatInherited | Boolean |
Uid | String |
Properties inherited from StartPolicy
StartDelay, StopAction, StopDelay, WaitForHeartbeat, ExtensionData


VmStopAction

VmStopAction - Enum

Property of
VMHostStartPolicy, StartPolicy, VMStartPolicy
Parameter to
Set-VMHostStartPolicy, Set-VMStartPolicy

Enum Constants

Name
None
Suspend
PowerOff
GuestShutDown


VMSwapfilePolicy

VMSwapfilePolicy - Enum

Property of
VirtualMachine, VMHost, Cluster
Parameter to
Set-Cluster, Set-VM, New-VM, New-Cluster, Set-VMHost

Enum Constants

Name
WithVM
Inherit
InHostDatastore


VMVersion

VMVersion - Enum

Property of
VirtualMachine
Parameter to
Set-VM, New-VM

Enum Constants

Name
Unknown
v4
v7
v8
v9
v10


VmwareVDPortgroup

VmwareVDPortgroup - Object

Extends
VDPortgroup

Properties

Name | Type | Notes
VlanConfiguration | VlanConfiguration |
Properties inherited from VDPortgroup
Uid, Name, Notes, VirtualSwitch, PortBinding, NumPorts, ExtensionData, Key, Id


VmwareVDSwitch

VmwareVDSwitch - Object

Extends
VDSwitch

Properties

Name | Type | Notes
LinkDiscoveryProtocolOperation | LinkDiscoveryOperation |
LinkDiscoveryProtocol | LinkDiscoveryProtocol |
VlanConfiguration | VlanConfiguration |
Properties inherited from VDSwitch
Uid, Id, Name, Notes, NumPorts, Mtu, Datacenter, Key, ExtensionData, NumUplinkPorts, ContactName, ContactDetails, Version, Vendor, Folder, MaxPorts


VsanDiskClaimMode

VsanDiskClaimMode - Enum

Property of
Cluster
Parameter to
Set-Cluster, New-Cluster

Enum Constants

Name
Manual
Automatic
Unknown