How Do I Enable Windows Features via package in Software Center

I have a script I created which enables windows features so that I can use active directory tools such as users and computers.  I created a package in SCCM in which all it is, is a simple program which runs a .cmd file which is my script.  My script is as follows

dism /Online /Enable-Feature /FeatureName:RemoteServerAdministrationTools-Roles-AD-Powershell
dism /Online /Enable-Feature /FeatureName:RemoteServerAdministrationTools-Roles-AD-DS
dism /Online /Enable-Feature /FeatureName:RemoteServerAdministrationTools-Roles-AD-DS-SnapIns
dism /Online /Enable-Feature /FeatureName:RemoteServerAdministrationTools-Roles-AD-DS-AdministrativeCenter.

When I deploy and run this package in software center it fails, Error: 0xB(11) If I run the script myself it works.  I have tried both run with users rights and run with admin rights but none of these seem to work.

Does anyone have any idea of how I can deploy a package which will make it so i can enable windows features via the software center?  My goal is to deploy this to the help desk staff so that in the event they dont have the tools enabled they can just run this from the software center since some of them don't remember the steps to enable these windows features.

Thanks!

August 31st, 2015 11:46am

What command-line exactly do you have specified in the program?

Also, have you reviewed execmgr.log on a client where this error occurs? Please post the entire relevant and unedited snippet from that log file showing the execution and failure.

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 12:10pm

Error 11 = An attempt was made to load a program with an incorrect format.

Are you trying to run a x64 exe in a x86 batch file window? 

August 31st, 2015 12:13pm

the command line is just the cmd file so EnableWindowsFeatures.cmd, which just contains the above.

Validating chain of dependent programs for package LSA00093 optional program Enabe Active Directory Tools execmgr 8/31/2015 10:29:01 AM 6452 (0x1934)
Validating package LSA00093 program Enabe Active Directory Tools in the chain. The content request ID is {00000000-0000-0000-0000-000000000000} execmgr 8/31/2015 10:29:01 AM 6452 (0x1934)
Creating an optional execution request for package LSA00093 program Enabe Active Directory Tools execmgr 8/31/2015 10:29:01 AM 6452 (0x1934)
Requesting content from CAS for package LSA00093 version 6 execmgr 8/31/2015 10:29:01 AM 6452 (0x1934)
Successfully created a content request handle {0778E659-E804-47A6-B9B1-3AF71B8BA376} for the package LSA00093 version 6 execmgr 8/31/2015 10:29:01 AM 6452 (0x1934)
Raising event:
[SMS_CodePage(437), SMS_LocaleID(1033)]
instance of SoftDistWaitingContentEvent
{
AdvertisementId = "LSA200A8";
ClientID = "GUID:cd21aabb-081d-44ed-8651-22868a3df71d";
DateTime = "20150831152901.452000+000";
MachineName = "CSD-VPC-OSD01";
PackageName = "LSA00093";
PackageVersion = "6";
ProcessID = 4624;
ProgramName = "Enabe Active Directory Tools";
SiteCode = "LSA";
ThreadID = 6452;
};
execmgr 8/31/2015 10:29:01 AM 6452 (0x1934)
Successfully raised SoftDistWaitingContentEvent event for program Enabe Active Directory Tools execmgr 8/31/2015 10:29:01 AM 6452 (0x1934)
Execution Request for advert  package LSA00093 program Enabe Active Directory Tools state change from NotExist to WaitingContent execmgr 8/31/2015 10:29:01 AM 6452 (0x1934)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 10:29:01 AM 6452 (0x1934)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 10:29:01 AM 5352 (0x14E8)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 10:29:01 AM 6024 (0x1788)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 10:29:01 AM 1048 (0x0418)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 10:29:02 AM 4896 (0x1320)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 10:29:02 AM 5352 (0x14E8)
  Processing [{0778E659-E804-47A6-B9B1-3AF71B8BA376}, 0]: OnContentAvailable execmgr 8/31/2015 10:29:02 AM 4896 (0x1320)
[{0778E659-E804-47A6-B9B1-3AF71B8BA376}]: Content Version 6 is available for advert , pkg: LSA00093, program Enabe Active Directory Tools. execmgr 8/31/2015 10:29:02 AM 4896 (0x1320)
An existing MTC token was not supplied, using ExecutionRequest's Id as MTC token and this execution request is the owner of resultant MTC task. execmgr 8/31/2015 10:29:02 AM 4896 (0x1320)
Request a MTC task for execution request of package LSA00093, program Enabe Active Directory Tools with request id: {0A002B6F-7358-4DC6-A651-1DC64714E126} execmgr 8/31/2015 10:29:02 AM 4896 (0x1320)
Execution Request for advert  package LSA00093 program Enabe Active Directory Tools state change from WaitingContent to Ready execmgr 8/31/2015 10:29:02 AM 4896 (0x1320)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 10:29:02 AM 4896 (0x1320)
  Processing [{0778E659-E804-47A6-B9B1-3AF71B8BA376}, 0]: RemoveNotification execmgr 8/31/2015 10:29:02 AM 4896 (0x1320)
MTC task with id {0A002B6F-7358-4DC6-A651-1DC64714E126}, changed state from 0 to 4 execmgr 8/31/2015 10:29:02 AM 2700 (0x0A8C)
MTC signaled SWD execution request with program id: Enabe Active Directory Tools, package id: LSA00093 for execution. execmgr 8/31/2015 10:29:02 AM 2700 (0x0A8C)
Sending ack to MTC for task with id: {0A002B6F-7358-4DC6-A651-1DC64714E126} execmgr 8/31/2015 10:29:03 AM 2700 (0x0A8C)
Executing program EnableWindowsFeatureADDS.cmd in Admin context execmgr 8/31/2015 10:29:03 AM 2700 (0x0A8C)
Execution Request for advert  package LSA00093 program Enabe Active Directory Tools state change from Ready to NotifyExecution execmgr 8/31/2015 10:29:03 AM 2700 (0x0A8C)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 10:29:03 AM 2700 (0x0A8C)
Checking content location C:\WINDOWS\ccmcache\21 for use execmgr 8/31/2015 10:29:03 AM 2700 (0x0A8C)
Successfully selected content location C:\WINDOWS\ccmcache\21 execmgr 8/31/2015 10:29:03 AM 2700 (0x0A8C)
Executing program as a script execmgr 8/31/2015 10:29:03 AM 2700 (0x0A8C)
Successfully prepared command line "C:\WINDOWS\ccmcache\21\EnableWindowsFeatureADDS.cmd" execmgr 8/31/2015 10:29:03 AM 2700 (0x0A8C)
Command line = "C:\WINDOWS\ccmcache\21\EnableWindowsFeatureADDS.cmd", Working Directory = C:\WINDOWS\ccmcache\21\ execmgr 8/31/2015 10:29:03 AM 2700 (0x0A8C)
Running "C:\WINDOWS\ccmcache\21\EnableWindowsFeatureADDS.cmd" with 32bitLauncher execmgr 8/31/2015 10:29:03 AM 2700 (0x0A8C)
Created Process for the passed command line execmgr 8/31/2015 10:29:03 AM 2700 (0x0A8C)
Raising event:
[SMS_CodePage(437), SMS_LocaleID(1033)]
instance of SoftDistProgramStartedEvent
{
AdvertisementId = "LSA200A8";
ClientID = "GUID:cd21aabb-081d-44ed-8651-22868a3df71d";
CommandLine = "\"C:\\WINDOWS\\ccmcache\\21\\EnableWindowsFeatureADDS.cmd\"";
DateTime = "20150831152903.350000+000";
MachineName = "CSD-VPC-OSD01";
PackageName = "LSA00093";
ProcessID = 4624;
ProgramName = "Enabe Active Directory Tools";
SiteCode = "LSA";
ThreadID = 2700;
UserContext = "NT AUTHORITY\\SYSTEM";
WorkingDirectory = "C:\\WINDOWS\\ccmcache\\21\\";
};
execmgr 8/31/2015 10:29:03 AM 2700 (0x0A8C)
Raised Program Started Event for Ad:LSA200A8, Package:LSA00093, Program: Enabe Active Directory Tools execmgr 8/31/2015 10:29:03 AM 2700 (0x0A8C)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 10:29:03 AM 2700 (0x0A8C)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 10:29:03 AM 2700 (0x0A8C)
MTC task with id {0A002B6F-7358-4DC6-A651-1DC64714E126}, changed state from 4 to 5 execmgr 8/31/2015 10:29:03 AM 6668 (0x1A0C)
Program exit code 11 execmgr 8/31/2015 10:29:04 AM 6024 (0x1788)
Looking for MIF file to get program status execmgr 8/31/2015 10:29:04 AM 6024 (0x1788)
Script for Package:LSA00093, Program: Enabe Active Directory Tools failed with exit code 11 execmgr 8/31/2015 10:29:04 AM 6024 (0x1788)
Raising event:
[SMS_CodePage(437), SMS_LocaleID(1033)]
instance of SoftDistProgramErrorEvent
{
AdvertisementId = "LSA200A8";
ClientID = "GUID:cd21aabb-081d-44ed-8651-22868a3df71d";
DateTime = "20150831152904.126000+000";
ExitCode = "11";
MachineName = "CSD-VPC-OSD01";
PackageName = "LSA00093";
ProcessID = 4624;
ProgramName = "Enabe Active Directory Tools";
SiteCode = "LSA";
ThreadID = 6024;
UserContext = "NT AUTHORITY\\SYSTEM";
};
execmgr 8/31/2015 10:29:04 AM 6024 (0x1788)
Raised Program Error Event for Ad:LSA200A8, Package:LSA00093, Program: Enabe Active Directory Tools execmgr 8/31/2015 10:29:04 AM 6024 (0x1788)
Execution is complete for program Enabe Active Directory Tools. The exit code is 11, the execution status is FailureNonRetry execmgr 8/31/2015 10:29:04 AM 6024 (0x1788)
Requesting MTC to delete task with id: {0A002B6F-7358-4DC6-A651-1DC64714E126} execmgr 8/31/2015 10:29:04 AM 6024 (0x1788)
MTC task with id: {0A002B6F-7358-4DC6-A651-1DC64714E126} deleted successfully. execmgr 8/31/2015 10:29:04 AM 6024 (0x1788)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 10l, value Result:FALSE, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 10:29:04 AM 6024 (0x1788)
Requesting MTC to delete task with id: {0A002B6F-7358-4DC6-A651-1DC64714E126} execmgr 8/31/2015 10:29:04 AM 6024 (0x1788)
This execution request does not have a corresponding task in MTC. execmgr 8/31/2015 10:29:04 AM 6024 (0x1788)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 10:29:04 AM 6024 (0x1788)

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 2:14pm

Error code 11 is the return value from executing your batch file and really has nothing to do with ConfigMgr. ConfigMgr is executing this as a 32-bit process and this may be the source of your issue. You should try to launch the script using the 64-bit command processor using the following command-line instead:

%windir%\sysnative\cmd.exe /c EnableWindowsFeatures.cmd

Note that this will only work in 64-bit OSes though as the sysnative alias does not exist in 32-bit OSes.

August 31st, 2015 2:30pm

To add-on, for an example see: http://www.petervanderwoude.nl/post/installing-and-enabling-remote-server-administration-tools-with-configmgr-2007/
Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 3:37pm

Ok, so i looked at that link and copied that script but modified it a bit since I dont need to install RSAT just enable them.  I am now getting exit code 123

Here is my modified script:

REM ======================================================
REM SET DISM Directory based on OS Architecture
REM SET RSAT Version based on OS Architecture
REM ======================================================

IF EXIST %WINDIR%\SysNative\dism.exe (
    set DISM=%WINDIR%\SysNative\dism.exe
    set RSAT=amd64fre_GRMRSATX_MSU
) ELSE (
    set DISM=%WINDIR%\System32\dism.exe
    set RSAT=x86fre_GRMRSAT_MSU
)

REM ======================================================
REM RUN WUSA to install RSAT
REM ======================================================
   
REM wusa.exe %~dp0%RSAT%.msu /quiet

REM ======================================================
REM RUN DISM to enable features
REM ======================================================

%DISM% /online /enable-feature /featurename:RemoteServerAdministrationTools
/featurename:RemoteServerAdministrationTools-Roles-AD-Powershell
/featurename:RemoteServerAdministrationTools-Roles-AD-DS
/featurename:RemoteServerAdministrationTools-Roles-AD-DS-SnapIns
/featurename:RemoteServerAdministrationTools-Roles-AD-DS-AdministrativeCenter

REM ======================================================
REM EXIT Errorlevel
REM ======================================================

EXIT /b %errorlevel%

Policy is updated for Program: Enabe Active Directory Tools, Package: LSA00093, Advert: LSA200A8 execmgr 8/31/2015 3:01:39 PM 212 (0x00D4)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 45l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 3:01:39 PM 212 (0x00D4)
Validating chain of dependent programs for package LSA00093 optional program Enabe Active Directory Tools execmgr 8/31/2015 3:02:57 PM 5932 (0x172C)
Validating package LSA00093 program Enabe Active Directory Tools in the chain. The content request ID is {00000000-0000-0000-0000-000000000000} execmgr 8/31/2015 3:02:57 PM 5932 (0x172C)
Creating an optional execution request for package LSA00093 program Enabe Active Directory Tools execmgr 8/31/2015 3:02:57 PM 5932 (0x172C)
Requesting content from CAS for package LSA00093 version 7 execmgr 8/31/2015 3:02:57 PM 5932 (0x172C)
Successfully created a content request handle {200C5175-0FAC-4111-9DFE-0B0EA1557F2F} for the package LSA00093 version 7 execmgr 8/31/2015 3:02:57 PM 5932 (0x172C)
Raising event:
[SMS_CodePage(437), SMS_LocaleID(1033)]
instance of SoftDistWaitingContentEvent
{
AdvertisementId = "LSA200A8";
ClientID = "GUID:cd21aabb-081d-44ed-8651-22868a3df71d";
DateTime = "20150831200257.786000+000";
MachineName = "CSD-VPC-OSD01";
PackageName = "LSA00093";
PackageVersion = "7";
ProcessID = 4624;
ProgramName = "Enabe Active Directory Tools";
SiteCode = "LSA";
ThreadID = 5932;
};
execmgr 8/31/2015 3:02:57 PM 5932 (0x172C)
Successfully raised SoftDistWaitingContentEvent event for program Enabe Active Directory Tools execmgr 8/31/2015 3:02:57 PM 5932 (0x172C)
Execution Request for advert  package LSA00093 program Enabe Active Directory Tools state change from NotExist to WaitingContent execmgr 8/31/2015 3:02:57 PM 5932 (0x172C)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 3:02:57 PM 5932 (0x172C)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 3:02:57 PM 4416 (0x1140)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 3:02:58 PM 3936 (0x0F60)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 3:02:58 PM 5576 (0x15C8)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 3:02:58 PM 2640 (0x0A50)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 3:02:58 PM 2640 (0x0A50)
  Processing [{200C5175-0FAC-4111-9DFE-0B0EA1557F2F}, 0]: OnContentAvailable execmgr 8/31/2015 3:02:58 PM 2640 (0x0A50)
[{200C5175-0FAC-4111-9DFE-0B0EA1557F2F}]: Content Version 7 is available for advert , pkg: LSA00093, program Enabe Active Directory Tools. execmgr 8/31/2015 3:02:58 PM 2640 (0x0A50)
An existing MTC token was not supplied, using ExecutionRequest's Id as MTC token and this execution request is the owner of resultant MTC task. execmgr 8/31/2015 3:02:58 PM 2640 (0x0A50)
Request a MTC task for execution request of package LSA00093, program Enabe Active Directory Tools with request id: {C8C335AE-4524-40F1-9B26-775DDE8169E6} execmgr 8/31/2015 3:02:58 PM 2640 (0x0A50)
Execution Request for advert  package LSA00093 program Enabe Active Directory Tools state change from WaitingContent to Ready execmgr 8/31/2015 3:02:58 PM 2640 (0x0A50)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 3:02:58 PM 2640 (0x0A50)
MTC task with id {C8C335AE-4524-40F1-9B26-775DDE8169E6}, changed state from 0 to 4 execmgr 8/31/2015 3:02:58 PM 6556 (0x199C)
  Processing [{200C5175-0FAC-4111-9DFE-0B0EA1557F2F}, 0]: RemoveNotification execmgr 8/31/2015 3:02:58 PM 2640 (0x0A50)
MTC signaled SWD execution request with program id: Enabe Active Directory Tools, package id: LSA00093 for execution. execmgr 8/31/2015 3:02:58 PM 6556 (0x199C)
Sending ack to MTC for task with id: {C8C335AE-4524-40F1-9B26-775DDE8169E6} execmgr 8/31/2015 3:02:58 PM 6556 (0x199C)
Executing program EnableWindowsFeatureADDS.cmd in Admin context execmgr 8/31/2015 3:02:58 PM 6556 (0x199C)
Execution Request for advert  package LSA00093 program Enabe Active Directory Tools state change from Ready to NotifyExecution execmgr 8/31/2015 3:02:58 PM 6556 (0x199C)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 3:02:58 PM 6556 (0x199C)
Checking content location C:\WINDOWS\ccmcache\22 for use execmgr 8/31/2015 3:02:58 PM 6556 (0x199C)
Successfully selected content location C:\WINDOWS\ccmcache\22 execmgr 8/31/2015 3:02:58 PM 6556 (0x199C)
Executing program as a script execmgr 8/31/2015 3:02:58 PM 6556 (0x199C)
Successfully prepared command line "C:\WINDOWS\ccmcache\22\EnableWindowsFeatureADDS.cmd" execmgr 8/31/2015 3:02:58 PM 6556 (0x199C)
Command line = "C:\WINDOWS\ccmcache\22\EnableWindowsFeatureADDS.cmd", Working Directory = C:\WINDOWS\ccmcache\22\ execmgr 8/31/2015 3:02:58 PM 6556 (0x199C)
Running "C:\WINDOWS\ccmcache\22\EnableWindowsFeatureADDS.cmd" with 32bitLauncher execmgr 8/31/2015 3:02:58 PM 6556 (0x199C)
Created Process for the passed command line execmgr 8/31/2015 3:02:58 PM 6556 (0x199C)
Raising event:
[SMS_CodePage(437), SMS_LocaleID(1033)]
instance of SoftDistProgramStartedEvent
{
AdvertisementId = "LSA200A8";
ClientID = "GUID:cd21aabb-081d-44ed-8651-22868a3df71d";
CommandLine = "\"C:\\WINDOWS\\ccmcache\\22\\EnableWindowsFeatureADDS.cmd\"";
DateTime = "20150831200258.826000+000";
MachineName = "CSD-VPC-OSD01";
PackageName = "LSA00093";
ProcessID = 4624;
ProgramName = "Enabe Active Directory Tools";
SiteCode = "LSA";
ThreadID = 6556;
UserContext = "NT AUTHORITY\\SYSTEM";
WorkingDirectory = "C:\\WINDOWS\\ccmcache\\22\\";
};
execmgr 8/31/2015 3:02:58 PM 6556 (0x199C)
Raised Program Started Event for Ad:LSA200A8, Package:LSA00093, Program: Enabe Active Directory Tools execmgr 8/31/2015 3:02:58 PM 6556 (0x199C)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 3:02:58 PM 6556 (0x199C)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 3:02:58 PM 6556 (0x199C)
MTC task with id {C8C335AE-4524-40F1-9B26-775DDE8169E6}, changed state from 4 to 5 execmgr 8/31/2015 3:02:58 PM 6408 (0x1908)
Program exit code 123 execmgr 8/31/2015 3:03:15 PM 6104 (0x17D8)
Looking for MIF file to get program status execmgr 8/31/2015 3:03:15 PM 6104 (0x17D8)
Script for Package:LSA00093, Program: Enabe Active Directory Tools failed with exit code 123 execmgr 8/31/2015 3:03:15 PM 6104 (0x17D8)
Raising event:
[SMS_CodePage(437), SMS_LocaleID(1033)]
instance of SoftDistProgramErrorEvent
{
AdvertisementId = "LSA200A8";
ClientID = "GUID:cd21aabb-081d-44ed-8651-22868a3df71d";
DateTime = "20150831200315.762000+000";
ExitCode = "123";
MachineName = "CSD-VPC-OSD01";
PackageName = "LSA00093";
ProcessID = 4624;
ProgramName = "Enabe Active Directory Tools";
SiteCode = "LSA";
ThreadID = 6104;
UserContext = "NT AUTHORITY\\SYSTEM";
};
execmgr 8/31/2015 3:03:15 PM 6104 (0x17D8)
Raised Program Error Event for Ad:LSA200A8, Package:LSA00093, Program: Enabe Active Directory Tools execmgr 8/31/2015 3:03:15 PM 6104 (0x17D8)
Execution is complete for program Enabe Active Directory Tools. The exit code is 123, the execution status is FailureNonRetry execmgr 8/31/2015 3:03:15 PM 5576 (0x15C8)
Requesting MTC to delete task with id: {C8C335AE-4524-40F1-9B26-775DDE8169E6} execmgr 8/31/2015 3:03:15 PM 5576 (0x15C8)
MTC task with id: {C8C335AE-4524-40F1-9B26-775DDE8169E6} deleted successfully. execmgr 8/31/2015 3:03:15 PM 5576 (0x15C8)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 10l, value Result:FALSE, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 3:03:15 PM 5576 (0x15C8)
Requesting MTC to delete task with id: {C8C335AE-4524-40F1-9B26-775DDE8169E6} execmgr 8/31/2015 3:03:15 PM 5576 (0x15C8)
This execution request does not have a corresponding task in MTC. execmgr 8/31/2015 3:03:15 PM 5576 (0x15C8)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="LSA00093",ProgramID="Enabe Active Directory Tools", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 8/31/2015 3:03:15 PM 5576 (0x15C8)

August 31st, 2015 4:11pm

On a side note I did try the above suggestion after seeing it a bit later to do this %windir%\sysnative\cmd.exe /c EnableWindowsFeatures.cmd with the original script.  This seemed to kind of work but it fails with exit code 50, now I do see that the active directory tools were enabled so it worked but it still through an error.  Not sure what to make of that.
Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 4:26pm

As it's only using DISM you might want to check the DISM.log (C:\Windows\Logs\DISM) for more information.
September 1st, 2015 3:35am

The only things I have in red for my DISM log are:

2015-09-01 08:40:06, Info                  DISM   DISM Provider Store: PID=1640 Failed to get and initialize the PE Provider.  Continuing by assuming that it is not a WinPE image. - CDISMProviderStore::Final_OnConnect
2015-09-01 08:40:07, Warning               DISM   DISM Provider Store: PID=3896 Failed to Load the provider: C:\WINDOWS\TEMP\67A95202-81FC-4580-9DC2-745FCC12CF0F\PEProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
2015-09-01 08:40:07, Info                  DISM   DISM Provider Store: PID=3896 Failed to get and initialize the PE Provider.  Continuing by assuming that it is not a WinPE image. - CDISMProviderStore::Final_OnConnect
2015-09-01 08:40:19, Info                  DISM   DISM Provider Store: PID=3712 Failed to get and initialize the PE Provider.  Continuing by assuming that it is not a WinPE image. - CDISMProviderStore::Final_OnConnect
2015-09-01 08:40:20, Warning               DISM   DISM Provider Store: PID=4344 Failed to Load the provider: C:\WINDOWS\TEMP\33FE2517-77A9-4085-AD0B-248B95B613B2\PEProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
2015-09-01 08:40:20, Info                  DISM   DISM Provider Store: PID=4344 Failed to get and initialize the PE Provider.  Continuing by assuming that it is not a WinPE image. - CDISMProviderStore::Final_OnConnect
2015-09-01 08:40:37, Info                  DISM   DISM Provider Store: PID=3320 Failed to get and initialize the PE Provider.  Continuing by assuming that it is not a WinPE image. - CDISMProviderStore::Final_OnConnect
2015-09-01 08:40:37, Warning               DISM   DISM Provider Store: PID=3716 Failed to Load the provider: C:\WINDOWS\TEMP\B90FCF14-274D-4E5C-A52D-44091DC2FF56\PEProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
2015-09-01 08:40:37, Info                  DISM   DISM Provider Store: PID=3716 Failed to get and initialize the PE Provider.  Continuing by assuming that it is not a WinPE image. - CDISMProviderStore::Final_OnConnect
2015-09-01 08:40:49, Error                 DISM   DISM Package Manager: PID=3716 Parent features must be enabled before this feature can be enabled. "RemoteServerAdministrationTools-Roles-AD-DS-AdministrativeCenter" - CPackageManagerCLIHandler::Private_ProcessFeatureChange
2015-09-01 08:40:49, Error                 DISM   DISM Package Manager: PID=3716 One or more features could not be enabled. - CPackageManagerCLIHandler::Private_ProcessFeatureChange(hr:0x80070032)
2015-09-01 08:40:49, Error                 DISM   DISM Package Manager: PID=3716 Failed while processing command enable-feature. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x80070032)

The one thing I noticed was Parent features must be enabled before this feature can be enabled, so im thinking that is what through the error code 50 but what I don't get is it works fine and i made sure it was in the right order when i run the cmd file manually which is this: 

dism /Online /Enable-Feature /FeatureName:RemoteServerAdministrationTools-Roles-AD-Powershell
dism /Online /Enable-Feature /FeatureName:RemoteServerAdministrationTools-Roles-AD-DS
dism /Online /Enable-Feature /FeatureName:RemoteServerAdministrationTools-Roles-AD-DS-SnapIns
dism /Online /Enable-Feature /FeatureName:RemoteServerAdministrationTools-Roles-AD-DS-AdministrativeCenter

The above is litterally it for what is in my cmd file

Free Windows Admin Tool Kit Click here and download it now
September 1st, 2015 10:19am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics