Confirm-MsolEmailVerifiedDomain

Updated: July 30, 2015

Note



  • The cmdlets were previously known as the Microsoft Online Services Module for Windows PowerShell cmdlets.

This cmdlet is used to confirm ownership of an unmanaged tenant. An unmanaged tenant is a directory without a global administrator that was created to complete a self-service signup offer. In order to confirm ownership, a custom TXT or MX DNS record must be added for the domain. The domain must first be added using the New-MsolDomain cmdlet, and then the Get-MsolDomainVerificationDNS cmdlet should be called to retrieve the details of the DNS record that must be set.

Note

Note that there may be a delay (15-60 minutes) between when the DNS update is made and when the cmdlet is able to verify.

Syntax

Confirm-MsolEmailVerifiedDomain -DomainName <string> [-TenantId <Guid>] [<CommonParameters>]

Parameters

    -DomainName <string>
        The fully qualified domain name (FQDN) to verify.
        
        Required?                    true
        Position?                    named
        Default value                
        Accept pipeline input?       true (ByPropertyName)
        Accept wildcard characters?  false
        
    -TenantId <Guid>
        The unique ID of the tenant to perform the operation on. If this is 
        not provided, then the value will default to the tenant of the current 
        user. This parameter is only applicable to partner users.
        
        Required?                    false
        Position?                    named
        Default value                
        Accept pipeline input?       true (ByPropertyName)
        Accept wildcard characters?  false
        
    <CommonParameters>
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer and OutVariable. For more information, type,
        "get-help about_commonparameters".

Examples

Example 1

The following command confirms ownership of the domain contoso.com. In order for domain verification to succeed, the appropriate DNS records must first be set up. The list of DNS records to set up can be retrieved using the Get-MsolDomainVerificationDns cmdlet.

Confirm-MsolEmailVerifiedDomain -DomainName contoso.com

Example 2

This example shows the process more end-to-end. For example:

  1. The following command prompts you for credentials. Here you would type the user name and password of the email domain that you used to create the unmanaged tenant:

    $cred = Get-Credential 
    
  2. The following command connects to the online service using the supplied credentials:

    Connect-MsolService –credential $cred 
    
  3. The following command gets the list of domains for the company:

    Get-MsolDomain 
    
  4. The following command shows how to create a DNS TXT record to verify ownership of a specific domain from that list, let’s say contoso.co.uk, which is an unmanaged tenant we want to take over.

    Get-MsolDomainVerificationDNS –domainName contoso.co.uk –mode DnsTextRecord 
    
  5. The command returns a Text value and TTL value (in seconds). The next step is to create a TXT record in the DNS zone for the domain. This step can vary, depending on the domain registrar.

  6. After that DNS record is created, run the following command to confirm the domain takeover:

    ConfirmMsolEmailVerifiedDomain –domainName contoso.co.uk
    

Additional Resources

There are several other places you can get more information and help. These include: