WMI サービス コントロール ユーティリティ
winmgmt
- C:\Windows\System32\Wbem\WinMgmt.exe /?
Output:
Windows Management Instrumentation
使用法: winmgmt [/backup <ファイル名>] [/restore <ファイル名> <フラグ>]
[/resyncperf] [/standalonehost [<レベル>]] [/sharedhost]
[/verifyrepository [<パス>]] [/salvagerepository]
[/resetrepository]
/backup <ファイル名>
WMI でレポジトリを指定ファイル名にバックアップします。
ファイル名引数には、ファイルへの完全なパスを指定する必要があります。
バックアップ処理が完了するまでレポジトリへの書き込み処理を
中断するため、この処理ではレポジトリへの書き込みロックが
必要です。
/restore <ファイル名> <フラグ>
指定したバックアップ ファイルから WMI レポジトリを手動で復元します。
ファイル名引数には、バックアップ ファイルへの完全なパスを指定する必要
があります。復元操作を実行するときは、操作の失敗時に書き戻すため、
既存のレポジトリを保存します。次に、レポジトリは、ファイル名引数で指定し
たバックアップ ファイルから復元されます。レポジトリへの排他アクセスが
できない場合、既存のクライアントは WMI から切断されます。フラグ引数は
1 (強制: ユーザーを切断し復元する) または 0 (既定: ユーザーが接続され
ていない場合に復元する) にする必要があり、復元モードを指定します。
/resyncperf
WMI でシステム パフォーマンス ライブラリを登録します。
/standalonehost [<レベル>]
Winmgmt サービスを固定 DCOM エンドポイントがあるスタンドアロンの
Svchost プロセスに移動します。既定のエンドポイントは
"ncacn_ip_tcp.0.24158" です。ただし、エンドポイントは Dcomcnfg.exe を
実行すると変化することがあります。レベル引数は Svchost プロセスの認
証レベルです。レベルを指定しない場合、既定値は
4 (RPC_C_AUTHN_LEVEL_PKT) です。
/sharedhost
Winmgmt サービスを共有 Svchost プロセスに移動します。
/verifyrepository [<パス>]
WMI レポジトリに対して整合性チェックを行います。<パス> 引数なしに
/verifyrepository スイッチを追加すると、WMI で現在使用されているライブ
レポジトリが検査されます。パス引数を指定すると、
レポジトリの任意の保存済みコピーを検査できます。この場合、
パス引数にはレポジトリの保存済みコピーへの完全なパスを指定する必要が
あります。保存済みレポジトリはレポジトリ フォルダー全体のコピーに
する必要があります。
/salvagerepository
WMI レポジトリに対して整合性チェックを行い、
不整合が検出された場合は、レポジトリを再構築します。
不整合のレポジトリの内容は、読み取れる場合は、再構築されたレポジトリ
に結合されます。回収操作は、常に WMI サービスが現在使用しているレポジ
トリを対象とします。#pragma autorecover プリプロセッサ ステートメントが
入った MOF ファイルはレポジトリに復元されます。
/resetrepository
レポジトリはオペレーティング システムが最初にインストールされたときの
初期状態にリセットされます。#pragma autorecover プリプロセッサ ステート
メントが入った MOF ファイルはレポジトリに復元されます。
Windows Management Instrumentation
Usage: winmgmt [/backup <filename>] [/restore <filename> <flag>]
[/resyncperf] [/standalonehost [<level>]] [/sharedhost]
[/verifyrepository [<path>]] [/salvagerepository]
[/resetrepository]
/backup <filename>
Causes WMI to back up the repository to the specified file name. The
filename argument should contain the full path to the file location.
This process requires a write lock on the repository so that write
operations to the repository are suspended until the backup process is
completed.
/restore <filename> <flag>
Manually restores the WMI repository from the specified backup file.
The filename argument should contain the full path to the backup file
location. To perform the restore operation, WMI saves the existing
repository to write back if the operation fails. Then the repository is
restored from the backup file that is specified in the filename
argument. If exclusive access to the repository cannot be achieved,
existing clients are disconnected from WMI. The flag argument must be a
1 (force - disconnect users and restore) or 0 (default - restore if no
users connected) and specifies the restore mode.
/resyncperf
Registers the system performance libraries with WMI.
/standalonehost [<level>]
Moves the Winmgmt service to a standalone Svchost process that has a
fixed DCOM endpoint. The default endpoint is "ncacn_ip_tcp.0.24158".
However, the endpoint may be changed by running Dcomcnfg.exe. The level
argument is the authentication level for the Svchost process. If level
is not specified, the default is 4 (RPC_C_AUTHN_LEVEL_PKT).
/sharedhost
Moves the Winmgmt service into the shared Svchost process.
/verifyrepository [<path>]
Performs a consistency check on the WMI repository. When you add the
/verifyrepository switch without the <path> argument, then the live
repository currently used by WMI is verified. When you specify the path
argument, you can verify any saved copy of the repository. In this
case, the path argument should contain the full path to the saved
repository copy. The saved repository should be a copy of the entire
repository folder.
/salvagerepository
Performs a consistency check on the WMI repository, and if an
inconsistency is detected, rebuilds the repository. The content of the
inconsistent repository is merged into the rebuilt repository, if it
can be read. The salvage operation always works with the repository
that the WMI service is currently using. MOF files that contain the
#pragma autorecover preprocessor statement are restored to the
repository.
/resetrepository
The repository is reset to the initial state when the operating system
is first installed. MOF files that contain the #pragma autorecover
preprocessor statement are restored to the repository.
Return Code: 0
C:\Windows\System32\Wbem\WinMgmt.exe
c:\>ver
Microsoft Windows [Version 10.0.19045.2075]
| File | Info |
|---|---|
| File Size | 82944bytes |
| Creation Time | 2022/07/08 08:49:48 |
| LastWrite Time | 2022/07/08 08:49:48 |
| ProductVersion | 10.0.19041.1889 |
| FileVersion | 10.0.19041.1889 (WinBuild.160101.0800) |
| Hash | Value |
|---|---|
| MD5 | c484b6fdeca3277fe586925bbba5ef7e |
| SHA1 | 14fcd00883caf6052053b9f52e60cbe3d407df98 |
| SHA224 | 70915df4986e2ee32440ff458efb5ae32beaf10309d0ca9d6573cbd8 |
| SHA256 | fbfb47d271b109973e3e7678d83d2fc20448775c26374dbcfffae445c932c592 |
| SHA384 | a2e59065b09ff15e362a459632dd541b12fc4a8906569b81ce9d0269225f1b8b972155a1280c9e9811cdca7d8b5c818a |
| SHA512 | 6794244c933de3787828f996a8cd8299341a3d9517674dab6705ba8a23c9aaf2aca6e550a0135c0595a8e5f77d95bcef457a82805e97021072e515f3f27c7ec4 |