Created
August 13, 2015 01:34
-
-
Save tobynet/e62cb4513d10b4a46439 to your computer and use it in GitHub Desktop.
Windows でのサービスの制御 ref: http://qiita.com/toby_net/items/07bf96d1f56d9dbe6602
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS> gsv | ? { $_.Name -match "sqlserver" } | |
Status Name DisplayName | |
------ ---- ----------- | |
Running MSSQLSERVER SQL Server (MSSQLSERVER) | |
Running MSSQLServerOLAP... SQL Server Analysis Services (MSSQL... | |
Stopped SQLSERVERAGENT SQL Server エージェント (MSSQLSERVER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS> gsv | ? { $_.Name -match "sql" -and $_.Status -match "Run" } | |
Status Name DisplayName | |
------ ---- ----------- | |
Running MSSQLFDLauncher SQL Full-text Filter Daemon Launche... | |
Running MSSQLSERVER SQL Server (MSSQLSERVER) | |
Running MSSQLServerOLAP... SQL Server Analysis Services (MSSQL... | |
Running SQLWriter SQL Server VSS Writer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS> gsv | ? Name -match "sql" | ? Status -match "Run" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS> gsv | ? Name -match "mssql" | Stop-Service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS> gsv | ? Name -match "mssql" | Set-Service -StartupType Manual |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS> gsv | ? Name -match "mssql" | Set-Service -Status Stopped -StartupType Manual | |
Set-Service : サービス 'SQL Server (MSSQLSERVER) (MSSQLSERVER)' には依存サービスがあるため、停止できません。 | |
発生場所 行:1 文字:31 | |
+ ... Name -match "mssql" | Set-Service -Status Stopped -StartupType Manual | |
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
+ CategoryInfo : InvalidOperation: (System.ServiceProcess.ServiceController:ServiceController) [Set-Servi | |
ce]、ServiceCommandException | |
+ FullyQualifiedErrorId : ServiceHasDependentServicesNoForce,Microsoft.PowerShell.Commands.SetServiceCommand |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment