Page 1 of 1

Write a service in powershell

Posted: Wed Feb 03, 2016 6:28 am
by 4100260298
I need to do some testing with a service. I'm wondering if it is possible to write a service with the appropriate handlers in powershell?

Re: Write a service in powershell

Posted: Wed Feb 03, 2016 6:36 am
by jvierra
No. PowerShell is not appropriate for creating a service. It cannot respond to service control. You can use the SDK to create a service that can host PowerShell scripts. Look into the Window Platform SDK PowerShell samples.