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 / Folder permisions
Last active January 18, 2022 16:11
A Quick way to see folder permisions recursivly in WIndows #Utility #Inventory #Windows #Security #File_System #Public
$folder = "full:path/to/directory"
$paths = get-childitem $folder -recurse
Foreach ($path in $paths) {
$path | get-acl | foreach{ $_.Access } | ft -AutoSize -property @{n="Path"; e={$path.Directory}} <#, @{n="file"; e={$path.name}} #>, IdentityReference, AccessControlType, FileSystemRights
}
#If you want to get to the file level for permissions, then remove the <# #> from the line above.
@Rugby-Ball
Rugby-Ball / check-s3-Encryption-At-Rest-on.ps1
Created March 8, 2022 15:03
Used to check the S3 Buckets Encryption at rest status #Utility #Inventory #AWS #Public #S3
#check-s3-Encryption-At-Rest-on.ps1
<#
Description: Used to check the S3 Buckets Encryption at rest status
Written: Ed Walsh
PowerShell.Core tested: No
Version: 1.0.0
Create Date: 03/8/2022
Revised Date: 03/8/2022
#>
@Rugby-Ball
Rugby-Ball / OpenSSL-Commands.md
Created March 16, 2022 22:09
A list of OpenSSL commands for converting PEM and PFX files for use with SSL certs #OpenSSL #Utility #Markdown #SSL_Certificate #Public

OpenSSL commands

Converting PFX to individual PEM files.

If you want to do a conversion to separate the individual PEM files out of the PFX file. Follow these steps below to get the three files.

  1. Private Key (.key)
  2. Certificate Body (.pem or .crt)
  3. CA Cert (.cer).

Private key extraction

@Rugby-Ball
Rugby-Ball / test_active-directory_credential.ps1
Last active April 12, 2022 19:41
Test if the Active Directory credentials work. #Public #Security #Active_Directory #Utility
# test_active-directory_credential.ps1
<#
Description: Test if the Active Directory credentials work.
Written: Ed Walsh
PowerShell.Core tested: Not tested
Version: 1.0.0
Create Date: 4/12/2022
Revised Date: 4/12/2022
#>
$cred = Get-Credential
@Rugby-Ball
Rugby-Ball / local_account_password_reset_all_Windows_Computers_in_Active_Directory.ps1
Created June 13, 2022 03:20
This will pull all AD Windows computers that have checked in within within the days set in variable $DaysInactive You set what local account to reset, I have Test but can change to Administrator. It will then make a new 20 character randomized password for each servers and set the local account on the server, and then log it. after all done, it …
# local_account_password_reset_all_Windows_Computers_in_Active_Directory.ps1
<#
Description: This will pull all AD Windows computers that have checked in within within the days set in variable $DaysInactive
You set what local account to reset, I have Test but can change to Administrator.
It will then make a new 20 character randomized password for each servers and set the local account on the server, and then log it. after all done, it will output the Log of all changes to a csv.
Written: Ed Walsh
PowerShell.Core tested: No
Version: 1.0.0
Create Date: 06/12/2022
Revised Date: 06/12/2022
@Rugby-Ball
Rugby-Ball / MS_Graph_Azure_AD_User_Details.ps1
Last active August 23, 2022 22:01
This uses Microsoft Graph, and your account needs permission to read the Scopes listed. This will pull details on all Non-Guest users types and export them to a csv file. #Azure #MS-Graph #Utility #Security #Active_Directory #Public
# MS_Graph_Azure_AD_User_Details.ps1
<#
Description: This uses Microsoft Graph, and your account needs permission to read the Scopes listed.
This will pull details on all Non-Guest users types and export them to a csv file.
Written: Ed Walsh
PowerShell.Core tested: No
MS-Graph: Yes
Version: 1.1.2
Create Date: 8/18/2022
Revised Date: 8/23/2022
@Rugby-Ball
Rugby-Ball / check-rt53-hostedzone-entries-are-active.ps1
Last active November 29, 2022 14:09
Check the web status code for each url in a RT53 HostedZone and save into a csv file. #AWS #Utility #Public #Route_53 #Maintenance #Inventory
#check-rt53-hostedzone-entries-are-active.ps1
#Check the web status code for each url in a RT53 HostedZone and save into a csv file. If URL_Resolves = Yes and Web_Status_Code is Blank, it usually means a wesbite time out.
#Version: 3.0
#Tested with Windows Powershell: 5.1, 7.0.3
#Tested with MacOS PowerShell : 7.0.3
#Create Date 10/25/2020
#Update Date: 11/28/2022
#Created: Ed Walsh
import-module awspowershell
@Rugby-Ball
Rugby-Ball / AD-User-Lookup-and-inventory.ps1
Last active April 20, 2023 14:58
This will connect to a Domian Controller and query a single user or all users depening on what you set for the $SearchCriteria variable. and Pull details about the AD Account(s). #Utility #Active_Directory #Inventory #Public
#AD-User-Lookup-and-inventory.ps1
<#
Description: This will connect to a Domain Controller and query a single user or all users depending on what you set for the $SearchCriteria variable. and Pull details about the AD Account(s).
Written: Ed Walsh
PowerShell.Core tested: No
MS-Graph: No
Version: 1.1.1
Create Date: 1/18/2020
Revised Date: 4/20/2023
#>
@Rugby-Ball
Rugby-Ball / SSM-Managed-active-EC2-list.ps1
Created September 17, 2022 03:49
Pull a list of Online, EC2s Servers that are SSM Managed across all AWS Regions; export to csv file. The ComputerName field is the HostName of the server. One use for this is to feed another PowerShell script to remote Powershell connect to Windows servers on an AD with Kerberos Authentication using servers Hostname (which is computername in thi…
# SSM-Managed-active-EC2-list.ps1
<#
Description: Pull a list of Online, EC2s Servers that are SSM Managed across all AWS Regions; export to csv file. The ComputerName field is the HostName of the server. One use for this is to feed another PowerShell script
to remote Powershell connect to Windows servers on an AD with Kerberos Authentication using servers Hostname (which is computername in this list).
Written: Ed Walsh
PowerShell.Core tested: Not tested
MS-Graph: No
Version: 1.0.0
Create Date: 9/16/2022
Revised Date: 9/16/2022
@Rugby-Ball
Rugby-Ball / inventory-enabled-user-created-scheduled-tasks.ps1
Last active February 2, 2023 21:07
Get a list of all enabled User created Windows Scheduled Tasks exported to csv. #Inventory #Public #Scheduled_Tasks #Task_Scheduler
# inventory-enabled-user-created-scheduled-tasks.ps1
<#
Description: Get a list of all enabled User created Windows Scheduled Tasks exported to csv.
Written: Ed Walsh
PowerShell.Core tested: Not Tested
MS-Graph: No
Version: 2.1.0
Create Date: 11/1/2018
Revised Date: 02/02/2023
#>