Make cmdlets easier to use in Powershell
Fix optional target type