The script block cannot be converted to an open generic type. Please define an appropriate closed generic type and retry. ...