Remove-WindowsCapability

Remove-WindowsCapability

Uninstalls a Windows capability package from an image.

構文

Parameter Set: Offline
Remove-WindowsCapability -Name <String> -Path <String> [-LogLevel <LogLevel> {Errors | Warnings | WarningsInfo} ] [-LogPath <String> ] [-ScratchDirectory <String> ] [-SystemDrive <String> ] [-WindowsDirectory <String> ] [ <CommonParameters>]

Parameter Set: Online
Remove-WindowsCapability -Name <String> -Online [-LogLevel <LogLevel> {Errors | Warnings | WarningsInfo} ] [-LogPath <String> ] [-ScratchDirectory <String> ] [-SystemDrive <String> ] [-WindowsDirectory <String> ] [ <CommonParameters>]

詳細説明

The Remove-WindowsCapability cmdlet uninstalls a Windows capability package from the specified image.

パラメーター

-LogLevel<LogLevel>

ログに表示される最大出力レベルを指定します。既定のログ レベルは 3 です。指定できる値は次のとおりです。1 = エラーのみ2 = エラーと警告3 = エラー、警告、情報4 = これらすべての情報に加え、デバッグ出力

Aliases

LL

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

true(ByPropertyName)

ワイルドカード文字の受け入れ

false

-LogPath<String>

ログ出力先の完全パスとファイル名を指定します。設定しなかった場合、既定値の %WINDIR%\Logs\Dism\dism.log が使用されます。Windows PE の既定のディレクトリは RAMDISK スクラッチ領域 (32 MB) です。ログ ファイルは自動的にアーカイブされます。アーカイブされたログ ファイルはファイル名に .bak が追加されて保存され、新たなログ ファイルが生成されます。ログ ファイルがアーカイブされるたびに、.bak ファイルが上書きされます。ドメインに参加していないネットワーク共有を使う場合、DISM ログのパスを設定する前に、ドメイン資格情報を指定して net use コマンドを使ってアクセス許可を設定します。

Aliases

LP

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

true(ByPropertyName)

ワイルドカード文字の受け入れ

false

-Name<String>

Specifies the identity of the capability to remove from an operating system image.

Aliases

none

必須/オプション

true

位置

named

既定値

none

パイプライン入力の受け入れ

true(ByPropertyName)

ワイルドカード文字の受け入れ

false

-Online

Indicates that the cmdlet operates on a running operating system on the local host.

Aliases

none

必須/オプション

true

位置

named

既定値

none

パイプライン入力の受け入れ

true(ByPropertyName)

ワイルドカード文字の受け入れ

false

-Path<String>

操作するオフライン Windows イメージのルート ディレクトリの完全パスを指定します。Windows という名前のディレクトリがルート ディレクトリのサブディレクトリではない場合、-WindowsDirectory を指定する必要があります。

Aliases

none

必須/オプション

true

位置

named

既定値

none

パイプライン入力の受け入れ

true(ByPropertyName)

ワイルドカード文字の受け入れ

false

-ScratchDirectory<String>

サービスの実行中、ファイルを展開するときに使用する一時ディレクトリを指定します。このディレクトリは、ローカルに存在する必要があります。指定しなかった場合、\Windows\%Temp% ディレクトリが使用され、DISM を実行するたびに、16 進値のサブディレクトリ名がランダムに生成されます。スクラッチ ディレクトリ内の項目は、各操作後に削除されます。インストール用のパッケージ (.cab または .msu ファイル) を展開するためのスクラッチ ディレクトリとしてネットワーク共有場所を使用することは避けてください。サービス中に一時的に使用するファイルの展開先として使用するディレクトリは、ローカル ディレクトリにする必要があります。

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

true(ByPropertyName)

ワイルドカード文字の受け入れ

false

-SystemDrive<String>

BootMgr ファイルの場所へのパスを指定します。これは、BootMgr ファイルの置かれているパーティションが、コマンドの実行されているパーティションと異なる場合にのみ必要となります。インストールされている Windows イメージを Windows PE 環境から操作するには、-SystemDrive を使用します。

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

true(ByPropertyName)

ワイルドカード文字の受け入れ

false

-WindowsDirectory<String>

イメージのパスを基準にして、Windows ディレクトリへのパスを指定します。Windows ディレクトリへの完全パスは使用できません。相対パスで指定する必要があります。指定しない場合、オフライン イメージ ディレクトリのルートにある Windows ディレクトリが既定で使用されます。

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

true(ByPropertyName)

ワイルドカード文字の受け入れ

false

<CommonParameters>

このコマンドレットは共通のパラメーターをサポートしています(-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、および -OutVariable)。詳細については、TechNet の「 「about_CommonParameters」 (https://go.microsoft.com/fwlink/p/?LinkID=113216) を参照してください。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットが出力するオブジェクトの型です。

  • Microsoft.Dism.Commands.ImageObject

使用例

Example 1: Remove Windows capabilities for an image

This command uninstalls the Windows capabilities installed in the operating system image specified by the Name parameter at the path C:\offline.

PS C:\> Remove-WindowsCapability -Name "Language.TextToSpeech~~~fr-FR~0.0.1.0" -Path "C:\offline" 

Example 2: Remove Windows capabilities for the local operating system

This command uninstalls the Windows capabilities installed on the local host.

PS C:\> Remove-WindowsCapability -Name "Language.TextToSpeech~~~fr-FR~0.0.1.0" -Online

関連項目

Add-WindowsCapability

Get-WindowsCapability