Flapoly
Contributor
Contributor

Set-VMHostAuthentication How to specify the Domain controller

Hi all,

First sorry if that question has already been raised & answered. But haven't been able to find any valid answer to my question...

With the Set-VMHostAuthentication I would like to be able to specify the Domain Controller to target during the JoinDomain.

I'm looking for something like the win32 "NetJoinDomain" API allows to specify as part of the Domain parameter.

We have a large number of DCs, and replication take a while between each of them (ie the DC where is executed the script is "far away" from the DC used by the ESX to join the domain)

So we need to be able to control the DC used during the initial JoinDomain.

PS:Using vSphere 5.1

Thks a lot

0 Kudos
5 Replies
LucD
Leadership
Leadership

I'm afraid you can't control the DC with the Set-VMHostAuthentication cmdlet, but you could edit your ESXi krb5-affinity.conf file.

In there you can specify the DC(s) to use.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Flapoly
Contributor
Contributor

Great,

But how do you update krb5-affinity.conf with a powershell script (ie haven't found how to access to esx filesystem- Only been able to assess to datastores file system by script?

0 Kudos
LucD
Leadership
Leadership

I would do this with plink.exe from the PuTTY suite.

You can set up an SSH session to the ESXi host, and then for example use sed to edit the config file.

There are multiple samples on how to use plink.exe in this community, for example see 24.  Re: powermt license check


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
Flapoly
Contributor
Contributor

I wanted to prevent to use SSH.

Thks for the answer.

Are you aware of any plan to get a proper access of the ESX's OS filesystem directly from PowerCLI ?

0 Kudos
LucD
Leadership
Leadership

I don't work for VMware, I have no clue what the PowerCLI roadmap contains I'm afraid.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos