Note: Please go to docs.rightscale.com to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > RightScale Community Resources > RightScale OSS > DNS Made Easy Powershell Tools

DNS Made Easy Powershell Tools

Table of Contents
No headers

This script installs a PowerShell module that provides a wrapper for the DNS Made Easy REST API. The module also provides some helper cmdlets for the following operations:

Add-ARecord
Get-Records
Remove-Record

 

The cmdlets return XMLDocument objects that are easily traversable using PowerShell. The following script is an example of importing the DNS Made Easy PowerShell mdule and using the "Add-Arecord" and "Get-Records" functions to update and list DNS records hosted with DNS Made Easy:

 

# Add DMeTools module to powershell session
Import-Module DmeHelpers

# Read variables from dashboard inputs
$apiKey = "$env:DME_API_KEY"
$secretKey = "$env:DME_SECRET_KEY"
$domain = "$env:DNS_DOMAIN_NAME"
$dnsARecord = "$env:DNS_A_RECORD"

# Add A Record
Add-ARecord -apiKey $apiKey -secretKey $secretKey -domain $domain -subDomain "$dnsARecord" -ipAddress "$env:RS_PRIVATE_IP"

# List records
$dnsRecords = Get-Records -apiKey $apiKey -secretKey $secretKey -domain $domain
$dnsRecords.record | ft
 
You must to post a comment.
Last modified
23:36, 16 May 2013

Tags

This page has no custom tags.

Classifications

This page has no classifications.

Announcements

None


© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.