could we not load the ps1 into a scriptblock that would be stored in a $using context? Like:
$sb= get-content $scriptPath\with-dot-sourcing.ps1 -raw invoke-command -ScriptBlock { . $using:sb;getMessage()}