PowerShell: Run Cmdlet If Another Was Successful (And Keep Trying Until It Is)

Today I'm sharing a useful bit of PowerShell I gracelessly punt from script to script whenever I need to make sure a prerequisite it met before running something and to keep checking until it's met, then run what I need: "do X when Y is ready and keep checking Y until it's ready". The original use for this was my script to create a new Microsoft 365 user, but hold off on some parts…