Verify multiple domains with PowerShell

I have Added 50 domains to our tenancy using power shell ( and I have a few hundred more to add) ,  the DNS records have been created , and I now need to verify the domains. 

My Question is : can I verify  the domains in Bulk? Using Powershell? if so how?

March 23rd, 2015 7:47am

i have been trying the following:

#Get content from CSV
$NewDomains = Get-Content C:\Scripts\newdomains.txt

#verify Domains from txt file
$NewDomains | Confirm-MsolDomain 


 but this just returns the follow error:

Confirm-MsolDomain : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or
the input and its properties do not match any of the parameters that take pipeline input.
At line:1 char:15
+ $NewDomains | Confirm-MsolDomain
Free Windows Admin Tool Kit Click here and download it now
March 23rd, 2015 8:18am

I figured it out, works a treat!

$NewDomains = Get-Content C:\Scripts\newdomains.txt

foreach ($domain in $NewDomains) {Confirm-MsolDomain -DomainName $domain}
March 23rd, 2015 8:24am

Glad to hear that you have found the solution. Thank you for sharing your experience here, it will be helpful to other community members who have a similar issue.

Best Regards,

Steve Fan

Forum Support

Free Windows Admin Tool Kit Click here and download it now
March 23rd, 2015 9:45pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics