Command line tool, that provides basic vCO package import and export operations. As source or target it can have either .package file, or directory.
java <java-parameters> -jar PackageToolCli.jar <command> <command-parameters>
| /* | |
| - Get an NSX Security Tag by name | |
| Inputs: | |
| NSXEndpoint [NSXConnection] | |
| securityGroupName [String] | |
| */ |
| function Get-VMExtendedInfo { | |
| <# | |
| .SYNOPSIS | |
| Gets extended information about a Virtual Machine | |
| .DESCRIPTION | |
| Gets extended information about a Virtual Machine | |
| .PARAMETER VM | |
| The Virtual Machine to query |
| # --- Create the tenant | |
| New-vRATenant -Name Tenant01 -Description "This is tenant 01" -URLName tenant01 -ContactEmail tenantadmin@company.com -ID tenant01 | |
| # --- Create a local user | |
| New-vRAUserPrincipal -PrincipalId tenantadmin@vsphere.local -Tenant Tenant01 -FirstName tenant -LastName admin -EmailAddress tenantadmin@company.com -Description "Tenant admin local user" -Password password123 | |
| # --- Add local user as a tenant and iaas admin | |
| Add-vRAPrincipalToTenantRole -TenantId Tenant01 -PrincipalId tenantadmin@vsphere.local -RoleId CSP_TENANT_ADMIN | |
| Add-vRAPrincipalToTenantRole -TenantId Tenant01 -PrincipalId tenantadmin@vsphere.local -RoleId COM_VMWARE_IAAS_IAAS_ADMINISTRATOR |
| $URI = "/catalog-service/api/consumer/resourceViews/?withExtendedData=$($WithExtendedData)&withOperations=$($WithOperations)&managedOnly=$($ManagedOnly)&`$orderby=name asc&limit=$($Limit)&page=$($page)&`$filter=resourceType/id eq 'Infrastructure.Machine' or resourceType/id eq 'Infrastructure.Virtual' or resourceType/id eq 'Infrastructure.Cloud' or resourceType/id eq 'Infrastructure.Physical'" | |
| $EscapedURI = [uri]::EscapeUriString($URI) | |
| $Response = Invoke-vRARestMethod -Method GET -URI $EscapedURI -Verbose:$VerbosePreference |
| #requires -version 5 | |
| <# | |
| - Export vRA Blueprint content package and extract the archive | |
| - Requires PowerShell 5 | |
| #> | |
| # --- Set Filter |
| /* | |
| - Retrieve the email address of a user principal | |
| - Input: vCACCAFEHost [vCACCAFE:vCACHost] | |
| - Input: principalId [String] | |
| - Output: emailAddress [String] | |
| */ | |
| var tenant = vCACCAFEHost.tenant; |
| /* | |
| - Reset the password of a local user principal | |
| - Input: vCACCAFEHost [vCACCAFE:vCACHost] | |
| - Input: principalId [String] | |
| - Input: password [SecureString] | |
| - Input: confirmPassword [SecureString] | |
| - Output: [Void] | |
| */ |
| /* | |
| - Update the vRO Workflow Associated with an XaaS Blueprint | |
| - Input: vCACCAFEHost [vCACCAFE:vCACHost] | |
| - Input: blueprintId [String] | |
| - Input: workflowId [String] | |
| */ | |
| var tenant = vCACCAFEHost.tenant; |
| /* | |
| - Update IaaS Virtual Machine State | |
| - Input: virtualMachineName [String] | |
| */ | |
| var state = "Off"; | |
| var vCACVirtualMachine = Server.findAllForType("vCAC:VirtualMachine", "VirtualMachineName eq '" + virtualMachineName + "'"); |