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-09T08:04:31+00:00

    Office 365 is already managing my domain thats why I am asking the question here.

    0 comments No comments
  2. Anonymous
    2015-12-10T05:10:08+00:00

    Hi Rathna1,

    I have reviewed the conversation above and i noticed that we have been focusing on "how to" instead of "what you want" to achieve in your final goal. Let me try to get this moving forward.

    1. Share with me what is your current scenario
    2. Share with me the end result you want to achieve

    It would be better if you can provide the screenshot as well as the interface that you are seeing could be different from what we are having. I have read your requirement "update my static IP for certain sub domains I use", however i would like to know what you are seeing before proceeding with further details.

    Leave the rest to us to come out with the right procedure. We will let you know if this is doable.

    I have sent you a Private Message (PM) so that you can share us your domain name in case we need to look up for the DNS record.

    community.office365.com/.../conversations

    Thanks,

    Chee Loon

    0 comments No comments
  3. Anonymous
    2015-12-10T08:16:54+00:00

    I am trying to update an "A Record" programmatically without manually doing it in the GUI, as and when, my static ip address change for the sub domain I sent a PM about.

    0 comments No comments
  4. Anonymous
    2015-12-11T08:54:43+00:00

    got any update?

    0 comments No comments
  5. Anonymous
    2015-12-12T11:35:43+00:00

    There is no PowerShell cmdlets to update DNS records. Best practice is to carry out this task via GUI.

    Based on my understanding, the logic behind this request is that you would like to take advantage of Office 365 DNS delegation to direct one of your web address to an external web host. This web host probably hosted on a server connected on a broadband connection(or at home) with a dynamic ip address. In order to make sure that this site is always available, a script is used to check every change of the ip address and update O365 DNS record with the new ip address via cmdlet.

    In addition to this, from the information shared via PM, this is a subdomain that you would like to redirect to an external address. There is already an existing public website and this is the second one. Please refer to the article below for more information in case you had attempted to add DNS record via GUI.

    https://support.office.com/en-us/article/Add-or-edit-custom-DNS-records-in-Office-365-AF00A516-DD39-4EDA-AF3E-1EAF686C8DC9

    "Can’t update the A record or the CNAME record?"

    0 comments No comments