This seems to work:
BSF sampler: use beanshell
exec("cmd /c \"echo . | powershell -PSConsoleFile \"C:\\Program Files\\VMware\\Infrastructure\\Vsphere PowerCLI\\vim.psc1\" -command .\\<ps script>\"");
This seems to work:
BSF sampler: use beanshell
exec("cmd /c \"echo . | powershell -PSConsoleFile \"C:\\Program Files\\VMware\\Infrastructure\\Vsphere PowerCLI\\vim.psc1\" -command .\\<ps script>\"");