pwsh

File Write

Context: sudo, unprivileged

pwsh -c '"DATA" | Out-File /path/to/output-file'

Shell

Context: sudo, unprivileged

pwsh