With Powershell Extensions for Sitecore you can run Powershell scripts in Sitecore. Also SXA is offering a bunch of Scripts supporting your activities. I recently had to run Powershell remotely. There is good Documentation out there but somehow I missed some pieces that stopped me from using that feature smoothly. So I try to connect the pieces of the puzzle in this blog post.
There is a very good Introduction Video by Michael West that gives you a step by step introduction to run PSE remote. https://www.youtube.com/watch?v=fGvT8eDdWrg
But when I tried to reproduce the steps from the video I failed to find the mentioned zip files. They can be found here: https://github.com/SitecorePowerShell/Console/releases/
Place this config in your include folder and make sure it's read last.
$session = New-ScriptSession -Username admin -Password b -ConnectionUri "http://sxa92.dev.local"
Invoke-RemoteScript -Session $session -ScriptBlock { Get-User -Id admin } | Get-Member
Official Documentation about remote powershell extensions you can find here: https://doc.sitecorepowershell.com/remoting
Created: 25.2.2020
Powershell SXA