创建一个服务

Posted on 2019-03-31 21:50  努力成长静待花开  阅读(133)  评论(0编辑  收藏  举报

 

New-Service -Name testService -Description "This is a test service" -BinaryPathName "C:\Windows\system32\svchost.exe -k netsvcs -p" -DisplayName ExecutNote -StartupType Automatic

  

执行删除/启动:  sc delete testService / sc start testService