Here\'s the code I have been using... (and it\'s been working great!)
function DoUnpin([string]$appname) { $ErrorActionPreference = \'silentlycontinue\'