I have a simple c# console application that i am running through a Powershell ps1 file. I would like to take the argument passed in through $args[0] when the script is called, and use that in a method i have in my c# application. I have found a lot for the reverse, but nothing to helpful for what i am trying to do. Any input would be much appreciated. This is roughly what i have tried recently. Thank you!
$filePath = $args[0]
$Check = New-Object -ComObject "Take c# file and try to make into object"
$Check.hasFile($filePath)
Start-Process -FilePath "Path to c# exe"
.hasFile is the c# method that i am trying to pass the Powershell argument to.