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
# dkim-spf-dmarc-inventory.ps1 | |
#Install-Module -name DomainHealthChecker # Only needed if you don't already have the Module installed | |
import-module -name DomainHealthChecker | |
$all = @() | |
# List of the domains to check, and there dkim selector used in the DNS. If you don't have the dkim selector leave blank "". | |
$urls_check = @( [pscustomobject]@{'domain'="example2.com";'dkim_selector'="t9959"}, | |
[pscustomobject]@{'domain'="example2.com";'dkim_selector'="ps0717"}, | |
[pscustomobject]@{'domain'="google.com";'dkim_selector'=""} #example of a blank dkim_selector | |
) | |
$runon = Get-date -Format "MM/dd/yyyy hh:mm tt K" |
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
# 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 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 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 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 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 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 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 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 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} |