This is my very first post and I’m trying to teach myself Powershell. I could greatly use your help with something. There are lots of computers I need to install an .exe on but I wanna do it through Powershell if I can. One of the steps involved were I to install manually is click ‘Browse’ and point to a directory location different than the one given by default, and I know not how to specify that in Powershell. This is my command. Can I pass this path as an argument to start-process command?
Thanks so much. Just to be clear, I am dealing with two paths. The .exe to be installed is on a network location, and the argument to be passed is a local path (i.e. c:\test).
How would I do this if I wanted to install on my local machine? The .exe is on my local C drive. I suppose I would rid of ‘invoke-command’ altogether, but I don’t know how to pass the directory path with just start-process.
start-process -FilePath $sourcefile
Something like this, but I need to pass in the argument. Thanks.
Get-Help Start-Process -Parameter ArgumentList
-ArgumentList <String[]>
Specifies parameters or parameter values to use when this cmdlet starts the process.
Required? false
Position? 1
Default value None
Accept pipeline input? False
Accept wildcard characters? false