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[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Set-VMHostAuthentication [-Force] -LeaveDomain -VMHostAuthentication <VMHostAuthentication[]> [-WhatIf] [-Confirm] [<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.