Running PsFCIV from a bat file

Goal to allow end user to click a file and create checksums or to click another file and verify the checksum.

My approach was a bat file - something I know about - someone has suggested I stick to powershell and forget the bat file.

Below is my attempt at the bat file approach. 

I can not get the syntax right.  Help Please.  I have tried many forms of the following.  This results in no errors and no data.

My bat file contains

PowerShell.exe -NoProfile -Command "& {Start-Process PowerShell.exe -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File "C:\PsFCIV\PsFCIV.ps1 .Start-PsFCIV  -Path c:\Tsk -XML .\Tskdb.xml -Rebuild"  ' -Verb RunAs}" > ".\tsk.log"

pause

Any help on either approach would be greatly appreciated.

Glenn Benscoter 

August 25th, 2015 8:25am

What is it that you are trying to do? What you have posted makes absolutely no sense.

Free Windows Admin Tool Kit Click here and download it now
August 25th, 2015 9:20am

Don't try to run powershell.exe as a command from the cmd.exe prompt. (Why do you think you need to do this?)

Start up a PowerShell window instead and just type the command you want to run at the PowerShell prompt.

August 25th, 2015 10:31am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics