Looking for a way to manage ARS replication roles using powershell | Standalone < > Publisher < > Subscriber

I found this to promote using powershell but does not talk about transitioning to other roles:  https://support.oneidentity.com/active-roles/kb/311101/how-to-promote-an-active-roles-publisher-using-powershell

Please advise if this is even possible using powershell and if so I'd appreciate some pointers.

Thanks,