powershellscripts.com

Tutorials  PowerShell Cmdlet Help for New-VMHostAccount



NAME
New-VMHostAccount

SYNOPSIS
Creates a new host user or group account.

SYNTAX
New-VMHostAccount [-Id] [-Password] [-Description ] [-UserAccount] [-AssignGroups []>] [-GrantShellAccess] [-Server ] [-WhatIf] [-Confirm] []

New-VMHostAccount [-Id] [-GroupAccount] [-AssignUsers ] [-Server ] [-WhatIf] [-Confi
rm] []


DESCRIPTION
Creates a new host user or group account using the provided parameters.


PARAMETERS
-Id
Specify an ID for the new host account.

Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Password
Specify a password for the new host account.

Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Description
Provide a description of the new host account. The maximum length of the text is 255 symbols.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-UserAccount
Indicate that the new host account is a user account.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-AssignGroups
If the UserAccount parameter is set to $true, use AssignGroups to specify the groups to which the newly created
user belongs.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-GrantShellAccess
Indicate that the new account is allowed to access the ESX shell.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Server
Specify the vSphere server on which you want to run the cmdlet. If no value is given to this parameter, the com
mand runs on the default servers. For more information about default servers, see the description of Connect-VI
Server. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future re
lease.

Required? false
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? true

-WhatIf
Indicate that the cmdlet is run only to display the changes that would be made and actually no objects are modi
fied.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm
If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false,
the cmdlet runs without asking for user confirmation.

Required? false
Position? named
Default value $true
Accept pipeline input? false
Accept wildcard characters? false

-GroupAccount
Indicate that the new host account is a group account.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-AssignUsers
If the GroupAccount parameter is set to $true, use AssignUsers to specify the users that belong to the newly cr
eated group account.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
HostUserAccount or HostGroupAccount


NOTES




-------------- Example 1 --------------

C:\PS>New-VMHostAccount -ID User1 -Password pass -UserAccount

New-VMHostAccount -Id Group1 -GroupAccount -AssignUsers User1


Creates a user account with ID user1 and a group account with ID Group1. Assigns the User1 user account to the Grou
p1 account.






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/New-VMHostAccount.html
Set-VMHostAccount
Get-VIAccount
Remove-VMHostAccount