PreUpgradeCheck does not run

In some occasion while trying to run the PreUpgradeCheck command it throw below error:

Pre-upgrade check cannot proceed because the current farm is not joined to a farm, or the farm configuration database is not responding.


This error is probably that you don't have the sufficient privileges to run the command, so run the command prompt with Farm Administrator account and run the PreUpgradeCheck.