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 / Service Control.ps1
Last active September 20, 2017 17:11
A sanitized version of a service control script I wrote at a previous company. It was one of the first scripts I wrote, so please forgive some of the egregious sins like Write-Host ;)
# Created by Colby Bouma
# This script shuts down or starts up services in a specific order
#
# Usage: & '.\Service Control.ps1' [-Environment] {PROD, DEV, TEST} [[-Target_Name] <server short name>] [-Start]
# You must always specify an environment that exists in "Service Control.xml"
# The default is to shut down the specified environment.
# The [-Start] parameter will cause it to start up the specified environment.
# The [-Target_Name] parameter may be used to run this script against 1 specified server, using the <Server> name from "Service Control.xml"
# Example of shutting down DEV: & '.\Service Control.ps1' DEV
# Example of starting up PROD: & '.\Service Control.ps1' PROD -Start
# Written by Colby Bouma
# This is a script for Mmuni: https://support.pdq.com/hc/en-us/community/posts/211677967/comments/115000826331
# https://gist.github.com/Colby-PDQ/38d033889303e42faf0648aa7d2ec2fe
#
# v 003
$Deploy_DB_File = "$env:SYSTEMDRIVE\ProgramData\Admin Arsenal\PDQ Deploy\Database.db"
$Error_Message = "<Error><Message>Aborted</Message><Type>AdminArsenal.Remote.Agent.AbortedException</Type><StackTrace></StackTrace></Error>"
# This is a stripped down version of a function from a blog post I am writing
@Colby-PDQ
Colby-PDQ / Abort All Deployments.ps1
Last active November 22, 2017 23:29
Aborts all Running, Connecting, and Queued deployments.
# Written by Colby Bouma
# Aborts all runnings deployments. Based off of this script: https://gist.github.com/Colby-PDQ/38d033889303e42faf0648aa7d2ec2fe
# https://gist.github.com/Colby-PDQ/f148a630293270149a7d4b2369b60682
#
# v 003
$Deploy_DB_File = "$env:SYSTEMDRIVE\ProgramData\Admin Arsenal\PDQ Deploy\Database.db"
$Error_Message = "<Error><Message>Aborted</Message><Type>AdminArsenal.Remote.Agent.AbortedException</Type><StackTrace></StackTrace></Error>"
# This is a stripped down version of a function from a blog post I am writing
@Colby-PDQ
Colby-PDQ / IBM Model F.sc
Created October 15, 2018 20:14
IBM Model F Soarer's Converter config file
layerblock
FN1 1
endblock
remapblock
layer 0
LALT LCTRL
LCTRL CAPS_LOCK
BACK_QUOTE ENTER
ENTER BACKSLASH
@Colby-PDQ
Colby-PDQ / Remove-Computer-From-Agent-Tables.ps1
Created October 18, 2018 17:22
Removes Agent records from your Inventory Server's database.
# Written by Colby Bouma
# This script removes all Agent records associated with the computer name you specify
#
# v 011
[CmdletBinding()]
param (
[string]$Name,
[string]$InventoryDBFile = "$env:SYSTEMDRIVE\ProgramData\Admin Arsenal\PDQ Inventory\Database.db"
)
@Colby-PDQ
Colby-PDQ / Uninstall OpenOffice.xml
Created October 18, 2018 18:22
PDQ Deploy package for uninstalling OpenOffice.
<?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>
@Colby-PDQ
Colby-PDQ / Collections - PSWindowsUpdate Module.xml
Created December 12, 2018 20:46
A PDQ Inventory Scan Profile to look for PowerShell modules and a set of Collections to look for the PSWindowsUpdate module.
<?xml version="1.0" encoding="utf-8"?>
<AdminArsenal.Export Code="PDQInventory" Name="PDQ Inventory" Version="17.0.3.0" MinimumVersion="4.0">
<Collection>
<ReportDefinition name="Definition">
<RootFilter name="Filter">
<Comparison>All</Comparison>
<Filters type="list">
<ValueFilter>
<Table>File</Table>
<TableTitle>Files &amp; Directories</TableTitle>
@Colby-PDQ
Colby-PDQ / Enter-PSSession (Console User).xml
Last active April 29, 2019 16:41
2019-04-18 Webcast Tools
<?xml version="1.0" encoding="utf-8"?>
<AdminArsenal.Export Code="PDQInventory" Name="PDQ Inventory" Version="16.6.0.8" MinimumVersion="15.0">
<CustomTool>
<CredentialsId value="null" />
<ScanAfter>DoNotScan</ScanAfter>
<ScanProfileId value="null" />
<SuccessCodesText>0</SuccessCodesText>
<Timeout>00:03:00</Timeout>
<WakeOnLan value="false" />
<CustomToolType>Local</CustomToolType>
<?xml version="1.0" encoding="utf-8"?>
<AdminArsenal.Export Code="PDQInventory" Name="PDQ Inventory" Version="17.1.0.0" MinimumVersion="4.0">
<Collection>
<ReportDefinition name="Definition">
<RootFilter name="Filter">
<Comparison>Any</Comparison>
<Filters type="list">
<GroupFilter>
<Comparison>All</Comparison>
<Filters type="list">
@Colby-PDQ
Colby-PDQ / Basic Report - Failed Updates.xml
Created August 7, 2019 22:47
A PDQ Inventory Scan Profile and Basic Report that look for failed Windows Updates.
<?xml version="1.0" encoding="utf-8"?>
<AdminArsenal.Export Code="PDQInventory" Name="PDQ Inventory" Version="17.1.0.0" MinimumVersion="3.1">
<Report>
<ReportDefinition name="Definition">
<RootFilter name="Filter">
<Comparison>All</Comparison>
<Filters type="list">
<ValueFilter>
<Table>WMIScanner_55_View</Table>
<TableTitle>WMI (Failed Updates)</TableTitle>