Syntax
Set-VMHostAuthentication [-Domain] <String> [[-Username] <String>] [[-Password] <SecureString>] [-Credential <PSCredential>] -JoinDomain -VMHostAuthentication <VMHostAuthentication[]> [-Confirm] [-WhatIf] [<CommonParameters>]Related Commands
Online VersionDetailed Description
This cmdlet modifies the host authentication information.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Domain | String | Specifies a domain you want to join. | true | False | |
Username | String | Specifies a user name for authentication. | false | False | |
Password | SecureString | Specifies a password for authentication. | false | False | |
Confirm | SwitchParameter | 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. | false | False | |
Credential | PSCredential | Specifies a credential object for authentication. | false | False | |
Force | SwitchParameter | If the value is $true, any existing permissions on the managed objects for Active Directory users are deleted and the cmdlet completes. If the value is $false, the cmdlet cannot run if there are any existing permissions on managed objects for Active Directory users. | false | False | |
JoinDomain | SwitchParameter | Indicates whether you want to join the specified domain. | true | False | |
LeaveDomain | SwitchParameter | Indicates whether you want to leave the currently joined domain. | true | False | |
VMHostAuthentication | VMHostAuthentication[] | Specifies the VMHostAuthentication object you want to modify. | true | True (ByValue) | |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | False |
Return Type
Zero or more modified VMHostAuthentication objectsNotes
Examples
-------------------------- Example 1 --------------------------
$vmhost | Get-VMHostAuthentication | Set-VMHostAuthentication -JoinDomain -Domain "DomainName.com" -User "Username1" -Password "Password1"
Include an ESX host in a domain.
-------------------------- Example 2 --------------------------
$vmhost | Get-VMHostAuthentication | Set-VMHostAuthentication -LeaveDomain
Exclude an ESX host from a domain.
-------------------------- Example 3 --------------------------
$vmhost | Get-VMHostAuthentication | Set-VMHostAuthentication -LeaveDomain -Force
Exclude an ESX host from a domain. If AD account permissions are defined on the host, they will be removed.