1) Please copy and paste your error message rather than posting a screen shot. It is much too small to read.
2) Are you sure this is not a SCOM question rather than a scripting question? (I can't tell because I can't read the error message.)
-- Bill Stewart [Bill_Stewart]