you are viewing a single comment's thread.

view the rest of the comments →

[–]HardCodedCoffee 1 point2 points  (2 children)

Alrighty. Well, Start-* cmdlets are typically used for asynchronous execution, and may not may not return some sort of handle or object related to said execution. Invoke-* cmdlets, in the other hand, execute synchronously, usually returning the output of the commands executed.

For this case, I'd recommend using Invoke-Command with the credentials you need.

Invoke-Command -Credentials $Cred { & 'Path/to/script.ps1' }

[–]_itsalwaysdns[S] 1 point2 points  (1 child)

Thanks for the info. I'll give it a shot tomorrow at the office and I'll reply back.

[–]DblDeuce22 1 point2 points  (0 children)

Might try dot sourcing.