Skip to content

Instantly share code, notes, and snippets.

View clintcolding's full-sized avatar

Clint Colding clintcolding

View GitHub Profile
@clintcolding
clintcolding / bluecatscripts.ps1
Created July 24, 2018 15:42
Bluecat/Proteus API PowerShell Scripts
# API Documentation can be at http://timlossev.com/attachments/Proteus_API_Guide_3.7.1.pdf
# Connecting the the API
$credential = Get-Credential
$uri = "http://bluecatserver/Services/API?wsdl"
$bc = New-WebServiceProxy -Uri $uri
$bc.CookieContainer = New-Object System.Net.CookieContainer
$bc.login($Credential.UserName, ($Credential.GetNetworkCredential()).Password)
# Find IP based on assigned name in Bluecat
C:\> Invoke-WebRequest https://api.godaddy.com/v1/domains/clintcolding.com/records/ -Method Get -Headers $Headers | ConvertFrom-Json
type name data ttl
---- ---- ---- ---
A @ 192.30.252.153 600
A @ 192.30.252.154 600
CNAME email email.secureserver.net 3600
CNAME ftp @ 3600
CNAME www @ 3600
CNAME _domainconnect _domainconnect.gd.domaincontrol.com 3600
C:\> Invoke-WebRequest https://api.godaddy.com/v1/domains/clintcolding.com/records/ -Method Get -Headers $Headers
StatusCode : 200
StatusDescription : OK
Content : [{"type":"A","name":"@","data":"192.30.252.153","ttl":600},{"type":"A","name":"@","data":"19
2.30.252.154","ttl":600},{"type":"CNAME","name":"email","data":"email.secureserver.net","ttl
":3600},{"type":...
RawContent : HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Vary: Origin,Accept-Encoding
@clintcolding
clintcolding / apiheader
Created November 29, 2017 17:11
GoDaddy API Auth Header
$apiKey = '2s7Yn1f2dW_W5KJhWbGwuLhyW4Xdvgb2c'
$apiSecret = 'oMmm2m5TwZxrYyXwXZnoN'
$Headers = @{}
$Headers["Authorization"] = 'sso-key ' + $apiKey + ':' + $apiSecret