Cannot get global condition with powershell script to work during OSD application installation

Hi guys,

Apologies for the long therad title.

Lets take things in reverse:

I have an application that i wish to deploy during OSD. The application needs one deployment type for OSD, and one deployment type for regular installations. I've created two deployment types, and placed the one for OSD as highest priority to be selected first.

On the OSD deployment type, as a requirement, i've set a custom Global Condition in order to evaluate if the TS manager is running on the computer (which would then indicate a OSD deployment).

The custom Global Condition is created as a script with boolean data type. The script is powershell, and consists of one line to return 'true' if TSManager process is running: [bool] (Get-Process TSmanager ea 0)

I've tested this by the command console during OSD, and the script works fine. The boolean value should then be returned to configmgr, and the requirement for my OSD deployment type to be selected for installation.

During the task sequence, i also make sure to enable the execution of unsigned PowerShell scripts using the command powershell.exe -Command "Set-ExecutionPolicy Unrestricted" This command also works, and i've verified this from the command prompt during OSD using the Get-ExecutionPolicy powershell command.

However, when my application is to be evaluated the task sequence fails with the generic error 0x80004005. I can't seemto find which logs that will help me troubleshoot the problem. 

I've made sure to enable powershell support for my boot image.

Can someone help shed some light on what i'm doing wrong?

Thanks.



January 17th, 2014 12:50pm

I am having the same Problem. I have a global condition that uses powershell, and my application won't install during OSD. It will install at other times. Did you ever resolve this?

I am getting the same error in AppIntenEval: Rejecting "" due to evaluation error

Free Windows Admin Tool Kit Click here and download it now
August 21st, 2014 10:48pm

Same Problem with sccm r2 cu2.

Global Condition with powershell doesn't work in OSD.

Rejecting ScopeId_F52ABADB-D80D-46C7-97E7-FA9277C41878/RequiredApplication_fe40f523-e0fd-45ff-9a09-a35a6c69a520/7 due to evaluation error

October 1st, 2014 9:30am

Rejecting ScopeId_F52ABADB-D80D-46C7-97E7-FA9277C41878/RequiredApplication_fe40f523-e0fd-45ff-9a09-a35a6c69a520/7 due to evaluation error

This usually happens if the powershell execution policy is not set during the task sequence. This should do the trick:


reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\PowerShell /v EnableScripts /t REG_DWORD /d 1 /f 
reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\PowerShell /v ExecutionPolicy /d RemoteSigned /f᥿
Free Windows Admin Tool Kit Click here and download it now
October 1st, 2014 9:57am

I have the same Problem with global conditions with powershell scripts. The restriction policy is set to unrestricted. The condition works fine, after the Task Sequence the global condition is evaluated and the software installed. Even during the Task Sequence, if I run the line in powershell, it works fine. We are using SCCM 2012 SP1 CU1

Is there a solution for hat Problem?

smsts.log

CAppMgmtSDK::GetEvaluationState ScopeId_54CA1D0F-0B1B-4746-B137-26BE41163A9A/RequiredApplication_6f4a111d-1fcf-4b95-9428-f931dc59299e.9 = EvaluationFailed DCMAgent 27.05.2015 10:25:21 3304 (0x0CE8)
Installation job completed with exit code 0x00000000 InstallApplication 27.05.2015 10:25:21 3304 (0x0CE8)
Execution status received: 16 (Application failed to evaluate ) InstallApplication 27.05.2015 10:25:21 3304 (0x0CE8)
App install failed. InstallApplication 27.05.2015 10:25:21 3304 (0x0CE8)

DCMReportinglog:

No ConfigPoints found for rule:System Center Configuration Manager.ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_Application_91f09a4e_ba7b_439c_83ab_5c5684d02584_6_Platform_PolicyDocument.6.Platform_Rule_ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_Application_91f09a4e_ba7b_439c_83ab_5c5684d02584_6 DCMReporting 27.05.2015 10:25:25 2124 (0x084C)
In policy:ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_Application_91f09a4e_ba7b_439c_83ab_5c5684d02584_6_Platform_PolicyDocument, rule:Platform_Rule_ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_Application_91f09a4e_ba7b_439c_83ab_5c5684d02584_6 status is:Conformant DCMReporting 27.05.2015 10:25:25 2124 (0x084C)
No ConfigPoints found for rule:System Center Configuration Manager.ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_Application_91f09a4e_ba7b_439c_83ab_5c5684d02584_6_Platform_PolicyDocument.6.5fed7d11_23e5_46ef_9648_ec05eb82e271__ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_Application_91f09a4e_ba7b_439c_83ab_5c5684d02584_6_Platform_PolicyDocument DCMReporting 27.05.2015 10:25:25 2124 (0x084C)
In policy:ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_Application_91f09a4e_ba7b_439c_83ab_5c5684d02584_6_Platform_PolicyDocument, rule:5fed7d11_23e5_46ef_9648_ec05eb82e271__ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_Application_91f09a4e_ba7b_439c_83ab_5c5684d02584_6_Platform_PolicyDocument status is:Conformant DCMReporting 27.05.2015 10:25:25 2124 (0x084C)
No ConfigPoints found for rule:System Center Configuration Manager.ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_DeploymentType_319fd543_88c2_46c7_90dc_03f8ef898522_5_Requirements_PolicyDocument.5.5fed7d11_23e5_46ef_9648_ec05eb82e271__ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_DeploymentType_319fd543_88c2_46c7_90dc_03f8ef898522_5_Requirements_PolicyDocument DCMReporting 27.05.2015 10:25:25 2124 (0x084C)
In policy:ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_DeploymentType_319fd543_88c2_46c7_90dc_03f8ef898522_5_Requirements_PolicyDocument, rule:5fed7d11_23e5_46ef_9648_ec05eb82e271__ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_DeploymentType_319fd543_88c2_46c7_90dc_03f8ef898522_5_Requirements_PolicyDocument status is:Conformant DCMReporting 27.05.2015 10:25:25 2124 (0x084C)
No ConfigPoints found for rule:System Center Configuration Manager.ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_Application_91f09a4e_ba7b_439c_83ab_5c5684d02584_6_Configuration_PolicyDocument.6.5fed7d11_23e5_46ef_9648_ec05eb82e271__ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_Application_91f09a4e_ba7b_439c_83ab_5c5684d02584_6_Configuration_PolicyDocument DCMReporting 27.05.2015 10:25:25 2124 (0x084C)
In policy:ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_Application_91f09a4e_ba7b_439c_83ab_5c5684d02584_6_Configuration_PolicyDocument, rule:5fed7d11_23e5_46ef_9648_ec05eb82e271__ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_Application_91f09a4e_ba7b_439c_83ab_5c5684d02584_6_Configuration_PolicyDocument status is:Conformant DCMReporting 27.05.2015 10:25:25 2124 (0x084C)
Conformant Rule:5fed7d11_23e5_46ef_9648_ec05eb82e271__ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_Application_91f09a4e_ba7b_439c_83ab_5c5684d02584_6_Configuration_PolicyDocument not found DCMReporting 27.05.2015 10:25:25 2124 (0x084C)
In policy:ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_DeploymentType_319fd543_88c2_46c7_90dc_03f8ef898522_5_Discovery_PolicyDocument, rule:Discovery_Rule_ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_DeploymentType_319fd543_88c2_46c7_90dc_03f8ef898522_5 status is:NotConformant DCMReporting 27.05.2015 10:25:25 2124 (0x084C)
No ConfigPoints found for rule:System Center Configuration Manager.ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_DeploymentType_319fd543_88c2_46c7_90dc_03f8ef898522_5_Discovery_PolicyDocument.5.5fed7d11_23e5_46ef_9648_ec05eb82e271__ScopeId_54CA1D0F_0B1B_4746_B137_26BE41163A9A_DeploymentType_319fd543_88c2_46c7_90dc_03f8ef898522_5_Discovery_PolicyDocument DCMReporting 27.05.2015 10:25:25 2124 (0x084C)

May 27th, 2015 5:53am

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

Other recent topics Other recent topics