This file contains hidden or 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
| # aws-rt53-hostedzone-spf-inventory.ps1 | |
| #Install-Module -name DomainHealthChecker # Only needed if you don't already have the Module installed | |
| import-module -name DomainHealthChecker, AWSPowerShell.netcore | |
| $all = @() | |
| $urls_check = Get-R53HostedZoneList | |
| foreach ($url in $urls_check) { | |
| $all += get-spfrecord -Name $url.name | Select-Object @{ name="HostedZoneID";e={$url.id.substring(12)} }, @{ name="HostedZone";e={$url.name.trimend(".")} } , SPFRecord | |
| } |
This file contains hidden or 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
| # Azure-Subscription-Inventory.ps1 | |
| <# | |
| Description: For Azure, get inventory of items in a Subscription. | |
| Written: Ed Walsh | |
| PowerShell.Core tested: Yes | |
| MS-Graph: No | |
| Version: 1.0.0 | |
| Create Date: 9/14/2023 | |
| Revised Date: 9/14/2023 | |
| #> |
This file contains hidden or 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
| #FSx-List-ALL-Regions.ps1 | |
| <# | |
| Description: Pull an Inventory of all FSx across all regions. Export to a CSV file. | |
| Written: Ed Walsh | |
| PowerShell.Core tested: Yes | |
| MS-Graph: No | |
| Version: 1.1 | |
| Create Date: 9/11/2023 | |
| Revised Date: 9/11/2023 | |
| #> |
This file contains hidden or 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
| #CloudFront-Distro-List-ALL-Regions.ps1 | |
| <# | |
| Description: Pull an Inventory of all Cloudfront distributions across all regions. Export to a CSV file. | |
| You will see the regions a CloudFront distribution is in. | |
| Written: Ed Walsh | |
| PowerShell.Core tested: Yes | |
| MS-Graph: No | |
| Version: 1.0 | |
| Create Date: 9/6/2023 | |
| Revised Date: 9/6/2023 |
This file contains hidden or 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
| $targetfolder='\\computer_name\data\' # Can use Drive letters, or UNC Paths that you have permissions to. | |
| # | |
| ##Check if c:\temp exists, if it doesnt create it. | |
| If (-not(Test-Path -Path "c:\temp")) | |
| { New-Item -ItemType Directory -Force -Path C:\temp } | |
| $dataColl = @() | |
| Get-ChildItem -force $targetfolder -recurse -ErrorAction SilentlyContinue | Where-Object { $_ -is [io.directoryinfo] } | % { | |
| $len = 0 |
This file contains hidden or 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
| # ACM-Service-list-with-ACM-InUse.ps1 | |
| <# | |
| Description: Pull an Inventory of AWS Certificate Manager (ACM) that are `ISSUED` and the AWS Service using them across all AWS regions. Export to a CSV file. | |
| Written: Ed Walsh | |
| PowerShell.Core tested: Yes | |
| MS-Graph: No | |
| Version: 1.3 | |
| Create Date: 7/25/2023 | |
| Revised Date: 7/28/2023 | |
| #> |
This file contains hidden or 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
| #Install-Module -name DomainHealthChecker # Only needed if you don't already have the Module installed | |
| import-module -name DomainHealthChecker | |
| $all = @() | |
| #You need the DKIM selector to pull the correct DKIM record. | |
| $urls_check = @( [pscustomobject]@{'domain'="domain0.com";'dkim_selector'="s6840"}, | |
| [pscustomobject]@{'domain'="domain1.com";'dkim_selector'="cast717"} | |
| ) | |
| $runon = Get-date -Format "MM/dd/yyyy HH:mm tt K" | |
| foreach ($url in $urls_check) { | |
| #There is a bug in Invoke-SpfDkimDmarc, v1.6 where it only uses `dkim` as a selector value, so need to use the Get-DKIMRecord cmdlet so you can use the DKIM Selector. |
This file contains hidden or 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
| nmap -p 443 --script ssl-cert mrisimmons.com | grep "Subject Alternative Name" |
This file contains hidden or 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 Test-ADAuthentication { | |
| param( | |
| $username, | |
| $password) | |
| (New-Object DirectoryServices.DirectoryEntry "",$username,$password).psbase.name -ne $null | |
| } | |
| Test-ADAuthentication -username {Enter User Name} -password {Enter Password} |
This file contains hidden or 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
| <# Add this to your $Profile | |
| To edit, from inside cli or ISE type: notepad $Profile | |
| If its not created then create it. | |
| The add below and save. | |
| Now to update all your Modules you type the function name, upgrade | |
| #> | |