Invoke-Command
Invoke-Command $dedicatedserversession - filepath C:\path\test2.ps1 Invoke-Command $nodes -ScriptBlock ${function:get-thename}