How to reset vCenter SSO admin password from shell

1. Get a putty session to vCenter appliance

2. Run belwo command

3. Select Option 03 and it will generate new password for SSO admin

Advertisement

Powershell script to get VM details with CSV name

$getallvms=(get-vm -ComputerName (Get-ClusterNode))

$result=@()

foreach ($item in $getallvms)

{

$vmname=$item.Name

$vmfullpath=$item.ConfigurationLocation

$vmpathtrim=$vmfullpath.Substring(18)

$pathindex=$vmpathtrim.indexof(“\”)

$csvpathfrom=$vmpathtrim.substring(0,$pathindex)

$properties=@{

Name=$vmname

Path=$csvpathfrom

 #Write-Host $item.name

 }

 $result+=New-Object psobject -Property $properties

}

$result |Sort-Object path