Skip to content

Instantly share code, notes, and snippets.

@tillig
Created January 7, 2017 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tillig/668948d521c9a3a69344142b5e13daf5 to your computer and use it in GitHub Desktop.
Save tillig/668948d521c9a3a69344142b5e13daf5 to your computer and use it in GitHub Desktop.
Report to query the Handbrake queue and dump a local copy of the current status (sync the report via OneDrive for remote access to queue status)
$reportFile = ".\QueueStatus.txt"
$handbrakeDir = Join-Path ([Environment]::GetFolderPath("ApplicationData")) -ChildPath "Handbrake"
[XML]$queue = Get-ChildItem -Path $handbrakeDir -Filter "hb_queue*.xml" |
Sort-Object -Property LastWriteTime -Descending |
Select-Object -First 1 |
Get-Content
$queue.ArrayOfQueueTask.QueueTask |
Select-Object -Property @{n='Status';e={$_.Status}},@{n='Source';e={$_.Task.Source}},@{n='Destination';e={$_.Task.Destination}} |
Format-Table -AutoSize |
Out-String -Width 4096 |
Out-File $reportFile -Force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment