I have a function (function1) which requires sta mode. I'd like tocall this function from a non sta mode poshconsole. This works when i have function1 in my Profile
$command = "function1 'MyArguments'"
powershell -sta -command $command
But how can i do this when i have the function1 not in the profile and i call
powershell -sta -noprofile -command $command
Can i execute multiple commands with a powershell.exe call? Or can i handover a customprofilepath?