sc

サービス コントロール マネージャーやサービスと通信

サービス コントロール マネージャー構成ツール


sc

  • C:\Windows\system32\sc.exe

Output:

説明:
        SC はサービス コントロール マネージャーやサービスと通信するために使用
        するコマンド ライン プログラムです。
使用法:
        sc <サーバー> [コマンド] [サービス名] <オプション 1> <オプション 2>...


        オプションの <サーバー>"\\サーバー名" の形式です。
        「sc [コマンド]」と入力するとコマンドの詳細なヘルプが表示されます。
        コマンド一覧:
          query-----------サービスの状態を照会したりサービスの種類ごと
                          に状態を列挙したりします。
          queryex---------拡張されたサービスの状態を照会したりサービス
                          の種類ごとに状態を列挙したりします。
          start-----------サービスを開始します。
          pause-----------サービスに PAUSE 制御要求を送信します。
          interrogate-----サービスに INTERROGATE 制御要求を送信します。
          continue--------サービスに CONTINUE 制御要求を送信します。
          stop------------サービスに STOP 要求を送信します。
          config----------サービスの構成を変更します (恒久的)。
          description-----サービスの説明を変更します。
          failure---------エラー発生時のサービスの動作を変更します。
          failureflag-----サービスの障害動作フラグを変更します。
          sidtype---------サービスのサービス SID の種類を変更します。
          privs-----------サービスの必要な特権を変更します。
          managedaccount--サービス アカウントのパスワードを LSA で管理された
                          パスワードとマークするようにサービスを変更します。
          qc--------------サービスの構成情報を照会します。
          qdescription----サービスの説明を照会します。
          qfailure--------エラー発生時のサービスの動作を照会します。
          qfailureflag----サービスの障害動作フラグを照会します。
          qsidtype--------サービスのサービス SID の種類を照会します。
          qprivs----------サービスの必要な特権を照会します。
          qtriggerinfo----サービスのトリガー パラメーターを照会します。
          qpreferrednode--サービスの優先 NUMA ノードを照会します。
          qmanagedaccount-パスワードが LSA で管理されたアカウントを
                         サービスで使用するかどうかを照会します。
          qprotection-----サービスのプロセス保護レベルを照会します。
          quserservice----ユーザー サービス テンプレートのローカル インスタンスを照会します。
          delete----------レジストリからサービスを削除します。
          create----------サービスを作成します (レジストリに追加します)。
          control---------サービスに CONTROL コードを送信します。
          sdshow----------サービスのセキュリティ記述子を表示します。
          sdset-----------サービスのセキュリティ記述子を設定します。
          showsid---------任意の名前に対応するサービス SID 文字列を表示します。
          triggerinfo-----サービスのトリガー パラメーターを構成します。
          preferrednode---サービスの優先 NUMA ノードを設定します。
          GetDisplayName--サービスの DisplayName を取得します。
          GetKeyName------サービスの ServiceKeyName を取得します。
          EnumDepend------サービスの依存関係を列挙します。

        次のコマンドはサービス名を指定しません:
        sc <サーバー> <コマンド> <オプション>
          boot------------(ok | bad) 最後に行われたブートを前回正常起動時
                          の構成として保存するかどうかを示します。
          Lock------------サービス データベースをロックします。
          QueryLock-------SCManager データベースの LockStatus を照会します。
:
        sc start MyService


QUERY と QUERYEX のオプション:
        クエリ コマンドにサービス名が続く場合、サービスの状態が戻されます。
        この場合、それ以上のオプションは適用されません。クエリ コマンドに
        オプションがない場合やまたは以下に一覧に表示されているオプションが
        続く場合は、サービスが列挙されます。
    type=    列挙するサービスの種類 (driver、service、user service、all)
             (既定 = service)
    state=   列挙するサービスの状態 (inactive、all)
             (既定 = active)
    bufsize= 列挙バッファーのサイズ (バイト)
             (既定 = 4096)
    ri=      列挙の開始を指定するための再開インデックス番号
             (既定 = 0)
    group=   列挙するサービス グループ
             (既定 = all groups)

構文の例
sc query                - アクティブなサービス ドライバーの状態を列挙します
sc query eventlog      - イベントログ サービスの状態を表示します
sc queryex eventlog    - イベントログ サービスの拡張状態を表示します
sc query type= driver   - アクティブなドライバーのみ列挙します
sc query type= service  - Win32 サービスのみ列挙します
sc query state= all     - サービスとドライバーをすべて列挙します
sc query bufsize= 50    - 50 バイトのバッファーで列挙します
sc query ri= 14         - 再開インデックスを = 14 にして列挙します
sc queryex group= ""    - グループにないアクティブなサービスを列挙します
sc query type= interact - 対話型サービスをすべて列挙します
sc query type= driver group= NDIS     - NDIS ドライバーをすべて列挙します
DESCRIPTION:
        SC is a command line program used for communicating with the
        Service Control Manager and services.
USAGE:
        sc <server> [command] [service name] <option1> <option2>...


        The option <server> has the form "\\ServerName"
        Further help on commands can be obtained by typing: "sc [command]"
        Commands:
          query-----------Queries the status for a service, or
                          enumerates the status for types of services.
          queryex---------Queries the extended status for a service, or
                          enumerates the status for types of services.
          start-----------Starts a service.
          pause-----------Sends a PAUSE control request to a service.
          interrogate-----Sends an INTERROGATE control request to a service.
          continue--------Sends a CONTINUE control request to a service.
          stop------------Sends a STOP request to a service.
          config----------Changes the configuration of a service (persistent).
          description-----Changes the description of a service.
          failure---------Changes the actions taken by a service upon failure.
          failureflag-----Changes the failure actions flag of a service.
          sidtype---------Changes the service SID type of a service.
          privs-----------Changes the required privileges of a service.
          managedaccount--Changes the service to mark the service account
                          password as managed by LSA.
          qc--------------Queries the configuration information for a service.
          qdescription----Queries the description for a service.
          qfailure--------Queries the actions taken by a service upon failure.
          qfailureflag----Queries the failure actions flag of a service.
          qsidtype--------Queries the service SID type of a service.
          qprivs----------Queries the required privileges of a service.
          qtriggerinfo----Queries the trigger parameters of a service.
          qpreferrednode--Queries the preferred NUMA node of a service.
          qmanagedaccount-Queries whether a services uses an account with a
                          password managed by LSA.
          qprotection-----Queries the process protection level of a service.
          quserservice----Queries for a local instance of a user service template.
          delete----------Deletes a service (from the registry).
          create----------Creates a service. (adds it to the registry).
          control---------Sends a control to a service.
          sdshow----------Displays a service's security descriptor.
          sdset-----------Sets a service's security descriptor.
          showsid---------Displays the service SID string corresponding to an arbitrary name.
          triggerinfo-----Configures the trigger parameters of a service.
          preferrednode---Sets the preferred NUMA node of a service.
          GetDisplayName--Gets the DisplayName for a service.
          GetKeyName------Gets the ServiceKeyName for a service.
          EnumDepend------Enumerates Service Dependencies.

        The following commands don't require a service name:
        sc <server> <command> <option>
          boot------------(ok | bad) Indicates whether the last boot should
                          be saved as the last-known-good boot configuration
          Lock------------Locks the Service Database
          QueryLock-------Queries the LockStatus for the SCManager Database
EXAMPLE:
        sc start MyService


QUERY and QUERYEX OPTIONS:
        If the query command is followed by a service name, the status
        for that service is returned.  Further options do not apply in
        this case.  If the query command is followed by nothing or one of
        the options listed below, the services are enumerated.
    type=    Type of services to enumerate (driver, service, userservice, all)
             (default = service)
    state=   State of services to enumerate (inactive, all)
             (default = active)
    bufsize= The size (in bytes) of the enumeration buffer
             (default = 4096)
    ri=      The resume index number at which to begin the enumeration
             (default = 0)
    group=   Service group to enumerate
             (default = all groups)

SYNTAX EXAMPLES
sc query                - Enumerates status for active services & drivers
sc query eventlog       - Displays status for the eventlog service
sc queryex eventlog     - Displays extended status for the eventlog service
sc query type= driver   - Enumerates only active drivers
sc query type= service  - Enumerates only Win32 services
sc query state= all     - Enumerates all services & drivers
sc query bufsize= 50    - Enumerates with a 50 byte buffer
sc query ri= 14         - Enumerates with resume index = 14
sc queryex group= ""    - Enumerates active services not in a group
sc query type= interact - Enumerates all interactive services
sc query type= driver group= NDIS     - Enumerates all NDIS drivers

Return Code: 1639


C:\Windows\system32\sc.exe
c:\>ver
Microsoft Windows [Version 10.0.19045.2075]
FileInfo
File Size72192bytes
Creation Time2019/12/07 18:09:34
LastWrite Time2019/12/07 18:09:34
ProductVersion10.0.19041.1889
FileVersion10.0.19041.1889 (WinBuild.160101.0800)
HashValue
MD53fb5cf71f7e7eb49790cb0e663434d80
SHA1b4979a9f970029889713d756c3f123643dde73da
SHA22493058f02a98c7df5e2a40a77264a4b20b15ae414d8791108a4e93a10
SHA25641f067c3a11b02fe39947f9eba68ae5c7cb5bd1872a6009a4cd1506554a9aba9
SHA3845ce16afc273e549bfddf679fb54a63bb26b8a5b3b7c3fce0f5c444208e3956006bfa577269e9b1ffcf04034e8c6b1ef1
SHA5122b59a6d0afef765c6ca80b5738202622cfe0dffcec2092d23ad8149156b0b1dca479e2e2c8562639c97e9f335429854cad12461f2fb277207c39d12e3e308ef5
Built with Hugo
テーマ StackJimmy によって設計されています。