write-progress -activity "Progress Header" -status "Status line"

Jul 13, 2014 at 2:07 PM
Edited Jul 13, 2014 at 2:17 PM
I just created the first exe-file.
My original powershell script uses write-progress to show something else then that what is displayed at console - but this fails:
Is it true, C# does not have an equivalent to powershell's write-progress?

Beside that I tried to mark and copy some lines in the opened console and failed.
Is there something that I can do to enable that?

Is there a way for the script to find out whether it is running as script (powershell -file "name.ps1) or as a C#-exe-program?
PowerShells: $ScriptName = $MyInvocation.MyCommand.Name seems not to work.

Thanks in advance