So writing a C# program that uses a powershell script as follows
PowerShell allowtorthroughwindowsfirewallinbound = PowerShell.Create(“New – NetFirewallRule – DisplayName Allow TOR through Windows Firewall – Direction Inbound – Program C:ProgramDatachocolateybintor.exe – Action Allow:”);
Although, doing this generates the following error: Severity Code Description Project File Line Suppression State
Error CS1503 Argument 1: cannot convert from ‘string’ to ‘System.Management.Automation.RunspaceMode’
Why would it be having this problem? Thanks.
Expecting script to run and modify Windows Firewall.
KEIFER BLY is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.