This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
- Update the vRO Workflow Associated with an XaaS Blueprint | |
- Input: vCACCAFEHost [vCACCAFE:vCACHost] | |
- Input: blueprintId [String] | |
- Input: workflowId [String] | |
*/ | |
var tenant = vCACCAFEHost.tenant; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
- Reset the password of a local user principal | |
- Input: vCACCAFEHost [vCACCAFE:vCACHost] | |
- Input: principalId [String] | |
- Input: password [SecureString] | |
- Input: confirmPassword [SecureString] | |
- Output: [Void] | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
- Retrieve the email address of a user principal | |
- Input: vCACCAFEHost [vCACCAFE:vCACHost] | |
- Input: principalId [String] | |
- Output: emailAddress [String] | |
*/ | |
var tenant = vCACCAFEHost.tenant; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires -version 5 | |
<# | |
- Export vRA Blueprint content package and extract the archive | |
- Requires PowerShell 5 | |
#> | |
# --- Set Filter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
- Get an NSX Security Tag by name | |
Inputs: | |
NSXEndpoint [NSXConnection] | |
securityGroupName [String] | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Object = [PSCustomObject]@{ | |
Id = "1" | |
Name = "VM01" | |
Description = "A virtual machine" | |
Location = "UK" | |
IPAddress = "10.0.0.1" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-vRAEntitlement | Select Name, @{Name="Principals"; Expression={$_.Principals.ref}} |