It’s used to treate Addisons Disease for people who don’t respond well to prednisone or hydrocorisone.
en.wikipedia.org/wiki/Dexamethasone
Dexamethasone is also used in a diagnostic context, namely in its property to suppress the natural pituitary-adrenal axis. Patients presenting with clinical signs of glucocorticoid excess (Cushing’s syndrome) are generally diagnosed by a 24-hour urine collection for cortisol or by a dexamethasone suppression test. During the latter, the response of the body to a high dose of glucocorticoids is monitored. Various forms are performed. In the most common form, a patient takes a nighttime dose of either 1 or 4 mg of dexamethasone, and the serum cortisol levels are measured in the morning. If the levels are relatively high (over 5 µg/dL or 150 nmol/L), then the test is positive and the patient has an autonomous source of either cortisol or ACTH, indicating Cushing’s syndrome where the tumor does not have a feedback mechanism. If ACTH levels are lowered by at least 50%, this would indicate Cushing’s Disease, since the pituitary adenoma has a feedback mechanism that has been reset to a higher level of cortisol. Longer versions rely on urine collections on oral dexamethasone over various days.