WinBatch® Technical Support Forum

Archived Boards => COM Automation and dotNet => Topic started by: reed@chelseagroup.com on February 02, 2014, 05:59:52 PM

Title: Powershell automation - how to pass an argument(s) to the script
Post by: reed@chelseagroup.com on February 02, 2014, 05:59:52 PM
How to pass an argument to a powershell script executed using objectCLROption ...
Title: Re: Powershell automation - how to pass an argument(s) to the script
Post by: td on February 03, 2014, 07:54:48 AM
Your question lacks enough detail to provide a complete answer but take a look at the following scripts in the Tech. DB. It illustrates running PowerShell commands using WinBatch's CLR subsystem. 

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/dotNet/System_Management/Automation/PowerShell+Invoke~PowerShell~Commands.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/dotNet/System_Management/Automation/PowerShell+Invoke~PowerShell~Commands.txt)

and

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/dotNet/System_Management/Automation/PowerShell+PowerShell~Invoke~Command~with~Grid~PassThru.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/dotNet/System_Management/Automation/PowerShell+PowerShell~Invoke~Command~with~Grid~PassThru.txt)