Skip to content

New-vRACloudAccountvSphere

SYNOPSIS

Create a vRA Cloud Account for vSphere

SYNTAX

Username (Default)

New-vRACloudAccountvSphere [-Name <String>] [-Description <String>] [-HostName <String>] -Username <String>
 -Password <SecureString> [-DCId <String>] [-AssociatedCloudAccountIds <String[]>] [-RegionIds <String[]>]
 [-CreateDefaultZones] [-AcceptSelfSignedCertificate] [-WhatIf] [-Confirm] [<CommonParameters>]

Credential

New-vRACloudAccountvSphere [-Name <String>] [-Description <String>] [-HostName <String>]
 -Credential <PSCredential> [-DCId <String>] [-AssociatedCloudAccountIds <String[]>] [-RegionIds <String[]>]
 [-CreateDefaultZones] [-AcceptSelfSignedCertificate] [-WhatIf] [-Confirm] [<CommonParameters>]

JSON

New-vRACloudAccountvSphere -JSON <String> [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Create a vRA Cloud Account for vSphere

EXAMPLES

EXAMPLE 1

New-vRACloudAccountvSphere -Name "vSphere Test" -HostName "vc.mycompany.com" -Username "administrator@mycompany.com" -Password ("cndhjslacd90ascdbasyoucbdh" | ConvertTo-SecureString -AsPlainText -Force) -RegionIds "Datacenter:datacenter-2" -CreateDefaultZones -AcceptSelfSignedCertificate

EXAMPLE 2

New-vRACloudAccountvSphere -Name "vSphere Test" -HostName "vc.mycompany.com" -Credential (get-credential)  -CreateDefaultZones -AcceptSelfSignedCertificate

EXAMPLE 3

$JSON = @"

{ "hostName": "vc.mycompany.com", "acceptSelfSignedCertificate": false, "associatedCloudAccountIds": "[ "42f3e0d199d134755684cd935435a" ]", "password": "cndhjslacd90ascdbasyoucbdh", "createDefaultZones": true, "dcid": "23959a1e-18bc-4f0c-ac49-b5aeb4b6eef4", "name": "string", "description": "string", "regionIds": "[ "Datacenter:datacenter-2" ]", "username": "administrator@mycompany.com" }

"@

$JSON | New-vRACloudAccountvSphere

PARAMETERS

-Name

The name of the Cloud Account for vSphere

Type: String
Parameter Sets: Username, Credential
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description

A description of the Cloud Account for vSphere

Type: String
Parameter Sets: Username, Credential
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostName

vSphere hostname in which this cloud account is created from

Type: String
Parameter Sets: Username, Credential
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Username

Username to use when connecting to the vSphere host

Type: String
Parameter Sets: Username
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Password

Password to use when connecting to the vSphere host

Type: SecureString
Parameter Sets: Username
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Credential

Credential object to connect to the vSphere host with For domain accounts ensure to specify the Username in the format username@domain, not Domain\Username

Type: PSCredential
Parameter Sets: Credential
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DCId

Optional - Identifier of a data collector vm deployed in the on-prem infrastructure

Type: String
Parameter Sets: Username, Credential
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssociatedCloudAccountIds

Optional - Any associated cloud accounts you would like to build into

Type: String[]
Parameter Sets: Username, Credential
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RegionIds

Optional - vSphere RegionIds to enable (note: if not supplied, all regions available will be added to the cloud account)

Type: String[]
Parameter Sets: Username, Credential
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CreateDefaultZones

Enable CreateDefaultZones

Type: SwitchParameter
Parameter Sets: Username, Credential
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-AcceptSelfSignedCertificate

If set, a self-signed certificate will be accepted

Type: SwitchParameter
Parameter Sets: Username, Credential
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-JSON

A JSON string with the body payload

Type: String
Parameter Sets: JSON
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String

System.Switch

OUTPUTS

System.Management.Automation.PSObject

NOTES