Run macro and close it periodically with powershell

Thank you for your reply, but it still error, do you know where is the error?