Hi, I had a script that loops through a list and for each object it would prompt for a “response” because I made an error in the script…
If I cancel this job in the job history list, it only cancels the one task running, so if you have a list of several objects it would loop through, you have to press cancel for as many as your loop contains, before the job is really canceled.
Any other way to “really” cancel the job? not just the current task?
No, I had a task running to connect to a customer environment and generate an Orca report (O365 analyzer) and since I failed to do the -connect $false on this command, it tries to connect with ExchangeOnline module that requires MFA (I connect in a different way, using secure app), so that prompted me to a “response” with the MFA, not a Read-Host.
So if I cancel that it cancels the response request, and then moves on to the next in the “foreach”, so I have to press cancel many times before it is really canceled.