New-vRAUserPrincipal
SYNOPSIS
Create a vRA local user principal
SYNTAX
Password (Default)
New-vRAUserPrincipal -PrincipalId <String> [-Tenant <String>] -FirstName <String> -LastName <String>
-EmailAddress <String> [-Description <String>] -Password <SecureString> [-WhatIf] [-Confirm]
Credential
New-vRAUserPrincipal [-Tenant <String>] -FirstName <String> -LastName <String> -EmailAddress <String>
[-Description <String>] -Credential <PSCredential> [-WhatIf] [-Confirm]
JSON
New-vRAUserPrincipal -JSON <String> [-WhatIf] [-Confirm]
DESCRIPTION
Create a vRA Principal (user)
EXAMPLES
-------------------------- EXAMPLE 1 --------------------------
$SecurePassword = ConvertTo-SecureString "P@ssword" -AsPlainText -Force
New-vRAUserPrincipal -Tenant vsphere.local -FirstName "Test" -LastName "User" -EmailAddress "user@company.com" -Description "a description" -Password $SecurePassword -PrincipalId "user@vsphere.local"
-------------------------- EXAMPLE 2 --------------------------
New-vRAUserPrincipal -Tenant vsphere.local -FirstName "Test" -LastName "User" -EmailAddress "user@company.com" -Description "a description" -Credential (Get-Credential)
-------------------------- EXAMPLE 3 --------------------------
$JSON = @"
{ "locked": "false", "disabled": "false", "firstName": "Test", "lastName": "User", "emailAddress": "user@company.com", "description": "no", "password": "password123", "principalId": { "domain": "vsphere.local", "name": "user" }, "tenantName": "Tenant01", "name": "Test User" } "@
$JSON | New-vRAUserPrincipal
PARAMETERS
-PrincipalId
Principal id in user@company.com format
Type: String
Parameter Sets: Password
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Tenant
The tenant of the user
Type: String
Parameter Sets: Password, Credential
Aliases:
Required: False
Position: Named
Default value: $Global:vRAConnection.Tenant
Accept pipeline input: False
Accept wildcard characters: False
-FirstName
First Name
Type: String
Parameter Sets: Password, Credential
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-LastName
Last Name
Type: String
Parameter Sets: Password, Credential
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-EmailAddress
Email Address
Type: String
Parameter Sets: Password, Credential
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Description
Users text description
Type: String
Parameter Sets: Password, Credential
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Password
Users password
Type: SecureString
Parameter Sets: Password
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Credential
Credential object
Type: PSCredential
Parameter Sets: Credential
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-JSON
Body text to send in JSON format
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
INPUTS
System.String.
System.SecureString Management.Automation.PSCredential