< Back
Get-CisService
Post
NAME Get-CisService
SYNOPSIS
This cmdlet retrieves PSObject objects that represent a proxy to a vSphere Automation SDK API service and can be
used to invoke the operations of that vSphere Automation SDK API service.
SYNTAX
Get-CisService [[-Name] <String[]>] [-Server <CisServer[]>] [<CommonParameters>]
DESCRIPTION
This cmdlet retrieves PSObject objects that represent a proxy to a vSphere Automation SDK API service and can be
used to invoke the operations of that vSphere Automation SDK API service. The cmdlet returns one PSObject object
for every service available on the vSphere Automation SDK server.
Every service proxy has a top-level Help property that contains documentation about the service's methods,
parameters, constants, and so on. The Help object is hierarchical and mirrors the rest of the service's methods,
parameters, constants, and so on. The Help object can also be used for easy creation of parameters that the
service methods accept through a method named "Create".
The "Create" method is available for the following objects: - A parameter.
- Elements of a parameter that is of type List, Set or Optional.
- Key and Value of a parameter of type Map.
- Fields of a parameter of type Structure.
For more information, see Example 2.
PARAMETERS
-Name <String[]>
Specifies the service type ID.
Required? false
Position? 1
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Server <CisServer[]>
Specifies the vSphere Automation SDK 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-CisServer.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
One or more PSObject objects
NOTES
-------------------------- Example 1 --------------------------
Get-CisService -Name 'com.vmware.cis.tagging.tag'
Retrieves the binding for the specified service.
-------------------------- Example 2 --------------------------
# Connect to the vSphere Automation SDK API
Connect-CisServer -Server $serverAddress -User $user -Password $pass
# Get the service for VM management
$vmService = Get-CisService com.vmware.vcenter.VM
# Create a VM creation specification
$createSpec = $vmService.Help.create.spec.Create()
# Fill in the creation details
$createSpec.name = "ExampleVM"
$createSpec.guest_OS = "WINDOWS_7_64"
# Create a placement specification
$createSpec.placement = $vmService.Help.create.spec.placement.Create()
# Fill in the placement details
$createSpec.placement.folder = (Get-Folder vm).ExtensionData.MoRef.Value
$createSpec.placement.host = (Get-VMHost)[0].ExtensionData.MoRef.Value
$createSpec.placement.datastore = (Get-Datastore)[0].ExtensionData.MoRef.Value
# Call the create method passing the specification
$vmService.create( $createSpec )
Connects to a vSphere Automation SDK server, retrieves the service for virtual machine management, and creates a
virtual machine, based on the provided creation details by passing the specification to the create method.
RELATED LINKS
Online Version: https://code.vmware.com/doc/preview?id= ... rvice.html
SYNOPSIS
This cmdlet retrieves PSObject objects that represent a proxy to a vSphere Automation SDK API service and can be
used to invoke the operations of that vSphere Automation SDK API service.
SYNTAX
Get-CisService [[-Name] <String[]>] [-Server <CisServer[]>] [<CommonParameters>]
DESCRIPTION
This cmdlet retrieves PSObject objects that represent a proxy to a vSphere Automation SDK API service and can be
used to invoke the operations of that vSphere Automation SDK API service. The cmdlet returns one PSObject object
for every service available on the vSphere Automation SDK server.
Every service proxy has a top-level Help property that contains documentation about the service's methods,
parameters, constants, and so on. The Help object is hierarchical and mirrors the rest of the service's methods,
parameters, constants, and so on. The Help object can also be used for easy creation of parameters that the
service methods accept through a method named "Create".
The "Create" method is available for the following objects: - A parameter.
- Elements of a parameter that is of type List, Set or Optional.
- Key and Value of a parameter of type Map.
- Fields of a parameter of type Structure.
For more information, see Example 2.
PARAMETERS
-Name <String[]>
Specifies the service type ID.
Required? false
Position? 1
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Server <CisServer[]>
Specifies the vSphere Automation SDK 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-CisServer.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
One or more PSObject objects
NOTES
-------------------------- Example 1 --------------------------
Get-CisService -Name 'com.vmware.cis.tagging.tag'
Retrieves the binding for the specified service.
-------------------------- Example 2 --------------------------
# Connect to the vSphere Automation SDK API
Connect-CisServer -Server $serverAddress -User $user -Password $pass
# Get the service for VM management
$vmService = Get-CisService com.vmware.vcenter.VM
# Create a VM creation specification
$createSpec = $vmService.Help.create.spec.Create()
# Fill in the creation details
$createSpec.name = "ExampleVM"
$createSpec.guest_OS = "WINDOWS_7_64"
# Create a placement specification
$createSpec.placement = $vmService.Help.create.spec.placement.Create()
# Fill in the placement details
$createSpec.placement.folder = (Get-Folder vm).ExtensionData.MoRef.Value
$createSpec.placement.host = (Get-VMHost)[0].ExtensionData.MoRef.Value
$createSpec.placement.datastore = (Get-Datastore)[0].ExtensionData.MoRef.Value
# Call the create method passing the specification
$vmService.create( $createSpec )
Connects to a vSphere Automation SDK server, retrieves the service for virtual machine management, and creates a
virtual machine, based on the provided creation details by passing the specification to the create method.
RELATED LINKS
Online Version: https://code.vmware.com/doc/preview?id= ... rvice.html