vSphere PowerCLI Reference

Search-Cloud

Synopsis

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

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

NameTypeDescriptionRequired?Pipeline InputDefault Value
QueryTypeQueryTypeSpecify what types of objects you want to search for.truefalse
FilterStringSpecify a filter criteria for the returned objects.falsefalse
NameString[]Specify 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.falsefalse
PropertyString[]Specify the properties you want to retrieve for the specified object type. If you don't provide a value for this parameter, the cmdlet returns all properties of the objects.falsefalse
ServerCIServer[]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.falsefalse

Return Type

CISearchResult

Notes

Examples

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

Search-Cloud -QueryType adminVAppTemplate

Searches the cloud server for virtual appliance templates. The user is connected as a cloud administrator.

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

Search-Cloud -Type vAppTemplate

Searches the cloud server for virtual appliance templates. The user is connected as a cloud user.

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

Search-Cloud user -Name User1

Searches for a user by name.

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

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 5 --------------

Search-Cloud vappTemplate -Filter 'isGoldMaster==True;isPublished==True'

Searches for public gold master vAppTemplate objects.


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