Enable-WindowsOptionalFeature

Enable-WindowsOptionalFeature

Enables a feature in a Windows image.

구문

Parameter Set: Offline
Enable-WindowsOptionalFeature -FeatureName <String[]> -Path <String> [-All] [-LimitAccess] [-LogLevel <LogLevel> {Errors | Warnings | WarningsInfo} ] [-LogPath <String> ] [-NoRestart] [-PackageName <String> ] [-ScratchDirectory <String> ] [-Source <String[]> ] [-SystemDrive <String> ] [-WindowsDirectory <String> ] [ <CommonParameters>]

Parameter Set: Online
Enable-WindowsOptionalFeature -FeatureName <String[]> -Online [-All] [-LimitAccess] [-LogLevel <LogLevel> {Errors | Warnings | WarningsInfo} ] [-LogPath <String> ] [-NoRestart] [-PackageName <String> ] [-ScratchDirectory <String> ] [-Source <String[]> ] [-SystemDrive <String> ] [-WindowsDirectory <String> ] [ <CommonParameters>]

자세한 설명

The Enable-WindowsOptionalFeature cmdlet enables or restores an optional feature in a Windows image.

온라인 매개 변수를 사용하여 로컬 컴퓨터에서 실행 중인 운영 체제를 지정하거나 경로 매개 변수를 사용하여 탑재된 Windows 이미지의 위치를 지정합니다.

The PackageName parameter specifies the package that the feature is a component of. This parameter is optional when the package is the Windows Foundation package.

The FeatureName parameter specifies the feature to add. You can specify more than one feature in the same package. Separate feature names with a comma.

The Source parameter specifies the location of files that are needed to restore a removed feature.

The LimitAccess parameter prevents access to Windows Update as a Source for restoring features to online images. The All parameter enables all parent features of the specified feature before enabling the specified feature. The parent feature will be enabled with default values.

매개 변수

-All

Enables all parent features of the specified feature. If a parent feature is required for the specified feature to be enabled in the image, All will enable the parent and all of its default dependencies.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-FeatureName<String[]>

Specifies the name of the feature to be enabled. Feature names are case sensitive if you are servicing a Windows image running a version of Windows earlier than Windows? 8. You can use Get-WindowsOptionalFeature to find the name of the feature in the image.

별칭

none

필수 여부

true

위치

named

기본값

none

파이프라인 입력 허용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-LimitAccess

Prevents DISM from contacting Windows Update when searching for the source files to restore a feature on an online image.

LimitAccess can only be used when servicing images with Windows 8, Windows Server® 2012, Windows PE(Windows® 사전 설치 환경) 4.0 or a later version.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-LogLevel<LogLevel>

로그에 표시된 최대 출력 수준을 지정합니다. 기본 로그 수준은 3입니다. 허용된 값은 1 = 오류만2 = 오류 및 경고3 = 오류, 경고 및 정보4 = 위에 나열된 모든 정보와 디버그 출력입니다.

별칭

LL

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-LogPath<String>

로그를 기록할 전체 경로 및 파일 이름을 지정합니다. 설정되어있지 않을 경우, 기본값은 %WINDIR%\Logs\Dism\dism.log입니다.Windows PE에서 기본 디렉터리는 32MB 정도의 RAMDISK 스크래치 공간입니다. 로그 파일은 자동으로 보관됩니다. 보관된 로그 파일은 파일 이름에 .bak가 붙어서 저장되고, 새 로그 파일이 생성됩니다. 로그 파일이 보관될 때마다 .bak 파일이 덮어 쓰입니다. 도메인에 조인되지 않은 네트워크 공유를 사용하는 경우 도메인 자격 증명과 함께 net use 명령을 사용하여 액세스 권한을 설정한 다음 DISM 로그에 대한 로그 경로를 설정하세요.

별칭

LP

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-NoRestart

다시 부팅을 억제합니다. 다시 부팅이 필요하지 않으면 이 명령은 아무 작업도 수행하지 않습니다. 이 옵션을 사용하면 응용 프로그램을 다시 시작하라는 메시지가 표시되지 않거나 응용 프로그램이 자동으로 다시 시작되지 않습니다.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-Online

로컬 컴퓨터에서 현재 실행 중인 운영 체제에서 작업이 수행될 것임을 지정합니다.

별칭

none

필수 여부

true

위치

named

기본값

none

파이프라인 입력 허용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-PackageName<String>

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-Path<String>

서비스하는 오프라인 Windows 이미지의 루트 디렉터리에 대한 전체 경로를 지정합니다. Windows라는 디렉터리가 루트 디렉터리의 하위 디렉터리가 아닌 경우, -WindowsDirectory를 지정해야 합니다.

별칭

none

필수 여부

true

위치

named

기본값

none

파이프라인 입력 허용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-ScratchDirectory<String>

서비스하는 동안 사용할 파일을 추출할 때 사용되는 임시 디렉터리를 지정합니다. 디렉터리는 로컬로 존재해야 합니다. 이를 지정하지 않으면 \Windows\%Temp% 디렉터리가 각 DISM 실행에 대해 무작위로 생성된 16진수 값으로 구성된 하위 디렉터리 이름과 함께 사용됩니다. 임시 디렉터리의 항목은 각 작업 후 삭제됩니다. 네트워크 공유 위치를 임시 디렉터리로 사용하여 설치용 패키지(.cab 또는.msu 파일)를 확장해서는 안 됩니다. 서비스하는 동안 임시로 사용할 파일을 추출하는 데 사용되는 디렉터리는 로컬 디렉터리여야 합니다.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-Source<String[]>

Specifies the location of the files that are required to restore a feature that has been removed from the image. You can specify the Windows directory of a mounted image or a running Windows installation that is shared on the network.

If you specify multiple Source arguments, the files are gathered from the first location where they are found and the rest of the locations are ignored. Separate feature names with a comma.

If you do not specify a Source for a feature that has been removed, the default location set by Group Policy is used. Windows Update is also used for online images.

Source can only be used when servicing an image with Windows 8 or Windows Server 2012 or a later version.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-SystemDrive<String>

BootMgr 파일의 위치 경로를 지정합니다. 이 경로는 BootMgr 파일이 명령을 실행 중인 파티션과 다른 파티션에 있는 경우에만 필요합니다. -SystemDrive를 사용하여 Windows PE 환경에서 설치된 Windows 이미지를 제공하세요.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-WindowsDirectory<String>

이미지 경로에 상대적인 Windows 디렉터리의 경로를 지정합니다. 이 경로는 Windows 디렉터리의 전체 경로가 될 수 없으며, 상대 경로여야 합니다. 지정하지 않을 경우 기본값은 오프라인 이미지 디렉터리의 루트에 있는 Windows 디렉터리입니다.

별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable 등의 일반 매개 변수를 지원합니다. 자세한 내용은 TechNet의 about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216)

입력

입력 형식은 cmdlet으로 파이프할 수 있는 개체의 형식입니다.

  • System.String[]
  • Microsoft.Dism.Commands.ImageObject
  • Microsoft.Dism.Commands.BasicFeatureObject
  • Microsoft.Dism.Commands.AdvancedFeatureObject

출력

출력 형식은 cmdlet 실행 시 출력되는 개체의 형식입니다.

  • Microsoft.Dism.Commands.ImageObject

Example 1: Enable an optional feature in the running operating system

This command enables the optional feature, Hearts, the parent feature for Hearts, and the dependencies for the parent feature in the running Windows operating system.

PS C:\> Enable-WindowsOptionalFeature –Online –FeatureName "Hearts" -All

Example 2: Enable an optional feature in a mounted operating system image

This command enables the optional feature, Calc, in the specified package in the Windows image that is mounted to c:\offline.

PS C:\> Enable-WindowsOptionalFeature –Path "c:\offline" –FeatureName "Calc" –PackageName "Microsoft.Windows.Calc.Demo~6595b6144ccf1df~x86~en~1.0.0.0"

Example 3: Restore an optional feature

This command restores the optional feature, MyFeature, to the Windows image that is mounted to c:\offline using source files from another Windows image that is mounted to c:\test\mount. If the files are not found in the source image, this command specifies not to check Windows Update for the source files.

PS C:\> Enable-WindowsOptionalFeature –Online –FeatureName "MyFeature" –Source "c:\test\mount" -LimitAccess

관련 항목

Disable-WindowsOptionalFeature

Get-WindowsOptionalFeature

Add-WindowsPackage