7 Replies Latest reply on Jul 6, 2010 1:29 AM by RobMokkink

    new-vmhostaccount with empty passwords

    RobMokkink Expert

      I always used carter his function to create users:


      function Create-ShellUser {

      param($id, $password="", $description=$null, $posixId=$null)



      $erroractionpreference = "SilentlyContinue"



      $si = get-view serviceinstance

      $accountManager = get-view $si.Content.AccountManager

      $as = new-object VMware.Vim.HostPosixAccountSpec

      $as.id = $id

      $as.password = $password

      $as.description = $description

      $as.shellAccess = $true

      $as.posixId = $posixId




      But i doesn't accept the password to be $null


      I also tryed using new-vmhostaccount, but again empty passwords are not permitted.


      What to do to create users on esx servers, with empty password, so active directory authentication can work?


      I could use plink, but i don't want to do that.