Powershell to Delete Documents in a FileBound Workflow

The Powershell script below will delete documents in a divider named "Temp Divider".  Use with caution. 

function DeleteApplication() {
$Context.File.Documents.Fill()
$Context.File.Documents | ? { $_.Divider -eq "Temp Divider" } | % { $_.Delete() }
return "done"
}