PowerShell modules and Linux Hybrid Runbook Workers

When using PowerShell modules on Hybrid Runbook Workers it is best to install modules via Install-Module with -Scope AllUsers. Same on Linux. That gives the following error though:

So what you have to do is switch to root first, then launch PowerShell.