Sam Perrin TIL Blog

PowerShell - Run local function in Remote PSSession

October 03, 2019

To run a local session within a Remote PSSession, you can use the following

Invoke-Command -Session $Session -ScriptBlock ${Function:FunctionName}

Sam Perrin

Written by Sam Perrin who loves all things Automation related! You should follow him on Twitter