Remove Deployments from Computers
From the 6/29/17 webcast, this tool will remove deployments from a computer in Inventory where the OSInstall Date is is AFTER the Deployment date. This is useful if you have a machine you've reimaged.
<?xml version="1.0" encoding="utf-8"?>
<AdminArsenal.Export Code="PDQInventory" Name="PDQ Inventory" Version="13.0.2.0" MinimumVersion="11.0">
<CustomTool>
<CommandLine>"DELETE FROM PDQDeployments WHERE ComputerId IN (SELECT ComputerId FROM computers WHERE EndTime < OSInstallDate);" | sqlite3.exe "$env:PROGRAMDATA\Admin Arsendal\PDQ Inventory\Database.db"</CommandLine>
<DefaultIconKey></DefaultIconKey>
<IsSystemWide value="true" />
<LibraryToolId value="null" />
<Modified value="null" />
<ShellOpenMode>CloseShell</ShellOpenMode>
<ShellType>PowerShell</ShellType>
<Description></Description>
<IconKey>Icon-PowerShell</IconKey>
<KeyGesture></KeyGesture>
<Title>Remove Deployments for Computer</Title>
<TypeName>CustomTool</TypeName>
</CustomTool>
</AdminArsenal.Export>
0
Comments
Thank you! For anyone else using this, there's one tiny typo for the database path:
For easy copypasting: