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)