hi powerShell,
I am written in powershell script called through a c# (WPF).
Here is my sample code:
using (PowerShell PowerShellInstance = PowerShell.Create())
{
PowerShellInstance.AddScript("Get-Content 'H:\aa.txt' | ForEach-Object {( $_ -replace \"\\s+\",\",\" )} | Out-File -FilePath .\\converted.csv -Encoding OEM");
PowerShellInstance.Invoke();
}
I need to progress and finished status. E.g
if PowerShellInstance.Invoke() is still progress then
lblText1.txt = "Loading..."
and if porgress is done then
lblText1.txt = "Finished"
Any Idea?
Thanks