How to use Powershell command line to update A Record, CNAME for a domain?

Anonymous
2015-12-07T11:33:08+00:00

As the question states above, I am looking for a way to update the A Record and CNAME to update through powershell. essentially leverage this feature so I can update my static IP for certain sub domains I use. Thanks for your insights in advance,

Microsoft 365 and Office | Subscription, account, billing | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

10 answers

Sort by: Most helpful
  1. Anonymous
    2015-12-07T13:24:14+00:00

    Hi Rathna1,

    It’s not supported to use cmdlets for PowerShell to update DNS records. To update DNS records, you can perform the operation on Office 365 Admin Page or your domain’s hosting provider.

    Thanks for your understanding.

    Spike

    0 comments No comments
  2. Anonymous
    2015-12-07T15:02:48+00:00

    so you cannot use cmdlets just for this? I see there is cmdlets for update, adding domains.

    0 comments No comments
  3. Anonymous
    2015-12-08T00:04:00+00:00

    Hi Rathna1,

    Actually, PowerShell provides another way to manage domains, just like you do it using interface buttons. However, it requires you to modify the related DNS records in your DNS hosting provider to complete the whole steps. We suggest you ask your DNS host support for further assistance.

    Regards,

    Fraser

    0 comments No comments
  4. Anonymous
    2015-12-08T09:46:57+00:00

    I just need a way to do this programmatically. what would be the other interface you are referring to? I can try that as well.

    0 comments No comments
  5. Anonymous
    2015-12-09T01:32:10+00:00

    hi rathna1,

    if you haven’t changed your domain's ns (nameserver) records at your domain registrar to point to office 365 nameservers, please modify your dns records (in your scenario are the a and cname records) there.

    if you have done that, since you can’t edit the default dns record which office 365 has set for you and add new a one through powershell, i suggest you perform the steps below:

    1.sign in to the office 365 portal.

    2.go to admin center.

    3.click domains in the right navigation.

    4.select the domain for which you want to add a new dns record.

    5.click domain setting.

    6.click![](http://fud.community.services.support.microsoft.com/Fud/FileDownloadHandler.ashx?fid=1fc4447d-0c76-4837-99be-686d2052bd56).

    7.choose the dns record you want to add.

    8.fill in the information required and click save.

    please note that we can only add the a record, aaaa record, txt record and cname record at office 365. if you want to add other kinds of dns records, you might need host your dns at a 3rd party dns hosting provider.

    regards,

    fraser

    0 comments No comments