function obtainDomainAdminCredentials{ # Legacy domain binding function function isValidCred($u,$p){ # Get current domain using logged-on…