All,
I'm trying to embed a powershell file into a c# program and then want to be able to access it as a ps1 file to either run it using process.start or using a pipeline.
The powershell is fairly complicated and reading it as a string etc.. doesn't seem to work as viable option.. :(
I usually execute the script in powershell using
.\svccontroller.ps1 -ComputerName localhost -ServiceName SQL* -Action Start -i
In c# , i want to be able to do the same thing without hard coding a path... Even ignoring the arguments, if i just want to run .\svccontroller.ps1 , is it possible ?
I want the file to be embedded in the build and accessible as a ps1 file
Is this possible? Am i missing something basic?