HOWTO join ESXi 5 to the AD domain using PowerCLI

I couldn't add 5 ESXi hosts to the AD domain using PowerCli 5.

I tried to use LucD note, but it does not work probably because it only supports ESXi 4.1

http://www.lucd.info/2010/07/25/script-vSphere-4-1-ad-authentication/

Does anyone know how to add ESXi 5 domain host using PowerCli, brand-new cmdlet as JoinDomain etc. ?

Joern

I have to update this post.

Try to replace the line 123

$hostADAuth = [VMware.Vim.VIConvert]: ToVim41 ($result)

with

$hostADAuth = [VMware.Vim.VIConvert]: ToVim50 ($result)

Tags: VMware

Similar Questions

  • Need help to report on the configurations of the virtual machine using PowerCLI

    Hi guys,.

    I try to shoot down vCenter virtual computer configuration details and am not having much luck with vCPU multicore machines.

    Looking at the lists of VMS in vSphere Client, it offers a column "Number of CPU" basis and does not include any other granularity (i.e. in terms of casings & carrots as opposed to simply 'CPU Count').

    I thought that maybe I have better luck using PowerCLI and essentially, the cmdlet "Get - VM" has the kind of information I'm looking for, but I find that it lacks a bit when it comes to vCPU details.  Essentially, it turns out that does not do much better than the list of virtual machines in vSphere Client because it produces only a "CPU Num" value, which is not particularly useful.

    For example, if "processors Num" 4, that '4' means?  This could mean one of the following:

    • 1 x 4 drivers
    • Core 2 x 2
    • Basic 4 x 1

    I hope someone out there can help produce me a list of virtual machines with details of configuration that includes both sockets & carrots for vCPU?

    Thanks in advance!

    Try like this

    Get-VM | Select Name, @{N="CPU";E={$_.ExtensionData.Config.hardware.numCPU/$_.ExtensionData.Config.hardware.numCoresPerSocket}}, @{N="Core per CPU";E={$_.ExtensionData.Config.hardware.numCoresPerSocket}}
    
  • Unable to connect to the ESX Server using PowerCLI 4.1.1

    I can't connect directly to an ESX host using PowerCLI 4.1.1

    C:\Program Files\VMware\Infrastructure\vSphere PowerCLI > Connect-VIServer esx001

    Connect-VIServer: 02/12/2010 12:04:38 Connect-VIServer unable to connect using the requested protocol.

    On line: 1 char: 17

    + Connect-VIServer < < < < esx001

    + CategoryInfo: ObjectNotFound: ( , ViServerConnectionException)

    + FullyQualifiedErrorId: Client20_ConnectivityServiceImpl_Reconnect_ProtocolError, VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer

    Connecting to vCenter works without problem.

    I also tried specifying the parameters of the - Protocol and - port, but without success.

    I am using .net 3.5 SP1 and PowerShell 2.0

    Anyone else has the same problems?

    -


    Arnim van Lieshout

    Blog: http://www.van-Lieshout.com

    Twitter: http://www.Twitter.com/avlieshout

    If you find this information useful, please give points to "correct" or "useful".

    Hi Arnim,

    Could you please check your ProxyPolicy settings (Get-PowerCLIConfiguration)? You can set the proxy for 'NoProxy' strategy and try to reconnect. I guess it could be the cause of the problem.

    Kind regards

    Dimitar

    -

  • Unable to validate a way out of trust on either of the two domains using Windows Server 2008 R2

    I have two domain controllers in the two different forests.  Both have a Stub dns setup for each other and can ping both the field and the name of dc for eachother.  Domain1 build outgoing approval and validate successfully.  Domain2 see confidence applied, however any attempt to validate this trust or build from the Wizard ends with only 2 domain cannot locate the domain controller for Domain1.  What can be done to allow Domain2 validate this trust?

    Hello

    Microsoft has specific Forums to help you with your Server 2008 R2 questions.

    Could you please repost this link in Server 2008 R2 Forums.

    "Support for Windows Server 2008 R2"

    http://TechNet.Microsoft.com/en-us/WindowsServer/bb512923

    See you soon.

  • is there a way to transmit a USB device to the computer, the guest computer, using PowerCLI virtual?

    Hi guys,.

    I installed the vSphere PowerCLI on my machine. It is possible to map a USB device connected to my machine in a vSphere VM via command line? I am able to do currently using the vSphere client user interface.

    When I went though the PowerCLI documentation I could find only 'Get-UsbDevice' and 'Remove-UsbDevice. I need something to add Usbdevice and the list of USB devices. Please let me know if there is a way to do this command line. Appreciate your help in this matter.

    Thank you

    -Asmaa

    Finally found a way to do it. It is possible to use VMRC SDK. I am able to connect devices of my web page. Feel free to mail me if someone needs help getting there.

  • Call commands on the ESX host using powercli

    Hi all

    I need to run a specific command on some of my esx hosts, let's say "vmware - v", a powercli command, or automate by any means without using SSH.

    I see the invoke-expression command can do this, but I did not need to make it work.

    a syntax such as get-vmhost < hostname >. Invoke-expression-control 'vmware - v"does not work.

    Any ideas how I could do this?

    Thank you!

    I'm afraid that Invoke-Expression is a PowerShell cmdlet that is only intended to run code on the local computer.

    Without using SSH, I suspect that you will have a hard time finding a way to do it.

  • ESXi underperformance of the r.620 vs R610

    All,

    I currently run a server R610 (X 5550 procs) and a unit r.620 newly acquired (e5-2650) unit in a vSphere cluster 5. ESXi running the latest version and the latest patches. Dell servers up-to-date with respect to the firmware of all components. The unit uses internal 15 k SAS R610 leads to host the ESXi hypervisor, while the r.620 uses 2 GB SD cards in mirror for the ESXi hypervisor.

    When I migrated some workloads on the new cluster member (r.620), I've seen some of our process execution times increase dramatically. The process performed on a MS SQL 2008 r2 server. When I migrated the VM on the initial cluster member (r610), execution time is back to the normal time.

    I went then to face a series of landmarks a test virtual machine that has been migrated back and forth between each Member of the cluster and seen repeatable results that showed that the r.620 was SLOWER than the R610 in terms of CPU and memory benchmarks (using Passmark v7.0). Cluster using the EVC Nahalem mode. I have also conducted tests by removing the VCA mode and was able to get similar results with the R610 being the fastest performer.

    I checked all the cores and hyperthreading is enabled. A glance at the guide of best practices for ESXi 5.0 gave anything different in my setup...

    Has anyone seen or heard talk about these issues with the r.620 unit, or E5-2650 processors?

    Thank you

    Elvis

    We had the same problem with our new r.620 (2650v2-E5). The performance was well below our old R710 (X 5550).

    We could solve the problems of performance and to maintain a good ratio of energy saving dig by adjusting the profile' system settings ' in the BIOS:

    Stone

  • To connect to vCenter using the same Session with PowerCLI

    Hi all

    Is it possible that we can establish multiple connections to vCenter using the same session with Powercli.

    As connect-viserver-Server "vcenter1" - domain\domainacnt of the username-password "Password".

    is to establish several connections and we want to limit, because we are in the process of report generation based on the web developing using Powercli with IIS.

    Please suggest.

    You can use the Session parameter on the cmdlet Connect-VIServer .

    I use this for the PowerShell Workflows, see workflow of PowerShell and PowerCLI

  • Automate the VMs using PowerCLI performance report

    Dear Experts,

    I want to automate the monthly performance report (CPU, memory, disk) of the Virtual Machines using PowerCLI or any other script. Basically, I want to do under the tasks mentioned on monthly basis:

    1. use of the CPU (of all virtual machines) statistical average based monthly (as a percentage). Same report for memory (in percent) and the disc (Kbps).

    2. is it possible folderwise? I have several clients in my support infrastructure and I made segregation in making records and for each of them, this report is necessary.

    3. export only these 3 reports in Excel.

    Details of the infrastructure: ESXi 4.0 and 4.1

    Dear Experts, your kind suggestions will be much appreciated? As it takes a lot of time as we do this manually.

    Thank you very much!

    No problem, with the Group-Object cmdlet we can divide the result by VM.

    $metrics = "cpu.usage.average","mem.usage.average","disk.usage.average"
    $start = (Get-Date).AddDays(-30)
    
    $folders = Get-Folder -Location (Get-Folder -Name vm -Location Datacenters)
    # $folders = Get-Folder -Name Folder1,Folder2,Folder3
    &{foreach($folder in $folders){
        $vms = Get-VM -Location $folder    if($vms){
          $stats = Get-Stat -Entity $vms -Stat $metrics -Start $start -ErrorAction SilentlyContinue      if($stats){
            $stats | Group-Object -Property {$_.Entity.Name} | %{
              New-Object PSObject -Property @{
                Folder = $folder.Name            VM = $_.Values[0]
                CpuAvg = ($_.Group | where {$_.MetricId -eq "cpu.usage.average"} | Measure-Object -Property Value -Average).Average            MemAvg = ($_.Group | where {$_.MetricId -eq "mem.usage.average"} | Measure-Object -Property Value -Average).Average            DiskAvg = ($_.Group | where {$_.MetricId -eq "disk.usage.average"} | Measure-Object -Property Value -Average).Average          }
            }
          }
        }
      }} | Export-Csv C:\report.csv -NoTypeInformation -UseCulture
    
  • The list of DNS suffixes customized using PowerCLI

    If I have 4 custom DNS suffixes configured on my ESXi hosts, how can I list using powerCLI?

    Hello

    Try this:

    Get-VMhost [ESX] | Get-VMHostNetwork

    or

    Get-VMhost [ESX] | Get-VMHostNetwork |  Select SearchDomain


    Kind regards

    Julien

  • Unable to join the domain using customization comments vCD

    I have vCloud Director installed and running.  I created a vApp and edited the properties to allow customization of comments and more everything works so far but the computer will not join the domain.  I tried to use organization customization, as well as customize the TIME after deployment.  As soon as the server ends with the customization and is powered, I can log in and join the domain manually without any problem, I can't get comments customization to do that for me.   Its a Windows 2008 R2 server.  I found this entry at the end of the journal to customize-comments on the server:

    run the command netsh interface ip set dns 12 xxx.xxx.xxx.xxx static (it has the correct address for my DNS server) =

    The command has been successfully run, the output of the command:

    The configured DNS server is incorrect or does not exist

    Any thoughts?

    It is a farily well known problem.  For a join of field works in vCloud Director, you must have on your DHCP subnet.  Many people make using the vShield edge device that is located on the network of the Org.  The sysprep process runs before tools VMware is running (which applies to the satic IP address to the client).  It's sort of a situation or hen that the guest has ip when in sysprep, so the easy solution to make it work is DHCP.  Conversely, people did it is in port, a lab post script custization in vCD Manager who entered the field after the sysprep is made completely and the guest it's static IP.  Frankly, it's something of the order of operations that is causing the problem.  We are looking at this for other clients, but at the moment, what your options are

    (1) add DHCP to the subnet by using your own server DHCP OR vShield Edge

    (2) add a PostScript of customization to join the domain, it can be inserted into the comments thus customizaion area.

    Hope this helps you stop banging their heads on the wall

  • View composer Wizard can not find the AD domain

    Hello

    I'm trying to configure VMware View Composer. I followed the installation guide, but I can not any further only the configuration of "Guest" customization of the Wizard (2nd to the last step!). There is a drop down menu where you select to add the linked clones to, but it is not filled with my domain name (or any other for that matter). Here is a screenshot:http://lh4.ggpht.com/_7R_jnLODiss/TSR4BhA5FGI/AAAAAAAAAuA/dQvhQxNAbOI/s800/VMware_Composer_Pool_023.gif

    This is the view 4.5 and ESXi 4.1. I have composer installed on my machine vCentre (standard Win 2008 64 bit VM) and the connection to the server in its own VM, also W2008 64 bit. The ad server is also a virtual machine and also W2008 64 bit. All servers are part of the domain and domain accounts work OK on each machine. The domain use the default schema (Windows 2003 Server) for AD. The guest for the virtual desktop OS is Win7 32 bit.

    I have been sent the Office a few virtual machines from the same model desktop VM that I used to create the VM base for the foregoing. Then I created these as static pools and they work OK. When I have them deployed since the template customization vCenter them to join the domain automatically without problem.

    I tried to cancel the wizard and leave in case it was a glitch, but no joy, same problem each time.

    Any suggestions gratefully received!

    TIA

    Jules.

    Can you check - part of the vCenter server server configuration?

    Looks like composer for your vCenter settings are misconfigured or not configured.

    When you configure them you must also make sure that the account used for operations of composer has enough privileges in AD (view 4.5 installation guide, p25).

    WBR

    Imants

  • Receives the Message "the specified domain does not exist or could not be contacted" when starting

    I was working on my machine, normally the day before and I shut it down properly - everything was fine.  I'm confused as to what happened between the stopping and starting of the next day!

    After you receive this message, he asks me my password for the account of one on my machine.  I've never set up a password.

    I have tried rebooting several times and it gives me the same message.

    I started to run diagnostics, but he appeared to get hooked on a memory test.

    Any ideas on how to pass this message/fix, it would be appreciated!

    Your system appears to have been related to a field.  After that, it requires a reboot to take effect.  Once you restarted so he invites to connect to the domain.

    There are always local accounts on your computer that allows you to open a session, but they will have a password for all accounts if your system is connected to a domain (as it is a requirement).  To log on by using a local account, choose the name of your computer in the ' log on: "drop-down at the login prompt.  You will need to know the valid username and password for this computer.  If you or someone you know has an account in the domain that is joined to your system, allow you to logon to the domain by providing the valid domain user name and password.

    Once logged on you can undo your computer from the domain (right click on the computer in the start menu, properties, advanced system settings, change the computer name, select workgroup and type workgroup name.  Click Ok.)  You will need the necessary permissions to perform this task.

    If you are unable to go further, because you don't have a valid login, you can reinstall Windows.  If you format your drive when you re-install you will lose all data on this disc.  So if you need all the files from the drive, and you go this route, make a backup first!

  • ESXi 5.5 / the will of StarWind disk number

    A ESXi connected to StarWind v6 via iSCSI MPIO.

    Upgrade to v8 Starwind.  Update went well spent... all the existing disks/objectives remained and ESXi host was all mounted volumes.

    At the same time to upgrade, I wanted to change the RAM cache in Starwind for each of my virtual devices.  Unfortunately Starwind have has this built in existing devices. I found reference to edit the .swdsk file to set the cache.  However my upgraded Starwind did not use this virtual disk format.

    Then... I deleted an existing virtual device without deleting the associated image file.  Re-created Starwind device/virtual disk.  Joined an existing image file.  Re-connected to ESXi iSCSI.  I first tested on a small LUN first.  Everything seemed fine.  So I did it for all my devices StarWind.  Then following problems restart ESXi.

    No mounted volume.  Determined through playing that ESXi has been seeing them as snapshots.  If I rode without re-signing volume disappeared again on restart.

    So I went through the process via SSH

    http://KB.VMware.com/selfservice/microsites/search.do?language=en_US & cmd = displayKC & externalId = 1011387

    esxcfg-volume -l

    esxcfg-volume -r VMFS_UUID|label


    Completely removed all existing references to "old" volume names

    Renamed all the Volumes mounted in the snap-* my original name

    Re-recorded all the machines.

    Finally the volumes mounted after restart ESXi.

    This was a lot of unnecessary work that I do not want to repeat and want to know more about why it happened.  It is perhaps a matter for the people of StarWind...

    What exactly has changed with the "volume" of ESXi clearly I generated a new Starwind device but to an existing image file.  The real VMFS volume inside this image file has not changed at all.  What is happening at the level of the iSCSI that this was seen as different to ESXi?


    Thank you.

    Hello

    When ESXi connects to the iSCSI READ it identifies using several signs

    1 size

    2. the seller ID

    3. product ID

    4 UUID

    5. ID series

    If the foregoing does not match the original device, you will get a situation as you describe in the original post.

    I think it happened when you were adding the StarWind LU to the management console.

    You have selected the img file and StarWind first threw a warning, saying that it is an existing device. If you chose to use the img file anyway, resigned StarWind device by generating a new UUID and Serial code.

    In the future, please use the swdsk header when adding previously created devices preventing the UUID and change of serial ID.

  • When I click on an address, instead of the name of domain appearing in the url field, only the IP address appears. How can I get the real domain to pop?

    When I click on an address, instead of the name of domain appearing in the url field, only the IP address appears. How can I get the real domain to pop?

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance/themes).

    You can attach a screenshot?

    Use a type of compressed as PNG or JPG image to save the screenshot and make sure that you do not exceed the maximum file size (1 MB).

Maybe you are looking for