{"id":2201,"date":"2014-04-02T20:52:07","date_gmt":"2014-04-02T20:52:07","guid":{"rendered":"http:\/\/dollarunderscore.azurewebsites.net\/?p=2201"},"modified":"2017-06-05T21:07:32","modified_gmt":"2017-06-05T19:07:32","slug":"lets-build-a-infoblox-powershell-module-for-dns-management","status":"publish","type":"post","link":"https:\/\/p0wershell.com\/?p=2201","title":{"rendered":"Let&#8217;s build a Infoblox PowerShell Module!"},"content":{"rendered":"<p>If you haven&#8217;t heard of it, Infoblox is making appliances and solutions for enterprise networks. One of them is the <a href=\"http:\/\/www.infoblox.com\/products\/dns-dhcp-services\/ddi\" target=\"_blank\">Infoblox Trinzic DDI<\/a>\u00a0which manages DNS, DHCP and IPAM.<\/p>\n<p>Infoblox does not seem to have any plans for delivering a PowerShell module for managing their product, which is a bit weird since it would probably make it a bit easier for network admins trying to move windows engineers away from Active Directory Integrated DNS, and instead let the Infoblox appliance host\u00a0all or some of their zones (which seems to be a common enough debate among enterprises).<br \/>\nBut in their defence they have <a href=\"https:\/\/community.infoblox.com\/resource\/getting-started-infoblox-web-api-wapi\" target=\"_blank\">released a REST-based API<\/a> for this appliance which enables administrators to basically build whatever tools they want to manage anything from DNS records to IPAM.<\/p>\n<p>I&#8217;ve therefore started to build a module for managing DNS-records hosted by the Infoblox, but since my experience with this product is fairly limited, I thought I would post what I&#8217;ve done so far to get opinions from people with more experience with this product.<\/p>\n<p>I&#8217;ve only done a few\u00a0cmdlets (advanced functions) for managing\u00a0a few\u00a0common DNS record tasks. So far these are:<\/p>\n<ul>\n<li>Add-IBResourceRecordA<\/li>\n<li>Add-IBResourceRecordCName<\/li>\n<li>Add-IBResourceRecordHost<\/li>\n<li>Get-IBResourceRecord<\/li>\n<li>Remove-IBResourceRecord<\/li>\n<li>Set-IBResourceRecord<\/li>\n<\/ul>\n<p>Some usage examples:<br \/>\n[PowerShell]<br \/>\n# Adding a A-record<br \/>\nAdd-IBResourceRecordA -IPv4Address 1.2.3.4 -HostName myhost.contoso.com -GridServer $MyInfobloxGrid -Credential $MyCredential<\/p>\n<p># Adding a hundred A-records<br \/>\n1..100 | % { Add-IBResourceRecordA -IPv4Address 1.2.3.$_ -HostName myhost$_.contoso.com -GridServer $MyInfobloxGrid -Credential $MyCredential }<\/p>\n<p># Searching for those records<br \/>\nGet-IBResourceRecord -RecordType A -RecordValue myhost* -GridServer $MyInfobloxGrid -Credential $MyCredential<\/p>\n<p># Search for\u00a0a record\u00a0by IP-address<br \/>\nGet-IBResourceRecord -RecordType A -SearchField ipv4addr -RecordValue 1.2.3.4 -GridServer $MyInfobloxGrid -Credential $MyCredential<\/p>\n<p># Removing all of them<br \/>\nGet-IBResourceRecord -RecordType A -RecordValue myhost* -GridServer $MyInfobloxGrid -Credential $MyCredential -Passthrough | Remove-IBResourceRecord<\/p>\n<p># Add a HOST record<br \/>\nAdd-IBResourceRecordHost -IPv4Address 1.2.3.4 -HostName myhost.contoso.com -GridServer $MyInfobloxGrid -Credential $MyCredential<\/p>\n<p># Change the IP-address of that record (A-record needs some tweaking before they work, I&#8217;m working on it&#8230;)<br \/>\nGet-IBResourceRecord -RecordType Host -RecordValue myhost.contoso.com -GridServer $MyInfobloxGrid -Credential $MyCredential -Passthrough | Set-IBResourceRecord -IPv4Address 4.3.2.1<\/p>\n<p># Add a CName<br \/>\nAdd-IBResourceRecordCName -HostName cname.contoso.com\u00a0 -Canonical myhost2.contoso.com -GridServer $MyInfobloxGrid -Credential $MyCredential<br \/>\n[\/PowerShell]<\/p>\n<p>Screenshot:<br \/>\n<a href=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/04\/infoblox.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2221\" src=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/04\/infoblox.png\" alt=\"Infoblox module in action...\" width=\"1157\" height=\"642\" srcset=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/04\/infoblox.png 1157w, https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/04\/infoblox-300x166.png 300w, https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/04\/infoblox-1024x568.png 1024w, https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/04\/infoblox-624x346.png 624w\" sizes=\"(max-width: 1157px) 100vw, 1157px\" \/><\/a><\/p>\n<p>This is very early in the development of this module, so it\u00a0probably have a few bugs, and there are a lot of cmdlets that needs to be written!<\/p>\n<p>Anyone out there that wants help or have any thoughts?<\/p>\n<p>Please post a comment here or join <a href=\"https:\/\/community.infoblox.com\/forum\/ddi\/started-working-powershell-module\" target=\"_blank\">this thread<\/a> in the Infoblox community forum.<\/p>\n<p><em><strong>The code\u00a0for this early version of the module\u00a0is available at the <a href=\"https:\/\/github.com\/DollarUnderscore\/Infoblox-PowerShell-Module\" target=\"_blank\">Github repo<\/a>!<\/strong><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you haven&#8217;t heard of it, Infoblox is making appliances and solutions for enterprise networks. One of them is the Infoblox Trinzic DDI\u00a0which manages DNS, DHCP and IPAM. Infoblox does not seem to have any plans for delivering a PowerShell module for managing their product, which is a bit weird since it would probably make [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[621,201,391,21],"tags":[741,1101,731,751],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3Zj0A-zv","_links":{"self":[{"href":"https:\/\/p0wershell.com\/index.php?rest_route=\/wp\/v2\/posts\/2201"}],"collection":[{"href":"https:\/\/p0wershell.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/p0wershell.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/p0wershell.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/p0wershell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2201"}],"version-history":[{"count":0,"href":"https:\/\/p0wershell.com\/index.php?rest_route=\/wp\/v2\/posts\/2201\/revisions"}],"wp:attachment":[{"href":"https:\/\/p0wershell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/p0wershell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/p0wershell.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}