The below command will go through the list of media in the pool "Example Pool" and attempt to reset the poor flag from any media that has this flag enabled.
/opt/omni/bin/omnimm -list_pools "Example Pool" -detail |awk -F ": "\
'/identifier/{t=$2};/Status/{print t $2};/Poor/{system("/opt/omni/bin/omnimm\
-reset_poor_medium " t)}'
(The "-reset_poor_medium" will only clear the poor flag if it was set due to a failure in the drive. If the tape is marked poor because it has exceeded the maximum overwrites or reached its end of life as per the pool conditions, then the flag will not be cleared)