Getting following error while trying to run the process (Process attached). This was working fine when I created it, after reopening it is giving error. Anyone faced such issue before?

I guess the issue is with “currentItem.ServiceName” with this command in message box. Because when i comment it invoke powershell does not give any error. So I am looking for an alternate for this “.ServiceName”, using which i can get the name of services.