Automation

 View Only
  • 1.  Add User to DCUI Access using PowerCLI

    Posted Apr 16, 2016 11:52 AM

    Hello There

    Is everyone know how to add user (instead of root ) in advanced setting to have DCUI access in VMware ESXi5.1 using power cli?

    In Addition I read the Article below  and it doesn't work.

    Thanks

    https://communities.vmware.com/thread/449969



  • 2.  RE: Add User to DCUI Access using PowerCLI

    Posted Apr 17, 2016 06:36 AM

    Could you provide some more details about your "it doesn't work" ?

    What error message do you get ?



  • 3.  RE: Add User to DCUI Access using PowerCLI

    Posted Apr 17, 2016 07:46 AM
      |   view attached

    Actually I use this Script

    "New-VMHostAccount -ID MyUser1 -Password MyPassword1 -UserAccount -Server MyESX1

    $dcui = Get-VMHostAdvancedConfiguration | where {$_.Name -eq "DCUI.Access"}

    Set-VMHostAdvancedConfiguration -AdvancedSetting $dcui -Value "$($dcui.Value),MyUser1""

    and put it on my power cli command line

    in addition  I Change "MyESX1" and "MyUser1" to my own user. Then "MyUser1" have been created  but I see this error(the photo attached) and "MyUser1" was not add to advanced setting dcui .



  • 4.  RE: Add User to DCUI Access using PowerCLI
    Best Answer

    Posted Apr 17, 2016 11:03 AM

    You are mixing the Set-VMHostAdvancedSetting and the Set-AdvancedSetting cmdlets and parameters.

    Use the Set-AdvancedSetting cmdlet, the other one is deprecated.

    Something like this

    New-VMHostAccount -ID MyUser1 -Password MyPassword1 -UserAccount -Server MyESX1

    $dcui = Get-AdvancedSetting -Name 'DCUI.Access' -Entity MyESX1

    Set-AdvancedSetting -AdvancedSetting $dcui -Value "$($dcui.Value),MyUser1" -Confirm:$false



  • 5.  RE: Add User to DCUI Access using PowerCLI

    Posted Apr 18, 2016 10:46 AM

    Hi LucD

    You are Great I really appreciate you

    thanks for your great script