Skip to content

Instantly share code, notes, and snippets.

View Rugby-Ball's full-sized avatar

Ed Walsh Rugby-Ball

View GitHub Profile
@Rugby-Ball
Rugby-Ball / ssl-cert-scan-inventory-IIS-servers.ps1
Last active July 7, 2023 14:28
Do a search/inventory for a specific domains SSL across all Running Domain joined IIS servers. Will also pull in ALL ssl certs installed on all server for #Powershell #Inventory #Utility #WebServer #SSL_Certificate #Public # SSL # IIS
#ssl-cert-scan-inventory-IIS-servers.ps1
<#
Description: Pull ALL ssl certs installed on all Windows servers for a full inventory of installed SSL Certificates.
Written: Ed Walsh
PowerShell.Core tested: No
@Rugby-Ball
Rugby-Ball / ec2-snapshots-full-inventory.ps1
Last active June 24, 2021 22:33 — forked from MatthewJDavis/Get-EC2InstanceLatestSnapshot.ps1
Modified from original to scan all AWS Regions, and allow wildcard to pull in all EC2's and associated snapshots for the EBS volumes
#ec2-snapshots-full-inventory.ps1
#This will pull an inventory of all snapshots for all EBS volumes attached to an EC2 Instance.
#Can take wildcard to pull in all EC2 instances in all regions, or an EC2 Tag:NAME value to look for only one EC2 across all regions.
#Scans all AWS Regions.
# original from: https://matthewdavis111.com/powershell/ec2-latest-snapshots-of-attached-volumes/
#Altered to fit needs.
#Altered by: Ed Walsh
#Originally Modified: 01/20/2021
#Edited: 06/24/2021
#
@Rugby-Ball
Rugby-Ball / ALB-Detail.ps1
Created June 25, 2021 22:25
This will give Application Load Balancer details, list all Target Groups and Instances associated to them. #Utility #AWS #Inventory #AWS_ELB #AWS_ALB
#ALB-Detail.ps1
#This will give Application Load Balancer details, list all Target Groups and Instances associated to them.
#It works, but I am adding some new features, like cross-region scanning, so consider this a work in progress for now.
#Created Dtae; 6/25/2021
#Modified Date: 6/25/2021
#Created by: Ed Walsh
$out = @()
$o = ""
@Rugby-Ball
Rugby-Ball / search_rt53_entries_for_IP.ps1
Last active September 14, 2022 22:05
Enter in the IP, CNAME, or a wildcard search string in $iplist to look in ALL Route 53 Hosted Zones. #Utility #Inventory #Route_53 #AWS #Public
#search_rt53_entries_for_IP.ps1
#Enter in the IP, CNAME, or a wildcard search string in $iplist to look in ALL Route 53 Hosted Zones.
#Version: 1.5
#Date Created: 10/19/2020
#Date Updated: 9/14/2022
#Created: Ed Walsh
#
#
#Use this to check PoSh version and save to correct location for cvs outputs.
$timestamp = get-date -format yyyyMMddHHmmss
@Rugby-Ball
Rugby-Ball / web-bindings-formated.ps1
Last active August 4, 2021 14:42
Formats the IIS Website bindings to a more human readable format. #Inventory #WebServer #IIS
#web-binding-formated.ps1
#Formats the IIS Website bindings to a more human readable format.
Get-WebBinding | ForEach-Object {
$name = $_.ItemXPath -replace '(?:.*?)name=''([^'']*)(?:.*)', '$1'
$Server = $env:COMPUTERNAME
New-Object psobject -Property @{
Server = $server
Name = $name
Protocol = $_.protocol
Port = $_.bindinginformation.Split(":")[-2]
@Rugby-Ball
Rugby-Ball / Inventory of AD computers and groups they are in
Created August 9, 2021 22:07
This will get all of the Computers in an AD, and display the Server name, the Distinguished Name and the Groups the computer is a Member of. (groups they are in) #Inventory #Active_Directory
#This will get all of the Computers in an AD, and display the Server name, the Distinguished Name and the Groups the computer is a Member of. (groups they are in)
((Get-ADComputer -Filter *).samaccountname).trimend("$") | Get-ADComputer -Properties memberOf | Select-Object -Property @{N= "Name";E= {($_.samaccountname).trimend("$")}}, @{N= "Distinguished_Name";E= {$_.DistinguishedName}}, @{N= "Groups";E={$_.Memberof}} | Sort Name | Out-GridView
@Rugby-Ball
Rugby-Ball / IIS-web_site-and-app-details.ps1
Last active August 17, 2021 19:31
Pulls IIS Website and Web Application details from a list of servers. #Inventory #IIS #Public #WebServer
#IIS-web_site-and-app-details.ps1
#Pulls IIS Website and Web Application details from a list of servers.
#Version 1.0
#Created: 8/17/2021
#Modified: 8/17/2021
#Created by: Ed Walsh
#Sets up file path depending on OS this is run on. Should save to Documents or Home folder. And should run on PowerShell Core.
$timestamp = get-date -format yyyyMMddHHmmss
$subfolder = if (($PSVersionTable.PSEdition) -eq "Core") { if ( $True -eq $iswindows ) { "\Documents\" } Else { "" } } Else { "\Documents\" }
@Rugby-Ball
Rugby-Ball / inventory-of-Windows-Scheduled-Task-in-AWS.ps1
Last active November 2, 2022 21:58
Run across all running Windows Instances across all Regions in AWS and pull in the Scheduled Task /Task Scheduler info from Task Path \ #Inventory #Windows #AWS #Scheduled_Tasks #Task_Scheduler #Public
# inventory-of-Windows-Scheduled-Task-in-AWS.ps1
<#
Description: Run across all running Windows Instances across all Regions in AWS and pull in the Scheduled Task /Task Scheduler info from Task Path \
Written: Ed Walsh
PowerShell.Core tested: Not Tested
Version: 1.3
Create Date: 09/30/2021
Revised Date: 11/02/2022
#>
@Rugby-Ball
Rugby-Ball / PowerShell Module Dependency check
Last active October 5, 2021 17:20
Use this Snippet at the beginning of your PowerShell to check for a Module Dependency and install if its missing. #Snippet #Public
# PowerShell Module Dependency check.
#
$modulename = "SqlServer" #PowerShell Module Dependency to check
if(-not(Get-Module -name $modulename))
{
if(Get-Module -ListAvailable |
Where-Object { $_.name -eq $modulename })
{
Import-Module -Name $modulename
$true
@Rugby-Ball
Rugby-Ball / eventlog_S3_backup_purge.ps1
Created October 6, 2021 23:04
Backup and clear EventLogs and move to an AWS S3 Bucket. Keeps the last XX days of backups locally. #Utility #Public #S3 #BackUp #Event_Log #AWS #Windows
# eventlog_S3_backup_purge.ps1
<#
Description: Backup and clear EventLogs and move to an AWS S3 Bucket. Keeps the last XX days of backups locally.
Written: Ed Walsh
PowerShell.Core tested: Not Tested
Version: 1.0.0
Create Date: 10/6/2021
Revised Date: 10/6/2021
#>
#