Skip to content

Instantly share code, notes, and snippets.

@jameswinegar
Last active January 2, 2019 02:12
Show Gist options
  • Save jameswinegar/b37050c781b2912b38ddd75dc387d5ef to your computer and use it in GitHub Desktop.
Save jameswinegar/b37050c781b2912b38ddd75dc387d5ef to your computer and use it in GitHub Desktop.
$sleepSeconds = 30
$TimeStart = Get-Date
$TimeEnd = $timeStart.addminutes(15)
Write-Host "Start Time: $TimeStart"
write-host "End Time: $TimeEnd"
Do {
$TimeNow = Get-Date
if ($TimeNow -ge $TimeEnd) {
Write-host "Something is taking a while. Are you sure you updated your DNS?"
Write-host "Check if you have the following TXT record in your DNS:" $recordToAdd.Text
} else {
Write-Host "Domain not available yet"
}
Start-Sleep -Seconds $sleepSeconds
} while ((Get-MsolDomain -DomainName $domainName).Status -ne "Verified")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment