This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Enter FQDN" | |
read dns | |
echo "Enter IP Address" | |
read ip | |
# Zone ID | |
HOSTED_ZONE=<your_zone_id> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Enter an IP address or DNS name" | |
read value | |
# Zone ID | |
HOSTED_ZONE=YOUR_HOSTED_ZONE_ID | |
# Check if value is an IP address or DNS name | |
if [[ $value =~ ^[[:digit:]] ]]; then | |
echo "Querying Route53 for IP address $value" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$credential = Get-Credential "" | |
$samAccountName = Read-Host -Prompt "Enter samAccountName" | |
$new = Read-Host -Prompt "Enter new alias" | |
$user = Get-ADuser $samAccountName -Properties proxyAddresses -Credential $credential | |
$user.proxyAddresses.Add("smtp:$new@example.com") | |
Set-ADuser -instance $user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Create a VMware VM from an existing Redhat VMware template | |
hosts: localhost | |
connection: local | |
gather_facts: no | |
tasks: | |
- name: Clone the template | |
vmware_guest: | |
hostname: vcenter.example.com | |
username: <username> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Email::Sender::Simple qw(sendmail); | |
use Email::Sender::Transport::SMTP (); | |
use Email::Simple (); | |
use Email::Simple::Creator (); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$credential = Get-Credential | |
Invoke-Command -ComputerName "domaincontroller.example.com" -Credential $credential -ScriptBlock { | |
$groupSamAccountName = Read-Host -Prompt "Enter group samAccountName" | |
$members = Read-Host -Prompt "Enter comma delimitered list of members" | |
Write-Host "Adding group member(s) '$members' to group '$groupSamAccountName'" | |
Add-ADGroupMember -Identity $groupSamAccountName -Members $members |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$credential = Get-Credential | |
Invoke-Command -ComputerName "domaincontroller.example.com" -Credential $credential -ScriptBlock { | |
$hostname = Read-Host -Prompt "Enter host name" | |
$ip = Read-Host -Prompt "Enter IP Address" | |
Write-Host "Creating A Record for host '$hostname' having IP '$ip'" | |
Add-DNsServerResourceRecordA -Name $hostname ` |