オリジナルの Windows 11 インストーラー ISO は、制限されたリソース設定で動作するように変更されており、最終的なインストール サイズを最小限に抑えるために、Windows のコンポーネント、パッケージ、または機能のほとんどの痕跡が完全に削除されています。そして、この変更された ISO が現在のシステムへのインストールに使用されました。そのため、実行してもDism /online /Get-Features
機能はリストされません。
オリジナルの(変更されていない)公式の完全な Windows 11 ISO イメージをマウントする:
PS C:\> Dism /Mount-Image /ImageFile:E:\Sources\install.wim /Index:7 /MountDir:C:\test\offline /Readonly
Deployment Image Servicing and Management tool
Version: 10.0.22621.1
Mounting image
[==========================100.0%==========================]
The operation completed successfully.
オリジナルの ISO には次の機能があります:
PS C:\> Dism /Image:C:\test\offline /Get-FeatureInfo /FeatureName:Microsoft-Windows-Subsystem-Linux
Deployment Image Servicing and Management tool
Version: 10.0.22621.1
Image Version: 10.0.22621.525
Feature Information:
Feature Name : Microsoft-Windows-Subsystem-Linux
Display Name : Windows Subsystem for Linux
Description : Provides services and environments for running native user-mode Linux shells and tools on Windows.
Restart Required : Possible
State : Disabled
Custom Properties:
ServerComponent\Description : Provides services and environments for running native user-mode Linux shells and tools on Windows.
ServerComponent\DisplayName : Windows Subsystem for Linux
ServerComponent\Id : 1033
ServerComponent\Type : Feature
ServerComponent\UniqueName : Microsoft-Windows-Subsystem-Linux
ServerComponent\Deploys\Update\Name : Microsoft-Windows-Subsystem-Linux
The operation completed successfully.
機能は完全に削除されました (変更された ISO インストーラー上)。そのため、インストールされたウィンドウでは機能が認識されません。
PS C:\> Dism /Online /Get-FeatureInfo /FeatureName:Microsoft-Windows-Subsystem-Linux
Deployment Image Servicing and Management tool
Version: 10.0.22621.1
Image Version: 10.0.22621.1245
Error: 0x800f080c
Feature name Microsoft-Windows-Subsystem-Linux is unknown.
A Windows feature name was not recognized.
Use the /Get-Features option to find the name of the feature in the image and try the command again.
The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
機能は認識されないためインストールに失敗します (/Source に存在しますが) :
PS C:\> Dism /Online /Enable-Feature /FeatureName:Microsoft-Windows-Subsystem-Linux /Source:C:\test\offline\Windows\WinSxS\ /All /LimitAccess
Deployment Image Servicing and Management tool
Version: 10.0.22621.1
Image Version: 10.0.22621.1245
Error: 0x800f080c
Feature name Microsoft-Windows-Subsystem-Linux is unknown.
A Windows feature name was not recognized.
Use the /Get-Features option to find the name of the feature in the image and try the command again.
The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
DISM が使用されましたが、ソリューションでは DISM を使用する必要はありません。また、オプション機能ごとにスタンドアロン インストーラーが存在する場合、それは有効なソリューションになります。では、完全な OS インストールを実行せずに、そのような機能 (および依存関係) を有効にするにはどうすればよいでしょうか。
最後のコマンドのみのログ ファイル ( C:\Windows\Logs\Dism\dism.log )。
2023-02-07 02:52:29, Info DISM PID=20420 TID=20424 Scratch directory set to 'C:\Users\Admin\AppData\Local\Temp\'. - CDISMManager::put_ScratchDir
2023-02-07 02:52:29, Info DISM PID=20420 TID=20424 DismCore.dll version: 10.0.22621.1 - CDISMManager::FinalConstruct
2023-02-07 02:52:29, Info DISM Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2023-02-07 02:52:29, Info DISM PID=20420 TID=20424 Successfully loaded the ImageSession at "C:\Windows\system32\Dism" - CDISMManager::LoadLocalImageSession
2023-02-07 02:52:29, Info DISM Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2023-02-07 02:52:29, Info DISM DISM Provider Store: PID=20420 TID=20424 Found and Initialized the DISM Logger. - CDISMProviderStore::Internal_InitializeLogger
2023-02-07 02:52:29, Info DISM Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2023-02-07 02:52:29, Info DISM DISM Manager: PID=20420 TID=20424 Successfully created the local image session and provider store. - CDISMManager::CreateLocalImageSession
2023-02-07 02:52:29, Info DISM DISM.EXE:
2023-02-07 02:52:29, Info DISM DISM.EXE: <----- Starting Dism.exe session ----->
2023-02-07 02:52:29, Info DISM DISM.EXE:
2023-02-07 02:52:29, Info DISM DISM.EXE: Host machine information: OS Version=10.0.22621, Running architecture=amd64, Number of processors=2
2023-02-07 02:52:29, Info DISM DISM.EXE: Dism.exe version: 10.0.22621.1
2023-02-07 02:52:29, Info DISM DISM.EXE: Executing command line: "C:\Windows\system32\Dism.exe" /Online /Enable-Feature /FeatureName:Microsoft-Windows-Subsystem-Linux /Source:C:\test\offline\Windows\WinSxS\ /All /LimitAccess
2023-02-07 02:52:29, Info DISM DISM Manager: PID=20420 TID=20424 physical location path: C:\ - CDISMManager::CreateImageSession
2023-02-07 02:52:29, Info DISM DISM Manager: PID=20420 TID=20424 Event name for current DISM session is Global\{3215538E-EA92-474F-A021-31BC279C7964} - CDISMManager::CheckSessionAndLock
2023-02-07 02:52:29, Info DISM DISM Manager: PID=20420 TID=20424 Create session event 0x248 for current DISM session and event name is Global\{3215538E-EA92-474F-A021-31BC279C7964} - CDISMManager::CheckSessionAndLock
2023-02-07 02:52:29, Info DISM DISM Manager: PID=20420 TID=20424 Copying DISM from "C:\Windows\System32\Dism" - CDISMManager::CreateImageSessionFromLocation
2023-02-07 02:52:29, Info DISM DISM Manager: PID=20420 TID=20424 No Sandbox was created, DISM running in-place. - CDISMManager::CreateImageSessionFromLocation
2023-02-07 02:52:29, Info DISM DISM Manager: PID=20420 TID=20424 Successfully loaded the ImageSession at "C:\Windows\System32\Dism" - CDISMManager::LoadRemoteImageSession
2023-02-07 02:52:29, Info DISM DISM Image Session: PID=20448 TID=20468 Instantiating the Provider Store. - CDISMImageSession::get_ProviderStore
2023-02-07 02:52:29, Info DISM DISM OS Provider: PID=20448 TID=20468 Defaulting SystemPath to C:\ - CDISMOSServiceManager::Final_OnConnect
2023-02-07 02:52:29, Info DISM DISM OS Provider: PID=20448 TID=20468 Defaulting Windows folder to C:\Windows - CDISMOSServiceManager::Final_OnConnect
2023-02-07 02:52:29, Info DISM DISM Provider Store: PID=20448 TID=20468 Attempting to initialize the logger from the Image Session. - CDISMProviderStore::Final_OnConnect
2023-02-07 02:52:29, Info DISM Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2023-02-07 02:52:29, Info DISM DISM Provider Store: PID=20448 TID=20468 Found and Initialized the DISM Logger. - CDISMProviderStore::Internal_InitializeLogger
2023-02-07 02:52:29, Info DISM Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2023-02-07 02:52:29, Info DISM Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2023-02-07 02:52:29, Info DISM DISM Manager: PID=20420 TID=20424 Image session successfully loaded from location: C:\Windows\System32\Dism - CDISMManager::CreateImageSession
2023-02-07 02:52:29, Info DISM DISM.EXE: Target image information: OS Version=10.0.22621.1245, Image architecture=amd64
2023-02-07 02:52:29, Info DISM DISM.EXE: Image session version: 10.0.22621.1
2023-02-07 02:52:29, Info DISM DISM Transmog Provider: PID=20448 TID=20468 Current image session is [ONLINE] - CTransmogManager::GetMode
2023-02-07 02:52:29, Info DISM DISM Transmog Provider: PID=20448 TID=20468 Audit Mode: [No] - CTransmogManager::Initialize
2023-02-07 02:52:29, Info DISM DISM Transmog Provider: PID=20448 TID=20468 GetProductType: ProductType = [WinNT] - CTransmogManager::GetProductType
2023-02-07 02:52:29, Info DISM DISM Transmog Provider: PID=20448 TID=20468 Product Type: [WinNT] - CTransmogManager::Initialize
2023-02-07 02:52:29, Info DISM DISM Transmog Provider: PID=20448 TID=20468 Product Type ServerNT : [No] - CTransmogManager::Initialize
2023-02-07 02:52:29, Info CSI 00000001 Shim considered [l:126]'\??\C:\Windows\Servicing\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22621.1245_none_e95e4cae42cdfd26\wcp.dll' : got STATUS_OBJECT_PATH_NOT_FOUND
2023-02-07 02:52:29, Info CSI 00000002 Shim considered [l:123]'\??\C:\Windows\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22621.1245_none_e95e4cae42cdfd26\wcp.dll' : got STATUS_SUCCESS
2023-02-07 02:52:29, Info DISM DISM Driver Manager: PID=20448 TID=20468 Further logs for driver related operations can be found in the target operating system at %WINDIR%\inf\setupapi.offline.log - CDriverManager::Initialize
2023-02-07 02:52:29, Info DISM DISM Package Manager: PID=20448 TID=20468 Finished initializing the CbsConUI Handler. - CCbsConUIHandler::Initialize
2023-02-07 02:52:29, Info DISM DISM Package Manager: PID=20448 TID=20468 CBS is being initialized for online use. More information about CBS actions can be located at: %windir%\logs\CBS\CBS.log - CDISMPackageManager::Initialize
2023-02-07 02:52:29, Info DISM DISM Package Manager: PID=20448 TID=20468 Loaded servicing stack for online use. - CDISMPackageManager::CreateCbsSession
2023-02-07 02:52:29, Info CSI 00000001 Shim considered [l:126]'\??\C:\Windows\Servicing\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22621.1245_none_e95e4cae42cdfd26\wcp.dll' : got STATUS_OBJECT_PATH_NOT_FOUND
2023-02-07 02:52:29, Info CSI 00000002 Shim considered [l:123]'\??\C:\Windows\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22621.1245_none_e95e4cae42cdfd26\wcp.dll' : got STATUS_SUCCESS
2023-02-07 02:52:29, Info DISM DISM Package Manager: PID=20448 TID=20468 Processing the top level command token(enable-feature). - CPackageManagerCLIHandler::Private_ValidateCmdLine
2023-02-07 02:52:29, Info DISM DISM Package Manager: PID=20448 TID=20468 Attempting to route to appropriate command handler. - CPackageManagerCLIHandler::ExecuteCmdLine
2023-02-07 02:52:29, Info DISM DISM Package Manager: PID=20448 TID=20468 Routing the command... - CPackageManagerCLIHandler::ExecuteCmdLine
2023-02-07 02:52:29, Info DISM DISM Package Manager: PID=20448 TID=20468 Encountered the option "featurename" with value "Microsoft-Windows-Subsystem-Linux" - CPackageManagerCLIHandler::Private_GetPackagesFromCommandLine
2023-02-07 02:52:29, Info DISM DISM Package Manager: PID=20448 TID=20468 Encountered an unknown option "featurename" with value "Microsoft-Windows-Subsystem-Linux" - CPackageManagerCLIHandler::Private_GetPackagesFromCommandLine
2023-02-07 02:52:29, Info DISM DISM Package Manager: PID=20448 TID=20468 Encountered the option "source" with value "C:\test\offline\Windows\WinSxS\" - CPackageManagerCLIHandler::Private_GetPackagesFromCommandLine
2023-02-07 02:52:29, Info DISM DISM Package Manager: PID=20448 TID=20468 Encountered an unknown option "source" with value "C:\test\offline\Windows\WinSxS\" - CPackageManagerCLIHandler::Private_GetPackagesFromCommandLine
2023-02-07 02:52:29, Error DISM DISM Package Manager: PID=20448 TID=20468 Failed to get the Update through CBS. - CDISMPackage::Internal_OpenFeature(hr:0x800f080c)
2023-02-07 02:52:29, Error DISM DISM Package Manager: PID=20448 TID=20468 Failed to get the underlying CBS Feature - CDISMPackage::OpenFeature(hr:0x800f080c)
2023-02-07 02:52:29, Error DISM DISM Package Manager: PID=20448 Feature name Microsoft-Windows-Subsystem-Linux is unknown. - CPackageManagerCLIHandler::Private_GetFeaturesFromCommandLine(hr:0x800f080c)
2023-02-07 02:52:29, Error DISM DISM Package Manager: PID=20448 TID=20468 Unknown features were specified on the command-line. - CPackageManagerCLIHandler::Private_GetFeaturesFromCommandLine(hr:0x800f080c)
2023-02-07 02:52:29, Error DISM DISM Package Manager: PID=20448 TID=20468 Failed to get the Feature List from the command line. - CPackageManagerCLIHandler::Private_ProcessFeatureChange(hr:0x800f080c)
2023-02-07 02:52:29, Error DISM DISM Package Manager: PID=20448 TID=20468 Failed while processing command enable-feature. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x800f080c)
2023-02-07 02:52:29, Info DISM DISM Package Manager: PID=20448 TID=20468 Further logs for online package and feature related operations can be found at %WINDIR%\logs\CBS\cbs.log - CPackageManagerCLIHandler::ExecuteCmdLine
2023-02-07 02:52:29, Info DISM DISM Package Manager: PID=20448 TID=20468 Finalizing CBS core. - CDISMPackageManager::Finalize
2023-02-07 02:52:29, Info DISM DISM Manager: PID=20420 TID=20424 Closing session event handle 0x248 - CDISMManager::CleanupImageSessionEntry
2023-02-07 02:52:29, Info DISM DISM.EXE: Image session has been closed. Reboot required=no.
2023-02-07 02:52:29, Info DISM DISM.EXE:
2023-02-07 02:52:29, Info DISM DISM.EXE: <----- Ending Dism.exe session ----->
2023-02-07 02:52:29, Info DISM DISM.EXE: