Thanks Fazza - just had such a senile moment (it was working earlier this afternoon and that shell crashed and I when I resumed, I restarted std powershell rather than the customised environment ...oops - bafflement terminated by Dr. Google).
Back to this impoverished DPM environment that necessitates using PShell and then modifying the ForceFree.ps1 script template which is NOT marking Unknown/Un-labelled tapes 'Free'...
p.s. After finding no debugging messages (I enhanced the provided script), I changed Write-Verbose to Write-Host but later found out why:
"The Write-Verbose cmdlet writes text to the verbose message stream in Windows PowerShell. Typically, the verbose message stream is used to deliver information about command processing that is used for debugging a command.
By default, the verbose message stream is not displayed, but you can display it by changing the value of the $VerbosePreference variable or using the Verbose common parameter in any command."
Also, the required syntax is "Slot-n" rather than "Slot n" as the DPM console so kindly presents it :-( (yes that is in the -? help)
p.p.s. How sneaky ! "$TapeLocationList -contains $media.Location" so the input list did not have to be parsed into a list. No way do I want to keep typing Slot-n, ...I guess I'd better split the input list :-)