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.