I'm wondering if there's a way when a PS script runs a Start-ManagementAgent command to not stop and wait if that MA is already running. I would like to have the script just continue on with the next line instead of waiting if the MA on the current Start-ManagementAgent line is already running. Is that possible or would I have to use a PS If statement to check if it's running before using that command? If I must use an If statement, do you have an example of how to do that? Thanks so much.
I'm wondering if there's a way when a PS script runs a Start-ManagementAgent command to not stop and wait if that MA is already running. I would like to have the script just continue on with the next line instead of waiting if the MA on the current Start-ManagementAgent line is already running. Is that possible or would I have to use a PS If statement to check if it's running before using that command? If I must use an If statement, do you have an example of how to do that? Thanks so much.