Hello all.
I've been trying to learn PowerShell, and the help docs and the get-help command has been very helpful, but I can't seem to figure out how to launch an external application (specific example here is 7-Zip). Know that I have not got any experience in any text-based shell what so ever (I have started cmd.exe a few times in my life), so the answer may be really simple here for anyone familiar with bash, cmd.exe or DOS-prompts.
7-Zip has a command line exe called 7z.exe. I want to extract a file, and the parameter for this seems to be "e c:\whereever.zip". I've been trying lots of different things, for instance:
PS C:\program files (x86)\7-Zip> invoke-item 7z.exe e test.part01.rar
This gives the error:
Invoke-Item : A parameter cannot be found that matches parameter name 'e'.
So it seems PS is looking for a parameter for invoke-item called e, which is what I would expect anyway.
Anyone know how this is done? I also want to get the exit-code which tells me if everything was ok or not, so if anyone has any pointers on that it would help.
Also a different questin: I am running Folding@Home, and it seems F@H steals all the CPU time from PowerShell (F@H run as service, set to idle in config). The result of this is that some commands run really slow in PowerShell, and starting PS takes maybe a minute or so. Any ideas how this can be fixed? PS is listed as having "normal" process priority in task manager.
Thanks for any help
I've been trying to learn PowerShell, and the help docs and the get-help command has been very helpful, but I can't seem to figure out how to launch an external application (specific example here is 7-Zip). Know that I have not got any experience in any text-based shell what so ever (I have started cmd.exe a few times in my life), so the answer may be really simple here for anyone familiar with bash, cmd.exe or DOS-prompts.
7-Zip has a command line exe called 7z.exe. I want to extract a file, and the parameter for this seems to be "e c:\whereever.zip". I've been trying lots of different things, for instance:
PS C:\program files (x86)\7-Zip> invoke-item 7z.exe e test.part01.rar
This gives the error:
Invoke-Item : A parameter cannot be found that matches parameter name 'e'.
So it seems PS is looking for a parameter for invoke-item called e, which is what I would expect anyway.
Anyone know how this is done? I also want to get the exit-code which tells me if everything was ok or not, so if anyone has any pointers on that it would help.
Also a different questin: I am running Folding@Home, and it seems F@H steals all the CPU time from PowerShell (F@H run as service, set to idle in config). The result of this is that some commands run really slow in PowerShell, and starting PS takes maybe a minute or so. Any ideas how this can be fixed? PS is listed as having "normal" process priority in task manager.
Thanks for any help
