简体   繁体   English

Powershell的start-process、start-job、start-service的区别?

[英]Difference between start-process, start-job and start-service of Powershell?

I've read some info:我已经阅读了一些信息:

Still fuzzy about those concepts.对这些概念还是很模糊。

  1. Are they identical to Linux relative concepts?它们是否与 Linux 相关概念相同? And what are their equivalents in Linux, if exist?如果存在,它们在 Linux 中的等价物是什么?
  2. What actually happen on OS level when I use those cmdlet?当我使用这些 cmdlet 时,操作系统级别实际发生了什么? How am I supposed to choose between them when I want to accomplish something?当我想完成某件事时,我应该如何在它们之间做出选择?

First off, these three links should give you as much information as you would need to understand each of these.首先,这三个链接应该为您提供了解每个链接所需的尽可能多的信息。

Start-Process 启动进程
Start-Job 开始工作
Start-Service 启动服务

Depending on what you want to accomplish , you can chose the necessary cmdlet.根据您要完成的任务,您可以选择必要的 cmdlet。

Start-Process runs an executable on the system (Notepad, powershell, Sort.exe etc with arguments if needed) Start-Process在系统上运行一个可执行文件(如果需要,带参数的记事本、powershell、Sort.exe 等)

Start-Job runs processes in the background for asynchronoush / parallel jobs Start-Job在后台运行异步/并行作业的进程

and Start-Service starts a windows service (like systemd) "already" configured on the server.Start-Service启动一个 Windows 服务(如 systemd)“已经”在服务器上配置。 This does not create or configure the service, simply starts it.这不会创建或配置服务,只是启动它。

Each of the links above provides examples on how to use them as well.上面的每个链接也提供了有关如何使用它们的示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM