There are a few script which you could use. this is one for example =>

Are your users sync'ed or cloud only users?

If they are sync'ed, you need to do this in AD.
We support Ukraine and condemn war. Push Russian government to act against war. Be brave, vocal and show your support to Ukraine. Follow the latest news HERE