This is a matter of personal preference in terms of what you are looking to gain from the test.
The impact on your microbiome would differ depending on the amount of active CFUs contained in the probiotics. When taking reasonably small doses (e.g. up to 50 billion CFUs per day) we would expect negligible impact directly to your overall relative abundances but what we are looking to see is what impact it is having on your overall balance - e.g. while taking a strain of b.longum we might expect to go from potentially small percentage to a slightly larger (e.g. 0.05% to say 0.2%) but we'd also expect it to have an inhibitory effect on other overgrown bacteria. This affect might only last while taking the probiotic and if you are prepared to continue the probiotic, it's a good idea to take a test while on the probiotic.
If you are looking to measure only your microbiome based on ingested foods, etc. then it would be best to stop taking it a for a few days. The amount of time depends on your individual transit time.
Fermented foods (e.g. homemade kefir and sauerkraut) could contain even larger amounts of probiotics, so also consider if you're looking to measure your microbiome while consuming the food or rather without. The same thinking applies to prebiotics that selectively feed certain probiotics.
We do not yet have guidance for anti-microbials other than it also makes sense to test while on it to see the impact it is having on your ecosystem.