- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
issues adding host record to zone of DNS View
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2019 09:17 AM - edited 04-09-2019 07:57 PM
Hello,
I am trying to add a host record to a zone of a DNS view. The DNS view I am working with is named "MS DNS mydev.com". The authoritative zone within the view is named "mydev.com". I thought the PowerShell below would handle this, but I keep getting "400 Bad Request". I've read up on this a bit, I am positive it has something to do with me not understanding the difference between Network View and DNS View as they relate to the view parameter in the request below. The code snippit below returns "The remote server returned an error: (400) Bad Request.".
Thanks for the help!
$cred = Get-Credential $body = @{ name = 'joey2.mydev.com' ipv4addrs = @( @{ ipv4addr = '192.168.200.51' } ) view = 'MS DNS mydev.com' } | ConvertTo-Json $uri = "https://ipam.blah.com/wapi/v2.7.3/record:host" Invoke-WebRequest -Uri $uri -Method Post -Credential $cred -UseBasicParsing -Body $body -ContentType 'application/json'