How can the argument to a batch file be intrun passed onto a powershell script? -


i trying call powershell script through bat file such below;

bat file name script .bat , current cuntents below;

powershell -sta -windowstyle hidden script.ps1 

i passing argument bat file how can pass on powershell script in bat file?

please let me know if questions or confirmations needed.

in shell script (batch file), can write:

powershell -file script.ps1 %1 

%1 replaced shell script's first command-line argument, passed first argument script.ps1.

bill


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -