View Simple-S3Bucket-SNS
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
--- | |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: Simple S3 Bucket with SNS Trigger | |
Parameters: | |
BucketName: | |
Type: String | |
Description: The name of the S3 Bucket to create |
View SQS-SNS-Subscription
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
--- | |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: SQS Queue subscribed to an SNS Topic | |
Parameters: | |
SourceSNSTopicArn: | |
Type: String | |
Description: SNS Topic Arn to subscribe the SQS Queue to |
View Get-AWSCommandsFromFile.ps1
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
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) |
View Get-AWSRegionLatency
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
function Get-AWSRegionLatency { | |
param ( | |
[ValidateSet('dynamodb')] | |
[String] $ServiceForMeasurement = 'dynamodb' | |
) | |
$endpoints = [System.Collections.ArrayList]::new() | |
$regions = (Get-AWSRegion | Where-Object {$_.Region -notlike 'us-iso*'}).Region | |
foreach ($region in $regions) { | |
$null = $endpoints.Add(('{0}.{1}.amazonaws.com' -f $ServiceForMeasurement, $region)) |
View AWS-ApplyDSCMofs
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
# Overview | |
This Gist provides samples to simplify the usage of the AWS Systems Manager Document, "AWS-ApplyDSCMofs". |
View Get-EpochTimeFrom.ps1
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
function Get-EpochTimeFrom { | |
param ( | |
[int]$Seconds | |
) | |
(Get-Date -Date '01-01-1970') + ([System.TimeSpan]::FromSeconds($Seconds)) | |
} |
View SuppressMessageAttribute
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
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingCmdletAliases', '')] | |
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] | |
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingWriteHost', '')] |
View Write-SSMComplianceItemExample
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
$managedInstanceId = (Get-Content -Path 'C:\ProgramData\Amazon\SSM\InstanceData\Vault\Store\RegistrationKey' -Raw | ConvertFrom-Json).instanceID | |
$moduleNames = @( | |
'AWSPowerShell', | |
'ClipboardText', | |
'Convert', | |
'PSWindowsUpdate' | |
) | |
$complianceItems = [System.Collections.Generic.List[Amazon.SimpleSystemsManagement.Model.ComplianceItemEntry]]::new() | |
foreach ($moduleName in $moduleNames) |
View Invoke-FastPing
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
# This has been replaced by the FastPing PowerShell Module. | |
## Source | |
[GitHub](]https://github.com/austoonz/FastPing) | |
## Installation | |
```powershell | |
Install-Module -Name FastPing -Scope CurrentUser |
View Windows10-1809-RAST
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
# 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 |
NewerOlder