Set-VMHostAuthentication

This cmdlet modifies the host authentication information.

Syntax

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

Parameters

Required Parameter Name Type Position Features Description
required
Domain
String named Specifies a domain you want to join.
required
JoinDomain
SwitchParameter named Indicates whether you want to join the specified domain.
required
VMHostAuthentication
VMHostAuthentication[] named
  • pipeline
  • Specifies the VMHostAuthentication object you want to modify.
    optional
    Username
    String 1 Specifies a user name for authentication.
    optional
    Password
    SecureString 2 Specifies a password for authentication.
    optional
    Credential
    PSCredential named Specifies a credential object for authentication.

    -LeaveDomain
    -VMHostAuthentication  <VMHostAuthentication[]>
    [-Force]
    [CommonParameters]

    Parameters

    Required Parameter Name Type Position Features Description
    required
    LeaveDomain
    SwitchParameter named Indicates whether you want to leave the currently joined domain.
    required
    VMHostAuthentication
    VMHostAuthentication[] named
  • pipeline
  • Specifies the VMHostAuthentication object you want to modify.
    optional
    Force
    SwitchParameter named 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.

    Output

    VMware.VimAutomation.ViCore.Types.V1.Host.VMHostAuthentication

    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.

    Related Commands

    Feedback

    Was this page helpful?