Skip to content

Instantly share code, notes, and snippets.

View austoonz's full-sized avatar

Andrew Pearce austoonz

View GitHub Profile
@austoonz
austoonz / Create-SSMAssociation
Created February 6, 2019 01:37
This scriptblock will create or update an AWS Systems Manager association
$ProfileName = ''
$AWSRegion = 'us-west-2'
$AssociationName = 'MyAssociationName'
$ComplianceSeverity = [Amazon.SimpleSystemsManagement.AssociationComplianceSeverity]::MEDIUM
$MaxConcurrency = '10%'
$MaxError = '5%'
$ExecutionTimeoutInSeconds = '300'
$ScheduleExpression = 'rate(1 hour)'
@austoonz
austoonz / AWS-ApplyDSCMofs
Last active April 14, 2025 05:21
Samples for deploying an AWS Systems Manager Association using the 'AWS-ApplyDSCMofs' Document.
# Overview
This Gist provides samples to simplify the usage of the AWS Systems Manager Document, "AWS-ApplyDSCMofs".
@austoonz
austoonz / Invoke-FastPing
Last active March 1, 2019 17:02
A PowerShell Function that uses asynchronous ping commands to quickly ping a fleet of target machines.
# This has been replaced by the FastPing PowerShell Module.
## Source
[GitHub](]https://github.com/austoonz/FastPing)
## Installation
```powershell
Install-Module -Name FastPing -Scope CurrentUser
# Get a list of RSAT Capabilities
Get-WindowsCapability -Name RSAT* -Online | Select-Object -Property DisplayName, State
# Install RSAT
Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online
@austoonz
austoonz / Get-AWSCommandsFromFile.ps1
Last active April 21, 2022 05:39
This function will use the PowerShell Parser, and the Get-AWSCmdletName cmdlet (found in AWS.Tools.Common, AWSPowerShell or AWSPowerShell.NetCore) to find and output all AWS Cmdlets from a script. This can be used to assist with migrations to the modular AWS Tools for PowerShell.
function Get-AWSCommandsFromFile {
[CmdletBinding()]
param (
[ValidateScript({Test-Path -Path $_ -PathType Leaf})]
$FilePath
)
$awsCommands = @{}
$tokens = [System.Management.Automation.PSParser]::Tokenize((Get-Content -Path $FilePath -Raw), [ref]$null)
@austoonz
austoonz / new-repo.ps1
Last active March 25, 2026 16:04
Create GitHub repo with Forge & Sentinel GitHub App setup
param(
[Parameter(Mandatory)][string]$RepoName
)
$Owner = gh api /user --jq .login
gh repo create "$Owner/$RepoName" --private --clone
Set-Location $RepoName
$RepoId = gh api "/repos/$Owner/$RepoName" --jq .id