# short snippet to check whether the currently login user is a domain admin$CurrentUser =…