SCCM App Deployment Issues PowerShell Execution Policy

I am a long-time SCCM/Config Manager/Endpoint Manager/SMS user. I normally figure out all my issues, but I installed my SCCM current environment, so I have missed something. In the 4 previous jobs everything was installed. I didn’t have this issue and all I had to do there was cleanup or rebuild System Center.

But in my environment, when I deploy applications using the toolkit (3.8.4), all apps fail in Software Center, but if I open PowerShell and set the Execution Policy to Bypass and rerun it in Software Center the apps install correctly.

Usually when you launch PSADT from SCCM, it runs elevated and the execution policy is not an issue.

Are you running PSADT in the user context?
Do you have any log files from PSADT or SCCM?

Here is the code from the deploy-applicaitom.ps1

Execute-Process -Path “$dirFiles\Setup.exe” -Parameters “/configure $dirFiles\Labs.xml” -WindowStyle Hidden

Ok - So here is what I get in Software Center

Log is below - Error = 1

But when I change update the Execution-policy - it installs

 (Microsoft.SoftwareCenter.Client.Data.WmiConnectionManager at GetInstance)]LOG]!><time="08:24:28.3126960" date="7-15-2022" component="SCClient" context="" type="1" thread="15" file="">

<![LOG[AppDetails received Event Application Enforcement Failed, state 4, causing a state display value of Past due - will be retried. The Action Button says _Retry and its enabled state is True (Microsoft.SoftwareCenter.Client.ViewModels.ApplicationDetailsViewModel+<WmiDataConnection_WmiNotificationEvent>d__139 at MoveNext)]LOG]!><time=“08:24:28.3206473” date=“7-15-2022” component=“SCClient” context=“” type=“1” thread=“15” file=“”>
<![LOG[Received a WMI event (CCM_InstanceEvent) (Microsoft.SoftwareCenter.Client.Data.WmiConnectionManager at EventWatcher_EventArrived)]LOG]!><time=“08:41:26.4238126” date=“7-15-2022” component=“SCClient” context=“” type=“1” thread=“10” file=“”>
MAfQC42xsBmF0AAwDAswBw9T8ZqQMARlUAgNu4+dcDAHggUAoA/LsAsAFQDABw9X9unQCAxwGnAOA4BYCOHb76f/LzTXT78Jto6p1307333msuYnD/P6ymzP9lAWBH2wBISgGgg5f8hZcRAL4IAACQsdwJgHUAIOeHH36Y7mGSnnrHHTTxjtvpza/9gD6MrAlQAGgHAFglHwHcxQCArYBzANiwAABTHADA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JVCpf0DBAT8sYBvBHCCy0AAY4EZ02jKjTfTMzvtT88vtxE9s/oWixgA7AgAzV8A4E4PALLnADgAsJsA5QAwqQoA+M8CKAMAHgecA8BtHgDczM1eAOAGBgDsAugDAB4EFAJA4UmACQA43wMA7AboG4Az6wSA//UYQFetLJv/LP0AYJr+NhxZsc/N/8nDNqA7//0TmjjsZr7Cn2IyfOw4GjnazvH9WT4aP/7eyxU+vgv4TsSu9P1Zvn+FL5Fmj8hVPvR+7EofQdP3r/Zh9hAAvjR+fN993Y/zAZo/zg+xq345atVXCgBan0n5X9oQBBCxAYiMBQACYgOgBgECsdsGcYWBk46AAIKTlA8COLGVQGDSRBrLV0Cj7r6T7jn1bHp2s13ouUEbccPfcpECAB4FXAQ…
Id = “ScopeId_9796B5EC-FF7D-423E-98B6-24B064878E12/Application_8ed965f1-6d11-4f70-b624-493b2e0117ea”;
InformativeUrl = “”;
InfoUrlText = “”;
InProgressActions = {};
InstallState = “NotInstalled”;
IsMachineTarget = TRUE;
IsPreflightOnly = FALSE;
LastEvalTime = “20220715082427.000000+000”;
Name = “Office 365 - Labs”;
NotifyUser = FALSE;
OverrideServiceWindow = FALSE;
PercentComplete = 0;
PrivacyUri = “”;
RebootOutsideServiceWindow = FALSE;
ReleaseDate = “20211229000000.000000+000”;
ResolvedState = “Installed”;
Revision = “9”;
StartTime = “20220328070600.000000+000”;
SupersessionState = “None”;
Type = 1;
UserUIExperience = TRUE;
};
(Microsoft.SoftwareCenter.Client.Data.WmiConnectionManager at GetInstance)]LOG]!><time=“08:24:28.2827769” date=“7-15-2022” component=“SCClient” context=“” type=“1” thread=“19” file=“”>
<![LOG[Getting a WMI instance for CCM_Application.Id=“ScopeId_9796B5EC-FF7D-423E-98B6-24B064878E12/Application_8ed965f1-6d11-4f70-b624-493b2e0117ea”,IsMachineTarget=TRUE,Revision=“9” (Microsoft.SoftwareCenter.Client.Data.WmiConnectionManager at GetInstance)]LOG]!><time=“08:24:28.2917535” date=“7-15-2022” component=“SCClient” context=“” type=“1” thread=“15” file=“”>
<![LOG[Got instance from WMI for \D24-203-06\root\ccm\ClientSDK:CCM_Application.Id=“ScopeId_9796B5EC-FF7D-423E-98B6-24B064878E12/Application_8ed965f1-6d11-4f70-b624-493b2e0117ea”,IsMachineTarget=true,Revision=“9” (Microsoft.SoftwareCenter.Client.Data.WmiConnectionManager at GetInstance)]LOG]!><time=“08:24:28.3066861” date=“7-15-2022” component=“SCClient” context=“” type=“1” thread=“15” file=“”>
<![LOG[
instance of CCM_Application
{
AllowedActions = {“Install”};
AppDTs = {
instance of CCM_AppDeploymentType
{
AllowedActions = {“Install”};
ApplicabilityState = “Applicable”;
ConfigureState = “NotNeeded”;
ContentSize = 2925474;
DeploymentReport = “<ConfigurationItemReport AuthoringScope="ScopeId_9796B5EC-FF7D-423E-98B6-24B064878E12" LogicalName="DeploymentType_3bd66499-e2c1-4d10-b2fc-f14a5c612b20" Version="8" Type="Deployment Type" ComputerName="D24-203-06" CIComplianceState="NotInstalled" CIDesiredState="Installed" CIApplicablityState="Applicable" CISeverity="None" CIConfigureState="NotNeeded" TotalConstraintViolations="0" TotalModelViolations="0" TotalSuppressionCount="0" TotalEnforcements="0" MaxOverallSeverity="None" TotalConflicts="0" TotalDependancyViolations="0" TotalSupersedesViolations="0" TotalNonSupersedenceViolations="0" TotalCompliantCount="1" SupersessionState="None" TotalRequirementsCount="0" TotalDiscoveryViolations="0">O365 - Labs<NonSupersedenceViolations Count="0"/><SupersedesViolations Count="0"/><DependancyViolations Count="0"/><RequirementViolations Count="0"/><ConflictViolations Count="0"/><CompliantRules Count="1">NonSupersedenceNonSupersedence<ModelViolations Count="0" SuppressedCount="0" MaxSeverity="None"/><DiscoveryViolations SuppressedCount="0" MaxSeverity="None" Count="0"/><ReferencedConfigurationItems MaxOverallSeverity="None" TotalConflicts="0" TotalConstraintViolations="0" TotalDiscoveryViolations="0" TotalModelViolations="0" TotalEnforcements="0" TotalSuppressionCount="0"/>”;
ErrorCode = 1;
EstimatedInstallTime = 0;
EvaluationState = 4;
FullName = “O365 - Labs”;
Id = “ScopeId_9796B5EC-FF7D-423E-98B6-24B064878E12/DeploymentType_3bd66499-e2c1-4d10-b2fc-f14a5c612b20”;
InstallState = “NotInstalled”;
LastEvalTime = “20220715082427.000000+000”;
MaxExecuteTime = 120;
Name = “O365 - Labs”;
PercentComplete = 0;
PostInstallAction = “BasedOnExitCode”;
RequiresUserInteraction = FALSE;
ResolvedState = “Installed”;
RetriesRemaining = 10;
Revision = “8”;
SupersessionState = “None”;
Type = 1;
}};
ApplicabilityState = “Applicable”;
Categories = {};
ConfigureState = “NotNeeded”;
Deadline = “20220328070600.000000+000”;
DeploymentReport = “<ConfigurationItemReport AuthoringScope="ScopeId_9796B5EC-FF7D-423E-98B6-24B064878E12" LogicalName="Application_8ed965f1-6d11-4f70-b624-493b2e0117ea" Version="9" Type="AppModel" ComputerName="D24-203-06" CIComplianceState="NotInstalled" CIDesiredState="Installed" CIApplicablityState="Applicable" CISeverity="None" CIConfigureState="NotNeeded" TotalConstraintViolations="0" TotalDiscoveryViolations="0" TotalModelViolations="0" TotalSuppressionCount="0" TotalEnforcements="0" TotalConflicts="0" MaxOverallSeverity="None" SupersessionState="None">Office 365 - Labs<RequirementViolations Count="0"/><ConflictViolations Count="0"/><CompliantRules Count="0"/><ModelViolations Count="0" SuppressedCount="0" MaxSeverity="None"/><DiscoveryViolations Count="0" SuppressedCount="0" MaxSeverity="None"/><ReferencedConfigurationItems MaxOverallSeverity="None" TotalConflicts="0" TotalConstraintViolations="0" TotalDiscoveryViolations="0" TotalModelViolations="0" TotalEnforcements="0" TotalSuppressionCount="0"><ConfigurationItemReport AuthoringScope="ScopeId_9796B5EC-FF7D-423E-98B6-24B064878E12" LogicalName="DeploymentType_3bd66499-e2c1-4d10-b2fc-f14a5c612b20" Version="8" Type="Deployment Type" ComputerName="D24-203-06" CIComplianceState="NotInstalled" CIDesiredState="Installed" CIApplicablityState="Applicable" CISeverity="None" CIConfigureState="NotNeeded" TotalConstraintViolations="0" TotalModelViolations="0" TotalSuppressionCount="0" TotalEnforcements="0" MaxOverallSeverity="None" TotalConflicts="0" TotalDependancyViolations="0" TotalSupersedesViolations="0" TotalNonSupersedenceViolations="0" TotalCompliantCount="1" SupersessionState="None" TotalRequirementsCount="0" TotalDiscoveryViolations="0" Policy="Required">O365 - Labs<NonSupersedenceViolations Count="0"/><SupersedesViolations Count="0"/><DependancyViolations Count="0"/><RequirementViolations Count="0"/><ConflictViolations Count="0"/><CompliantRules Count="1">NonSupersedenceNonSupersedence<ModelViolations Count="0" SuppressedCount="0" MaxSeverity="None"/><DiscoveryViolations SuppressedCount="0" MaxSeverity="None" Count="0"/><ReferencedConfigurationItems MaxOverallSeverity="None" TotalConflicts="0" TotalConstraintViolations="0" TotalDiscoveryViolations="0" TotalModelViolations="0" TotalEnforcements="0" TotalSuppressionCount="0"/><ReferencingConfigurationItem AuthoringScope="ScopeId_9796B5EC-FF7D-423E-98B6-24B064878E12" LogicalName="RequiredApplication_8ed965f1-6d11-4f70-b624-493b2e0117ea" Version="9"/>”;
EnforcePreference = 2;

I would change your -Parameters to not include the full path to your Labs.xml file. It that path includes a space, Setup.exe will not find it.

I would do something like this:
Execute-Process -Path "setup.exe" -Parameters "/configure Labs.xml"
Setup.exe will find Labs.xml since it’s in the same folder as Setup.exe.

Also, the Office Setup.exe does create a log file at: %temp%\%ComputerName%-YYYYMMdd*.log"
It will tell you what is this bogus error 1 is.

What is the installation command in SCCM? Do you use Deploy-Application.exe?
If you use PowerShell and Deploy-Application.ps1, you should add the Execution-policy argument.