Hi,
Yes, You can leverage the below command to convert the domain.
Convert-MsolDomainToFederated -DomainName test.com -SupportMultipleDomain
The Convert-MSOLDomainToFederated cmdlet converts the specified domain from standard authentication to single sign-on. Execute covert command for for other domains.
As part of converting a domain from standard authentication to single sign-on, each user must also be converted. This conversion happens automatically the next time a user signs in.
It usually takes ~30 minutes for the entire process complete. sometime can take longer time based on tenent user objects size and other factors.
Note : Password hash synchronization will be used as backup if the option is still enabled along with fedration.