Skip to content

Instantly share code, notes, and snippets.

View Colby-PDQ's full-sized avatar

Colby Bouma Colby-PDQ

View GitHub Profile
@Colby-PDQ
Colby-PDQ / PDQ Inventory Agent with Config.xml
Created October 22, 2018 21:40
A PDQ Deploy package for installing the PDQ Inventory Agent.
<?xml version="1.0" encoding="utf-8"?>
<AdminArsenal.Export Code="PDQDeploy" Name="PDQ Deploy" Version="17.1.0.0" MinimumVersion="15.0">
<Package>
<CurrentLibraryPackageVersionId value="null" />
<PackageDefinition name="Definition">
<Conditions type="list">
<PackageStepCondition>
<Architecture>Both</Architecture>
<Version>All</Version>
<TypeName>OperatingSystem</TypeName>
<?xml version="1.0" encoding="utf-8"?>
<AdminArsenal.Export Code="PDQInventory" Name="PDQ Inventory" Version="18.1.0.0" MinimumVersion="3.1">
<Report>
<ReportDefinition name="Definition">
<RootFilter name="Filter">
<Comparison>All</Comparison>
<Filters type="list">
<ValueFilter>
<Table>PDQDeployment</Table>
<TableTitle>Deployment</TableTitle>
@Colby-PDQ
Colby-PDQ / Display Drivers (GPUs).xml
Created November 5, 2019 22:18
A PDQ Inventory report that shows the model number, driver version, and driver date for AMD, ATI, Intel, and NVIDIA GPUs
<?xml version="1.0" encoding="utf-8"?>
<AdminArsenal.Export Code="PDQInventory" Name="PDQ Inventory" Version="18.1.38.0" MinimumVersion="3.1">
<Report>
<ReportDefinition name="Definition">
<RootFilter name="Filter">
<Comparison>All</Comparison>
<Filters type="list">
<ValueFilter>
<Table>HardwareDevice</Table>
<TableTitle>Hardware Device</TableTitle>
@Colby-PDQ
Colby-PDQ / Remove PreForm Registry Keys.ps1
Created November 7, 2019 00:45
Removes Registry keys that PreForm leaves behind
# Check both Uninstall keys just to be sure
$RegistryPaths = @(
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
)
ForEach ( $RegistryPath in $RegistryPaths ) {
$RegistryKeys = Get-ChildItem "$RegistryPath" | Where-Object Name -match "PreForm"
@Colby-PDQ
Colby-PDQ / Network Adapter IP Addresses.sql
Created August 1, 2019 22:10
A PDQ Inventory SQL Report that shows the contents of the NetworkAdapterIPAddresses table
SELECT
Computers.Name AS "Computer Name"
, NetworkAdapterIPAddresses.Address AS "IP Address"
, NetworkAdapterIPAddresses.Subnet AS "Subnet Mask"
, NetworkAdapters.Name AS "Adapter Name"
, NetworkAdapters.NetConnectionId AS "Connection Name"
, NetworkAdapters.AdapterType AS "Adapter Type"
, NetworkAdapters.MacAddress AS "MAC Address"
, NetworkAdapters.NetConnectionStatus AS "Connection Status"
, NetworkAdapters.ConnectionSpeed AS "Connection Speed"
@Colby-PDQ
Colby-PDQ / Intel SA-00086 Collections.xml
Created December 4, 2019 22:26
Collections, a Scan Profile, Reports, and a Package for this blog: https://www.pdq.com/blog/intel-sa-00086/
<?xml version="1.0" encoding="utf-8"?>
<AdminArsenal.Export Code="PDQInventory" Name="PDQ Inventory" Version="14.1.0.0" MinimumVersion="4.0">
<Collection>
<ReportDefinition name="Definition">
<RootFilter name="Filter">
<Comparison>All</Comparison>
<Filters type="list">
<ValueFilter>
<Table>Computer</Table>
<Column>Name</Column>
@Colby-PDQ
Colby-PDQ / Trigger Heartbeat Schedules.xml
Created February 11, 2020 18:02
A PDQ Inventory Tool that creates a firewall rule to block ICMPv4 to the target you specify.
<?xml version="1.0" encoding="utf-8"?>
<AdminArsenal.Export Code="PDQInventory" Name="PDQ Inventory" Version="18.3.32.0" MinimumVersion="15.0">
<CustomTool>
<CredentialsId value="null" />
<RunAs>Admin</RunAs>
<ScanAfter>DoNotScan</ScanAfter>
<ScanProfileId value="null" />
<SuccessCodesText>0</SuccessCodesText>
<Timeout>00:00:30</Timeout>
<WakeOnLan value="false" />
<?xml version="1.0" encoding="utf-8"?>
<AdminArsenal.Export Code="PDQInventory" Name="PDQ Inventory" Version="12.2.0.0" MinimumVersion="3.1">
<Report>
<ReportDefinition name="Definition">
<Sql>SELECT Computers.Name AS 'Computer Name', Computers.IPAddress AS 'IP Address', 'STATIC' AS 'Type' FROM Computers
WHERE Computers.IPAddress IN
(SELECT value FROM RegistryEntries
WHERE RegistryPathId IN (SELECT RegistryPathId FROM RegistryPaths
WHERE lower(PathName) LIKE 'system\currentcontrolset\services\tcpip\parameters%')
AND Name = 'IPAddress')
@Colby-PDQ
Colby-PDQ / Disk Usage.sql
Created July 30, 2019 22:46
A PDQ Inventory SQL Report that calculates used disk space
SELECT
Computers.Name AS "Computer Name"
, LogicalDisks.LogicalDeviceId AS "Drive Letter"
, ( (LogicalDisks.Size - LogicalDisks.FreeSpace) / 1024 / 1024 / 1024 ) AS "Used Space GB"
FROM
Computers
INNER JOIN
LogicalDisks USING (ComputerId)
WHERE
<ComputerFilter>
@Colby-PDQ
Colby-PDQ / Application Comparison.sql
Last active June 16, 2020 17:51
Select 2 computers, then run this report. It will show you which applications only exist on one of them.
-- https://gist.github.com/Colby-PDQ/c03e7eee22a73c9b1dcbe81aaa9b18e6
SELECT
Computers.Name AS "Computer Name"
, Applications.Name AS "Application Name"
FROM
(
SELECT
Applications.ApplicationId
, COUNT(Applications.Name) AS "ApplicationCount"