In some cases you may wish to create an event viewer file with specific PDQ Connect information, provide troubleshooting logs for a support ticket, or would like to filter PDQ events in event viewer.
You can gather the event logs and other troubleshooting information using one of the following methods.
Option 1: Automated Method
The following script will retrieve the PDQ Connect event logs from a machine and store them in a zip file in EVTX format. Additionally, it will include a copy of the PDQConnectAgent.db file and a text file that records the installed version of the agent.
To use the script, copy and paste it into an elevated PowerShell prompt. Once completed, the logs will be saved in a .zip file and saved to the "C:\ConnectDiagnostics.zip."
try {
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { Write-Host "Please start the script as an Administrator" -ForegroundColor DarkYellow; throw }
# Default info
$DiagnosticDirectory = "C:\\ConnectDiagnostics"
$ConnectDataPath = "C:\\ProgramData\\PDQ\\PDQConnectAgent"
# Set paths to files
$Files = @(
"$ConnectDataPath\\PDQConnectAgent.db"
"$env:SystemRoot\\System32\\Winevt\\Logs\\PDQ.com.evtx"
)
# Create directory if it does not exist
if ( -not (Test-Path $DiagnosticDirectory) ) {
New-Item -Path $DiagnosticDirectory -ItemType Directory -Force | Out-Null
}
# Find Connect version
$UninstallKeys = "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"
$Version = (Get-ItemProperty -Path "$UninstallKeys\\*" | Where-Object -FilterScript { $_.DisplayName -eq "PDQConnectAgent" } | Select-Object DisplayName, DisplayVersion)
if (!$Version) {
$Version = "No Connect Agent found on device"
}
$Version | Out-File "$DiagnosticDirectory\\ConnectVersion.txt"
# Copy files to directory
$Files | ForEach-Object {
Copy-Item -Path $_ -Destination $DiagnosticDirectory
}
# Compress files into zip
Compress-Archive -Path $DiagnosticDirectory -DestinationPath "$DiagnosticDirectory.zip" -Force
# Remove main directory
Remove-Item -Path $DiagnosticDirectory -Recurse -Force
Write-Host "Please reply with the zip file to your current ticket. File is located here: " -ForegroundColor Green -NoNewline
Write-Host "$DiagnosticDirectory.zip" -ForegroundColor Yellow
}
catch {
Write-Error "Please start the script as an Administrator"
}
Option 2: Manual Method
Open Event Viewer > expand Applications and Services Logs
Right-click PDQ.com then select "Save All Events As…" and save the file to a location of your choosing.
If you are working from a support case, also include the PDQ Connect Agent database file located at:
C:\ProgramData\PDQ\PDQConnectAgent\PDQConnectAgent.db.