PowerCLI Reference

Set-VMHostAuthentication

Synopsis

This cmdlet modifies the host authentication information.

Syntax

Set-VMHostAuthentication [-Domain] <String> [[-Username] <String>] [[-Password] <SecureString>] [-Credential <PSCredential>] -JoinDomain -VMHostAuthentication <VMHostAuthentication[]> [-Confirm] [-WhatIf] [<CommonParameters>]

Set-VMHostAuthentication [-Force] -LeaveDomain -VMHostAuthentication <VMHostAuthentication[]> [-Confirm] [-WhatIf] [<CommonParameters>]

Related Commands

Online Version
Get-VMHostAuthentication

Detailed Description

This cmdlet modifies the host authentication information.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
DomainStringSpecifies a domain you want to join.trueFalse
UsernameStringSpecifies a user name for authentication.falseFalse
PasswordSecureStringSpecifies a password for authentication.falseFalse
ConfirmSwitchParameterIf 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.falseFalse
CredentialPSCredentialSpecifies a credential object for authentication.falseFalse
ForceSwitchParameterIf 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.falseFalse
JoinDomainSwitchParameterIndicates whether you want to join the specified domain.trueFalse
LeaveDomainSwitchParameterIndicates whether you want to leave the currently joined domain.trueFalse
VMHostAuthenticationVMHostAuthentication[]Specifies the VMHostAuthentication object you want to modify.trueTrue (ByValue)
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falseFalse

Return Type

Zero or more modified VMHostAuthentication objects

Notes

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.


Copyright © VMware, Inc. All rights reserved.