Skip to content

Instantly share code, notes, and snippets.

@JordanTheITGuy
Last active January 19, 2023 15:05
Show Gist options
  • Save JordanTheITGuy/91a6a2018d3d9f88cb953c0a34708e88 to your computer and use it in GitHub Desktop.
Save JordanTheITGuy/91a6a2018d3d9f88cb953c0a34708e88 to your computer and use it in GitHub Desktop.
Determine the ports you need for Patch My PC - Based on results from the Scan tool wizard.
#Download the current network allow list from the internet.
curl https://patchmypc.com/scupcatalog/downloads/PatchMyPC-DomainList.csv -o PMPC-CurrentAllowList.csv
#import the data from the CSV
$domainList = Import-Csv -Path '.\PMPC-CurrentAllowList.csv'
#Import and store the scan results from the patch MY PC publisher
$scanResults = Import-Csv -Path '.\PatchMyPC-1_19_2023-6_23 AM.csv'
#Calculate the results...
$results = $domainList | Where-Object {$_.Product -in $scanResults.Product}
#Export to new CSV list.
$results | Export-Csv -Path .\PMPC-TrimmedNetworkList.csv -Encoding utf8 -NoTypeInformation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment