i recently started to learn powershell and this is kinda my first project. I am trying to automated remote installation. I try to look for solution everywhere, but i cant find the right one. Here is the problem:
I need to instal multiple applications that have multiple version on remote computers.
I try few things but nothing worked so far :(
This one worked for me, but only if i don't use variables. If i use them PS (or i guess cscript.exe) does not recognize them.
$hostname = "yourPc"
$app= "app_0001"
$ver = "v1.0.0"
Invoke-Command -ComputerName $hostname -ScriptBlock {cscript.exe \\$hostname\directory\install.vbs /p:$app /v:$ver}
So i basically end up with \\$hostname\directory\install.vbs /p:$app /v:$ver
does not exist. Is it possible to this with cscript.exe?
Thanks.