PowerCli: Reconnect Esxi host to vCenter

For instructions on how to connect to VMware PowerCLI, Follow the post here: 

Change the password from vmware12! to the root password used on the environment.


Get-VMHost -state Disconnected | foreach-object {
  $vmhost = $_
  $connectSpec = New-Object VMware.Vim.HostConnectSpec
  $connectSpec. force = $true
  $connectSpec. hostName = $vmhost.name
  $connectSpec. userName = 'root'
  $connectSpec. password = 'vmware12!'
  $vmhost. extensionData.ReconnectHost_Task( $connectSpec,$null )
}   

Unlock /reset vSphere replication appliance root password.

restart the replication appliance to GRUB

at the grub screen, select SLES 11/12xxx Press ‘e’

Scroll down and look for show opts.

append “init=/bin/bash” to the same line

press f10 on the keyboard to boot

remount the root partition as RW

mount -o remount,rw /

To unlock the locked account, use the below command./sbin/pam_tally2 -r -u root

/sbin/pam_tally2 -r -u root

To reset the password, Use the below:

passwd root


Type exit to reboot the appliance