Microsoft Edge Deployment – Error 0x1 (1)

A partir de la versión 1910 de Configuration Manager, podemos realizar un deployment de Microsoft Edge (Chromium) desde la consola de MEMCM (SCCM). Este deployment creará una application de Microsoft Edge automática que puede dar error 0x1 (1) a la hora de instalarse.
Microsoft Edge Deployment Error 0x1 (1):
Error en Consola MEMCM (SCCM) > «Monitoring»:

Si observamos el log AppEnforce.log, podemos ver el error 0x1 (1) en los clientes:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <![LOG[+++ Starting Install enforcement for App DT "Edge X64 Default Deployment Type" ApplicationDeliveryType - ScopeId_3117A85B-3B6E-4E7F-8B19-22EEF62B9D80/DeploymentType_5ac6bca8-7724-41a4-b7ee-1cd3a48e0ff2, Revision - 1, ContentPath - C:\WINDOWS\ccmcache\61, Execution Context - System]LOG]!><time="09:20:51.155-120" date="04-30-2020" component="AppEnforce" context="" type="1" thread="7624" file="appprovider.cpp:2094"> <![LOG[ Performing detection of app deployment type Edge X64 Default Deployment Type(ScopeId_3117A85B-3B6E-4E7F-8B19-22EEF62B9D80/DeploymentType_5ac6bca8-7724-41a4-b7ee-1cd3a48e0ff2, revision 1) for system.]LOG]!><time="09:20:51.155-120" date="04-30-2020" component="AppEnforce" context="" type="1" thread="7624" file="appprovider.cpp:2516"> <![LOG[+++ Application not discovered. [AppDT Id: ScopeId_3117A85B-3B6E-4E7F-8B19-22EEF62B9D80/DeploymentType_5ac6bca8-7724-41a4-b7ee-1cd3a48e0ff2, Revision: 1]]LOG]!><time="09:20:51.170-120" date="04-30-2020" component="AppEnforce" context="" type="1" thread="7624" file="localapphandler.cpp:291"> <![LOG[ App enforcement environment: Context: Machine Command line: powershell -File ".\Install-Edge.ps1" -MSIName "MicrosoftEdgeEnterpriseX64.msi" -ChannelID "{56eb18f8-b008-4cbd-b6d2-8c97fe7e9062}" Allow user interaction: No UI mode: 1 User token: null Session Id: 4294967295 Content path: C:\WINDOWS\ccmcache\61 Working directory: ]LOG]!><time="09:20:51.170-120" date="04-30-2020" component="AppEnforce" context="" type="1" thread="7624" file="appcontext.cpp:85"> <![LOG[ Prepared working directory: C:\WINDOWS\ccmcache\61]LOG]!><time="09:20:51.186-120" date="04-30-2020" component="AppEnforce" context="" type="1" thread="7624" file="appcontext.cpp:189"> <![LOG[Found executable file powershell with complete path C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe]LOG]!><time="09:20:51.202-120" date="04-30-2020" component="AppEnforce" context="" type="1" thread="7624" file="executility.cpp:188"> <![LOG[ Prepared command line: "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" -File ".\Install-Edge.ps1" -MSIName "MicrosoftEdgeEnterpriseX64.msi" -ChannelID "{56eb18f8-b008-4cbd-b6d2-8c97fe7e9062}"]LOG]!><time="09:20:51.202-120" date="04-30-2020" component="AppEnforce" context="" type="1" thread="7624" file="appcontext.cpp:338"> <![LOG[ Executing Command line: "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" -File ".\Install-Edge.ps1" -MSIName "MicrosoftEdgeEnterpriseX64.msi" -ChannelID "{56eb18f8-b008-4cbd-b6d2-8c97fe7e9062}" with system context]LOG]!><time="09:20:51.202-120" date="04-30-2020" component="AppEnforce" context="" type="1" thread="7624" file="appexcnlib.cpp:203"> <![LOG[ Working directory C:\WINDOWS\ccmcache\61]LOG]!><time="09:20:51.202-120" date="04-30-2020" component="AppEnforce" context="" type="1" thread="7624" file="appexcnlib.cpp:217"> <![LOG[ Post install behavior is BasedOnExitCode]LOG]!><time="09:20:51.217-120" date="04-30-2020" component="AppEnforce" context="" type="1" thread="7624" file="appcommon.cpp:1054"> <![LOG[ Waiting for process 13684 to finish. Timeout = 30 minutes.]LOG]!><time="09:20:51.217-120" date="04-30-2020" component="AppEnforce" context="" type="1" thread="7624" file="appexcnlib.cpp:2014"> <![LOG[ Process 13684 terminated with exitcode: 1]LOG]!><time="09:20:51.561-120" date="04-30-2020" component="AppEnforce" context="" type="1" thread="7624" file="appexcnlib.cpp:2023"> <![LOG[ Looking for exit code 1 in exit codes table...]LOG]!><time="09:20:51.561-120" date="04-30-2020" component="AppEnforce" context="" type="1" thread="7624" file="appexcnlib.cpp:510"> <![LOG[ Unmatched exit code (1) is considered an execution failure.]LOG]!><time="09:20:51.561-120" date="04-30-2020" component="AppEnforce" context="" type="2" thread="7624" file="appexcnlib.cpp:596"> <![LOG[++++++ App enforcement completed (0 seconds) for App DT "Edge X64 Default Deployment Type" [ScopeId_3117A85B-3B6E-4E7F-8B19-22EEF62B9D80/DeploymentType_5ac6bca8-7724-41a4-b7ee-1cd3a48e0ff2], Revision: 1, User SID: ] ++++++]LOG]!><time="09:20:51.561-120" date="04-30-2020" component="AppEnforce" context="" type="1" thread="7624" file="appprovider.cpp:2820"> |
Solución al Error 0x1 (1):
Para solucionar este error, debemos ir a «Software Library» > «Applications» y buscar la application de Microsoft Edge que está produciendo el error 0x1 (1). Y aquí ir a la pestaña de «Deployment Types»:

Abrimos ambos Deployment Type y modificamos la línea de «Installation program»:

Añadimos «-ExecutionPolicy Bypass» entre «powershell» y «-File». De la siguiente forma:

Con «-ExecutionPolicy Bypass» omitimos la política de ejecución de scripts Powershell en los clientes y se ejecuta el script de Microsoft Edge correctamente.
A medida que los clientes contacten con MEMCM, la instalación se volverá a intentar con la nueva línea de comando y la instalación reportará como correcta:
