ディスクの属性を表示、設定、またはクリアします。 このコマンドを使用してディスクの現在の属性を表示する場合、スタートアップ ディスク属性は、コンピューターの起動に使用されるディスクを表します。 ダイナミック ミラーの場合は、ブート ボリュームのブート プレックスを含むディスクが表示されます。
Important
A disk must be selected for the attributes disk command to succeed. Use the select disk command to select a disk and shift the focus to it.
Syntax
attributes disk [{set | clear}] [readonly] [noerr]
Parameters
Parameter | Description |
---|---|
set | フォーカスのあるディスクの指定した属性を設定します。 |
クリア | フォーカスのあるディスクの指定した属性をクリアします。 |
readonly | ディスクが読み取り専用であることを指定します。 |
noerr | スクリプトの場合のみ。 エラーが発生した場合、DiskPart は、エラーが発生しなかったかのようにコマンドを処理し続けます。 このパラメーターを指定しないと、エラーにより DiskPart がエラー コードで終了します。 |
Examples
選択したディスクの属性を表示するには、次のように入力します。
attributes disk
選択したディスクを読み取り専用として設定するには、次のように入力します。
attributes disk set readonly
Related links
ディスク コマンド を選択