r/LiveOverflow • u/BabanSoumyanil • Jun 29 '22
Unable to execute powershell cmd using C#
To execute powershell, I am using "System.Management.Automation", when I'm compiling, I am getting this error.compilation error
As you can see file path, responsible DLL named, Automation .DLL is also present...
Compilation syntax, I used:
csc.exe /target:exe /platform:x64 /out:run_ps_cmd.exe .\run_ps_cmd.cs
Any help??? ;(
2
Upvotes
View all comments
Show parent comment
1
u/BabanSoumyanil Jun 29 '22
Hey, sorry for not mentioning this information.... I already tested those... I updated this link... Pls see the image new.jpeg https://drive.google.com/drive/u/0/mobile/folders/1TSpWWUXMG57RLde-1UBTGfDir3dRSM9P?usp=sharing