Search notes:

set-service

Stopping a service

It is possible to stop a service by assigning the stopped status to the service:
PS C:\> set-service MySQL80 -status stopped
However, if a service has dependent services, such as MSSQLSERVER, an error is thrown:
PS C:\> set-service MSSQLSERVER -status stopped
set-service : Cannot stop service 'SQL Server (MSSQLSERVER) (MSSQLSERVER)' because it has dependent services.
…
Such service can be stopped with the better suited cmdLet stop-service:
PS C:\> stop-service MSSQLSERVER

See also

The command parameter -credential.
Powershell command noun: service

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1745380526, '160.79.111.175', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/PowerShell/command-inventory/noun/service/set(53): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78