Solución de problemas de DSCTroubleshooting DSC

Se aplica a: Windows PowerShell 4.0, Windows PowerShell 5.0Applies To: Windows PowerShell 4.0, Windows PowerShell 5.0

En este artículo se proporcionan instrucciones para la solución de errores comunes.This article provides troubleshooting instruction for common errors.

Dependencia de WinRMWinRM Dependency

La configuración de estado deseado (DSC) de Windows PowerShell depende de WinRM.Windows PowerShell Desired State Configuration (DSC) depends on WinRM. WinRM no está habilitado de forma predeterminada en Windows Server 2008 R2 y Windows 7.WinRM is not enabled by default on Windows Server 2008 R2 and Windows 7. Para habilitar WinRM, ejecute Set-WSManQuickConfig en una sesión de Windows PowerShell con permisos elevados.Run Set-WSManQuickConfig, in a Windows PowerShell elevated session, to enable WinRM.

Uso de Get-DscConfigurationStatusUsing Get-DscConfigurationStatus

El cmdlet Get-DscConfigurationStatus obtiene información acerca del estado de la configuración de un nodo de destino.The Get-DscConfigurationStatus cmdlet gets information about configuration status from a target node. Se devuelve un objeto enriquecido que incluye información detallada sobre si la configuración de ejecución era correcta o no.A rich object is returned that includes high-level information about whether or not the configuration run was successful or not. Ya puede adentrarse en el objeto para descubrir los detalles sobre la configuración de ejecución como:You can dig into the object to discover details about the configuration run such as:

  • Todos los recursos con errores.All of the resources that failed
  • Cualquier recurso que solicitó un reinicio.Any resource that requested a reboot
  • Las opciones de metaconfiguración en tiempo de ejecución de la configuración.Meta-Configuration settings at time of configuration run
  • Etc.Etc.

El siguiente conjunto de parámetros devuelve la información de estado de la última ejecución de la configuración:The following parameter set returns the status information for the last configuration run:

Get-DscConfigurationStatus [-CimSession <CimSession[]>]
                           [-ThrottleLimit <int>]
                           [-AsJob]
                           [<CommonParameters>]

El siguiente conjunto de parámetros devuelve la información de estado de todas las ejecuciones anteriores de la configuración:The following parameter set returns the status information for all previous configuration runs:

Get-DscConfigurationStatus -All
                           [-CimSession <CimSession[]>]
                           [-ThrottleLimit <int>]
                           [-AsJob]
                           [<CommonParameters>]

EjemploExample

PS C:\> $Status = Get-DscConfigurationStatus

PS C:\> $Status

Status         StartDate                Type            Mode    RebootRequested        NumberOfResources
------        ---------                ----            ----    ---------------        -----------------
Failure        11/24/2015  3:44:56     Consistency        Push    True                36

PS C:\> $Status.ResourcesNotInDesiredState

ConfigurationName     :    MyService
DependsOn             :
ModuleName            :    PSDesiredStateConfiguration
ModuleVersion         :    1.1
PsDscRunAsCredential  :
ResourceID            :    [File]ServiceDll
SourceInfo            :    c:\git\CustomerService\Configs\MyCustomService.ps1::5::34::File
DurationInSeconds     :    0.19
Error                 :    SourcePath must be accessible for current configuration. The related file/directory is:
                           \\Server93\Shared\contosoApp.dll. The related ResourceID is [File]ServiceDll
FinalState            :
InDesiredState        :    False
InitialState          :
InstanceName          :    ServiceDll
RebootRequested       :    False
ResourceName          :    File
StartDate             :    11/24/2015  3:44:56
PSComputerName        :

El script no se ejecuta: uso de registros de DSC para diagnosticar errores de scriptsMy script won't run: Using DSC logs to diagnose script errors

Como sucede con todo el software de Windows, DSC registra los errores y eventos en registros que se pueden ver en el Visor de eventos.Like all Windows software, DSC records errors and events in logs that can be viewed from the Event Viewer. Examinar estos registros puede ayudarle a entender el motivo del error de una operación determinada y cómo evitar los errores en el futuro.Examining these logs can help you understand why a particular operation failed, and how to prevent failure in the future. La escritura de scripts de configuración puede ser complicada, por lo que para que sea más fácil realizar un seguimiento de los errores a medida que se crea, utilice el recurso de registro de DSC para hacer un seguimiento del progreso de la configuración en el registro de eventos DSC Analytic.Writing configuration scripts can be tricky, so to make tracking errors easier as you author, use the DSC Log resource to track the progress of your configuration in the DSC Analytic event log.

¿Dónde se encuentran los registros de eventos de DSC?Where are DSC event logs?

En el Visor de eventos, los eventos de DSC se encuentran en: Registros de aplicaciones y servicios/Microsoft/Windows/Desired State ConfigurationIn Event Viewer, DSC events are in: Applications and Services Logs/Microsoft/Windows/Desired State Configuration

El cmdlet de PowerShell correspondiente, Get-WinEvent, también se puede ejecutar para ver los registros de eventos:The corresponding PowerShell cmdlet, Get-WinEvent, can also be run to view the event logs:

PS C:\> Get-WinEvent -LogName "Microsoft-Windows-Dsc/Operational"

   ProviderName: Microsoft-Windows-DSC

TimeCreated                     Id LevelDisplayName Message
-----------                     -- ---------------- -------
11/17/2014 10:27:23 PM        4102 Information      Job {02C38626-D95A-47F1-9DA2-C1D44A7128E7} :

Como se muestra arriba, el nombre del registro primario de DSC es Microsoft->Windows->DSC (no se muestran otros nombres de registros de Windows por razones de brevedad).As shown above, DSC's primary log name is Microsoft->Windows->DSC (other log names under Windows are not shown here for brevity). El nombre principal se anexa al nombre del canal para crear el nombre del registro completo.The primary name is appended to the channel name to create the complete log name. El motor de DSC escribe principalmente en tres tipos de registros: registros operativos, analíticos y de depuración.The DSC engine writes mainly into three types of logs: Operational, Analytic, and Debug logs. Como los registros analíticos y de depuración están desactivados de forma predeterminada, debe habilitarlos en el Visor de eventos.Since the analytic and debug logs are turned off by default, you should enable them in Event Viewer. Para ello, abra el Visor de eventos escribiendo Show-EventLog en Windows PowerShell, o bien, haga clic en el botón Inicio , Panel de Control , Herramientas administrativas y luego haga clic en Visor de eventos.To do this, open Event Viewer by typing Show-EventLog in Windows PowerShell; or, click the Start button, click Control Panel , click Administrative Tools , and then click Event Viewer. En el menú Vista del Visor de eventos, haga clic en Mostrar registros analíticos y de depuración.On the View menu in Event viewer, click Show Analytic and Debug Logs. El nombre del registro del canal analítico Microsoft-Windows-Dsc/Analytic y el del canal de depuración Microsoft-Windows-Dsc/Debug.The log name for the analytic channel is Microsoft-Windows-Dsc/Analytic , and the debug channel is Microsoft-Windows-Dsc/Debug. También puede usar la utilidad wevtutil para habilitar los registros, como se muestra en el ejemplo siguiente.You could also use the wevtutil utility to enable the logs, as shown in the following example.

wevtutil.exe set-log "Microsoft-Windows-Dsc/Analytic" /q:true /e:true

¿Qué contienen los registros de DSC?What do DSC logs contain?

Los registros de DSC se dividen en los tres canales de registro según la importancia del mensaje.DSC logs are split over the three log channels based on the importance of the message. El registro operativo de DSC contiene todos los mensajes de error y puede utilizarse para identificar un problema.The operational log in DSC contains all error messages, and can be used to identify a problem. El registro analítico tiene un mayor volumen de eventos y puede identificar dónde se han producido errores.The analytic log has a higher volume of events, and can identify where error(s) occurred. Este canal también contiene los mensajes detallados (si existen).This channel also contains verbose messages (if any). El registro de depuración contiene registros que pueden ayudarle a entender cómo se produjeron los errores.The debug log contains logs that can help you understand how the errors occurred. Los mensajes de los eventos de DSC se estructuran de forma que cada mensaje de evento comienza por un identificador de trabajo que representa de forma única una operación de DSC.DSC event messages are structured such that every event message begins with a job ID that uniquely represents a DSC operation. En el ejemplo siguiente intenta obtener el mensaje desde el primer evento registrado en el registro operativo de DSC.The example below attempts to obtain the message from the first event logged into the operational DSC log.

PS C:\> $AllDscOpEvents = Get-WinEvent -LogName "Microsoft-Windows-Dsc/Operational"
PS C:\> $FirstOperationalEvent = $AllDscOpEvents[0]
PS C:\> $FirstOperationalEvent.Message
Job {02C38626-D95A-47F1-9DA2-C1D44A7128E7} :
Consistency engine was run successfully.

Los eventos de DSC se registran en una estructura determinada que permite al usuario agrupar los eventos de un trabajo de DSC.DSC events are logged in a particular structure that enables the user to aggregate events from one DSC job. La estructura es como sigue:The structure is as follows:

Job ID : <Guid>
<Event Message>

Recopilación de eventos de una operación de DSC únicaGathering events from a single DSC operation

Los registros de eventos de DSC contienen los eventos que han generado diferentes operaciones de DSC.DSC event logs contain events generated by various DSC operations. Sin embargo, normalmente solo le interesarán los detalles sobre una operación determinada.However, you'll usually be concerned with the detail about just one particular operation. Todos los registros de DSC se pueden agrupar según la propiedad de identificador de trabajo, que es única para cada operación de DSC.All DSC logs can be grouped by the job ID property that is unique for every DSC operation. El identificador de trabajo se muestra como el primer valor de propiedad de todos los eventos de DSC.The job ID is displayed as the first property value in all DSC events. En los siguientes pasos se explica cómo acumular todos los eventos en una estructura de matriz agrupada.The following steps explain how to accumulate all events in a grouped array structure.

<##########################################################################
 Step 1 : Enable analytic and debug DSC channels (Operational channel is enabled by default)
###########################################################################>

wevtutil.exe set-log "Microsoft-Windows-Dsc/Analytic" /q:true /e:true
wevtutil.exe set-log "Microsoft-Windows-Dsc/Debug" /q:True /e:true

<##########################################################################
 Step 2 : Perform the required DSC operation (Below is an example, you could run any DSC operation instead)
###########################################################################>

Get-DscLocalConfigurationManager

<##########################################################################
Step 3 : Collect all DSC Logs, from the Analytic, Debug and Operational channels
###########################################################################>

$DscEvents=[System.Array](Get-WinEvent "Microsoft-Windows-Dsc/Operational") `
         + [System.Array](Get-WinEvent "Microsoft-Windows-Dsc/Analytic" -Oldest) `
         + [System.Array](Get-WinEvent "Microsoft-Windows-Dsc/Debug" -Oldest)


<##########################################################################
 Step 4 : Group all logs based on the job ID
###########################################################################>
$SeparateDscOperations = $DscEvents | Group {$_.Properties[0].value}

Aquí, la variable $SeparateDscOperations contiene registros agrupados por los identificadores de trabajo.Here, the variable $SeparateDscOperations contains logs grouped by the job IDs. Cada elemento de la matriz de esta variable representa un grupo de eventos que ha registrado otra operación de DSC, lo que permite el acceso a más información sobre los registros.Each array element of this variable represents a group of events logged by a different DSC operation, allowing access to more information about the logs.

PS C:\> $SeparateDscOperations

Count Name                      Group
----- ----                      -----
   48 {1A776B6A-5BAC-11E3-BF... {System.Diagnostics.Eventing.Reader.EventLogRecord, System.Diagnostics....
   40 {E557E999-5BA8-11E3-BF... {System.Diagnostics.Eventing.Reader.EventLogRecord, System.Diagnostics....

PS C:\> $SeparateDscOperations[0].Group

   ProviderName: Microsoft-Windows-DSC

TimeCreated                     Id LevelDisplayName Message
-----------                     -- ---------------- -------
12/2/2013 3:47:29 PM          4115 Information      Job {1A776B6A-5BAC-11E3-BF41-00155D553612} : ...
12/2/2013 3:47:29 PM          4198 Information      Job {1A776B6A-5BAC-11E3-BF41-00155D553612} : ...
12/2/2013 3:47:29 PM          4114 Information      Job {1A776B6A-5BAC-11E3-BF41-00155D553612} : ...
12/2/2013 3:47:29 PM          4102 Information      Job {1A776B6A-5BAC-11E3-BF41-00155D553612} : ...
12/2/2013 3:47:29 PM          4098 Warning          Job {1A776B6A-5BAC-11E3-BF41-00155D553612} : ...
12/2/2013 3:47:29 PM          4098 Warning          Job {1A776B6A-5BAC-11E3-BF41-00155D553612} : ...
12/2/2013 3:47:29 PM          4176 Information      Job {1A776B6A-5BAC-11E3-BF41-00155D553612} : ...
12/2/2013 3:47:29 PM          4182 Information      Job {1A776B6A-5BAC-11E3-BF41-00155D553612} : ...
12/2/2013 3:47:29 PM          4182 Information      Job {1A776B6A-5BAC-11E3-BF41-00155D553612} : ...
12/2/2013 3:47:29 PM          4182 Information      Job {1A776B6A-5BAC-11E3-BF41-00155D553612} : ...
12/2/2013 3:47:29 PM          4182 Information      Job {1A776B6A-5BAC-11E3-BF41-00155D553612} : ...
12/2/2013 3:47:29 PM          4182 Information      Job {1A776B6A-5BAC-11E3-BF41-00155D553612} : ...
12/2/2013 3:47:29 PM          4182 Information      Job {1A776B6A-5BAC-11E3-BF41-00155D553612} : ...
12/2/2013 3:47:29 PM          4182 Information      Job {1A776B6A-5BAC-11E3-BF41-00155D553612} : ...
12/2/2013 3:47:29 PM          4182 Information      Job {1A776B6A-5BAC-11E3-BF41-00155D553612} : ...

Puede extraer los datos en la variable $SeparateDscOperations con Where-Object.You can extract the data in the variable $SeparateDscOperations using Where-Object. A continuación se muestran cinco escenarios en los que podría querer extraer los datos para la solucionar problemas de DSC:Following are five scenarios in which you might want to extract data for troubleshooting DSC:

1: errores de operaciones1: Operations failures

Todos los eventos tienen niveles de gravedad.All events have severity levels. Esta información puede usarse para identificar los eventos de error:This information can be used to identify the error events:

PS C:\> $SeparateDscOperations | Where-Object {$_.Group.LevelDisplayName -contains "Error"}

Count Name                      Group
----- ----                      -----
   38 {5BCA8BE7-5BB6-11E3-BF... {System.Diagnostics.Eventing.Reader.EventLogRecord, System.Diagnostics....

2: detalles de las operaciones ejecutadas en última media hora2: Details of operations run in the last half hour

TimeCreated, una propiedad de todos los eventos de Windows, indica la hora en que se creó el evento.TimeCreated, a property of every Windows event, states the time the event was created. Se puede hacer una comparación de esta propiedad con un objeto de fecha y hora determinado para filtrar todos los eventos:Comparing this property with a particular date/time object can be used to filter all events:

PS C:\> $DateLatest = (Get-Date).AddMinutes(-30)
PS C:\> $SeparateDscOperations | Where-Object {$_.Group.TimeCreated -gt $DateLatest}

Count Name                      Group
----- ----                      -----
    1 {6CEC5B09-5BB0-11E3-BF... {System.Diagnostics.Eventing.Reader.EventLogRecord}

3: mensajes de la operación más reciente3: Messages from the latest operation

La operación más reciente se almacena en el primer índice del grupo de matrices $SeparateDscOperations.The latest operation is stored in the first index of the array group $SeparateDscOperations. Si se consultan los mensajes del grupo del índice 0, se devuelven todos los mensajes para la operación más reciente:Querying the group's messages for index 0 returns all messages for the latest operation:

PS C:\> $SeparateDscOperations[0].Group.Message
Job {5BCA8BE7-5BB6-11E3-BF41-00155D553612} :
Running consistency engine.
Job {1A776B6A-5BAC-11E3-BF41-00155D553612} :
Configuration is sent from computer NULL by user sid S-1-5-18.
Job {1A776B6A-5BAC-11E3-BF41-00155D553612} :
Displaying messages from built-in DSC resources:
 WMI channel 1
 ResourceID:
 Message : [INCH-VM]:                            [] Starting consistency engine.
Job {1A776B6A-5BAC-11E3-BF41-00155D553612} :
Displaying messages from built-in DSC resources:
 WMI channel 1
 ResourceID:
 Message : [INCH-VM]:                            [] Consistency check completed.

4: mensajes de error registrados para operaciones con errores recientes4: Error messages logged for recent failed operations

$SeparateDscOperations[0].Group contiene un conjunto de eventos para la operación más reciente.$SeparateDscOperations[0].Group contains a set of events for the latest operation. Ejecute el cmdlet Where-Object para filtrar los eventos según su nombre para mostrar del nivel.Run the Where-Object cmdlet to filter the events based on their level display name. Los resultados se almacenan en la variable $myFailedEvent, que se puede analizar en más profundidad para obtener el mensaje de evento:Results are stored in the $myFailedEvent variable, which can be further dissected to get the event message:

PS C:\> $myFailedEvent = ($SeparateDscOperations[0].Group | Where-Object {$_.LevelDisplayName -eq "Error"})

PS C:\> $myFailedEvent.Message

Job {5BCA8BE7-5BB6-11E3-BF41-00155D553612} :
DSC Engine Error :
 Error Message Current configuration does not exist. Execute Start-DscConfiguration command with
 -Path parameter to specify a configuration file and create a current configuration first.
Error Code : 1

5: todos los eventos que ha generado un identificador de trabajo determinado5: All events generated for a particular job ID.

$SeparateDscOperations es una matriz de grupos, cada uno de los cuales tiene como nombre el identificador de trabajo único.$SeparateDscOperations is an array of groups, each of which has the name as the unique job ID. Al ejecutar el cmdlet Where-Object, puede extraer esos grupos de eventos que tienen un identificador de trabajo determinado:By running the Where-Object cmdlet, you can extract those groups of events that have a particular job ID:

PS C:\> ($SeparateDscOperations | Where-Object {$_.Name -eq $jobX} ).Group

   ProviderName: Microsoft-Windows-DSC

TimeCreated                     Id LevelDisplayName Message
-----------                     -- ---------------- -------
12/2/2013 4:33:24 PM          4102 Information      Job {847A5619-5BB2-11E3-BF41-00155D553612} : ...
12/2/2013 4:33:24 PM          4168 Information      Job {847A5619-5BB2-11E3-BF41-00155D553612} : ...
12/2/2013 4:33:24 PM          4146 Information      Job {847A5619-5BB2-11E3-BF41-00155D553612} : ...
12/2/2013 4:33:24 PM          4120 Information      Job {847A5619-5BB2-11E3-BF41-00155D553612} : ...

Uso de xDscDiagnostics para analizar registros de DSCUsing xDscDiagnostics to analyze DSC logs

xDscDiagnostics es un módulo de PowerShell que consta de varias funciones que pueden ayudar a analizar los errores de DSC en la máquina.xDscDiagnostics is a PowerShell module that consists of several functions that can help analyze DSC failures on your machine. Estas funciones pueden ayudar a identificar todos los eventos locales de las operaciones de DSC anteriores o los eventos de DSC de los equipos remotos (con credenciales válidas).These functions can help you identify all local events from past DSC operations, or DSC events on remote computers (with valid credentials). Aquí, el término operación de DSC se utiliza para definir una única ejecución de DSC desde el inicio hasta el final.Here, the term DSC operation is used to define a single unique DSC execution from its start to its end. Por ejemplo, Test-DscConfiguration sería una operación de DSC independiente.For example, Test-DscConfiguration would be a separate DSC operation. De forma similar, todos los demás cmdlets de DSC (como Get-DscConfiguration, Start-DscConfiguration, etc.) podrían identificarse uno a uno como operaciones de DSC independientes.Similarly, every other cmdlet in DSC (such as Get-DscConfiguration, Start-DscConfiguration, etc.) could each be identified as separate DSC operations. Las funciones se explican en xDscDiagnostics.The functions are explained at xDscDiagnostics. Puede obtener ayuda si ejecuta Get-Help <cmdlet name>.Help is available by running Get-Help <cmdlet name>.

Obtención de detalles de las operaciones de DSCGetting details of DSC operations

La función Get-xDscOperation permite buscar los resultados de las operaciones de DSC que se ejecutan en uno o varios equipos, y devuelve un objeto que contiene la colección de eventos que ha producido cada operación de DSC.The Get-xDscOperation function lets you find the results of the DSC operations that run on one or multiple computers, and returns an object that contains the collection of events produced by each DSC operation. Por ejemplo, en la salida siguiente, se ejecutaron tres comandos.For example, in the following output, three commands were run. El primero se realizó correctamente y los otros dos no.The first one passed, and the other two failed. Estos resultados se resumen en la salida de Get-xDscOperation.These results are summarized in the output of Get-xDscOperation.

PS C:\DiagnosticsTest> Get-xDscOperation

ComputerName   SequenceId TimeCreated           Result   JobID                                 AllEvents
------------   ---------- -----------           ------   -----                                 ---------
SRV1   1          6/23/2016 9:37:52 AM  Failure  9701aadf-395e-11e6-9165-00155d390509  {@{Message=; TimeC...
SRV1   2          6/23/2016 9:36:54 AM  Failure  7e8e2d6e-395c-11e6-9165-00155d390509  {@{Message=; TimeC...
SRV1   3          6/23/2016 9:36:54 AM  Success  af72c6aa-3960-11e6-9165-00155d390509  {@{Message=Operati...

También puede especificar que solo desea los resultados de las últimas operaciones, para lo que debe usar el parámetro Newest:You can also specify that you want only results for the most recent operations by using the Newest parameter:

PS C:\DiagnosticsTest> Get-xDscOperation -Newest 5
ComputerName   SequenceId TimeCreated           Result   JobID                                 AllEvents
------------   ---------- -----------           ------   -----                                 ---------
SRV1   1          6/23/2016 4:36:54 PM  Success                                        {@{Message=; TimeC...
SRV1   2          6/23/2016 4:36:54 PM  Success  5c06402b-399b-11e6-9165-00155d390509  {@{Message=Operati...
SRV1   3          6/23/2016 4:36:54 PM  Success                                        {@{Message=; TimeC...
SRV1   4          6/23/2016 4:36:54 PM  Success  5c06402a-399b-11e6-9165-00155d390509  {@{Message=Operati...
SRV1   5          6/23/2016 4:36:51 PM  Success                                        {@{Message=; TimeC...

Obtención de detalles de los eventos de DSCGetting details of DSC events

El cmdlet Trace-xDscOperation devuelve un objeto que contiene una colección de eventos, sus tipos de eventos y la salida del mensaje generado a partir de una determinada operación de DSC.The Trace-xDscOperation cmdlet returns an object containing a collection of events, their event types, and the message output generated from a particular DSC operation. Normalmente, cuando encuentre un error en cualquiera de las operaciones con Get-xDscOperation, realizará un seguimiento de esa operación para averiguar qué evento provocó el error.Typically, when you find a failure in any of the operations using Get-xDscOperation, you would trace that operation to find out which of the events caused a failure.

Utilice el parámetro SequenceID para obtener los eventos de una operación específica de un equipo concreto.Use the SequenceID parameter to get the events for a specific operation for a specific computer. Por ejemplo, si en SequenceID especifica 9, Trace-xDscOperaion obtiene el seguimiento de la operación de DSC que era la novena desde la última operación:For example, if you specify a SequenceID of 9, Trace-xDscOperaion get the trace for the DSC operation that was 9th from the last operation:

PS C:\DiagnosticsTest> Trace-xDscOperation -SequenceID 9

ComputerName   EventType    TimeCreated           Message
------------   ---------    -----------           -------
SRV1   OPERATIONAL  6/24/2016 10:51:52 AM Operation Consistency Check or Pull started by user sid S-1-5-20 from computer NULL.
SRV1   OPERATIONAL  6/24/2016 10:51:52 AM Running consistency engine.
SRV1   OPERATIONAL  6/24/2016 10:51:52 AM The local configuration manager is updating the PSModulePath to WindowsPowerShell\Modules;C:\Prog...
SRV1   OPERATIONAL  6/24/2016 10:51:53 AM  Resource execution sequence :: [WindowsFeature]DSCServiceFeature, [xDSCWebService]PSDSCPullServer.
SRV1   OPERATIONAL  6/24/2016 10:51:54 AM Consistency engine was run successfully.
SRV1   OPERATIONAL  6/24/2016 10:51:54 AM Job runs under the following LCM setting. ...
SRV1   OPERATIONAL  6/24/2016 10:51:54 AM Operation Consistency Check or Pull completed successfully.

Pase el GUID asignado a una operación de DSC concreta (el que ha devuelto el cmdlet Get-xDscOperation) para obtener los detalles de los eventos de dicha operación de DSC:Pass the GUID assigned to a specific DSC operation (as returned by the Get-xDscOperation cmdlet) to get the event details for that DSC operation:

PS C:\DiagnosticsTest> Trace-xDscOperation -JobID 9e0bfb6b-3a3a-11e6-9165-00155d390509

ComputerName   EventType    TimeCreated           Message
------------   ---------    -----------           -------
SRV1   OPERATIONAL  6/24/2016 11:36:56 AM Operation Consistency Check or Pull started by user sid S-1-5-20 from computer NULL.
SRV1   ANALYTIC     6/24/2016 11:36:56 AM Deleting file from C:\Windows\System32\Configuration\DSCEngineCache.mof
SRV1   OPERATIONAL  6/24/2016 11:36:56 AM Running consistency engine.
SRV1   VERBOSE      6/24/2016 11:36:56 AM [SRV1]:                            [] Starting consistency engine.
SRV1   ANALYTIC     6/24/2016 11:36:56 AM Applying configuration from C:\Windows\System32\Configuration\Current.mof.
SRV1   ANALYTIC     6/24/2016 11:36:56 AM Parsing the configuration to apply.
SRV1   OPERATIONAL  6/24/2016 11:36:56 AM  Resource execution sequence :: [WindowsFeature]DSCServiceFeature, [xDSCWebService]PSDSCPullServer.
SRV1   VERBOSE      6/24/2016 11:36:56 AM [SRV1]: LCM:  [ Start  Resource ]  [[WindowsFeature]DSCServiceFeature]
SRV1   ANALYTIC     6/24/2016 11:36:56 AM Executing operations for PS DSC resource MSFT_RoleResource with resource name [WindowsFeature]DSC...
SRV1   VERBOSE      6/24/2016 11:36:56 AM [SRV1]: LCM:  [ Start  Test     ]  [[WindowsFeature]DSCServiceFeature]
SRV1   VERBOSE      6/24/2016 11:36:56 AM [SRV1]:                            [[WindowsFeature]DSCServiceFeature] The operation 'Get...
SRV1   VERBOSE      6/24/2016 11:36:56 AM [SRV1]:                            [[WindowsFeature]DSCServiceFeature] The operation 'Get...
SRV1   VERBOSE      6/24/2016 11:36:56 AM [SRV1]: LCM:  [ End    Test     ]  [[WindowsFeature]DSCServiceFeature] True in 0.3130 sec...
SRV1   VERBOSE      6/24/2016 11:36:56 AM [SRV1]: LCM:  [ End    Resource ]  [[WindowsFeature]DSCServiceFeature]
SRV1   VERBOSE      6/24/2016 11:36:56 AM [SRV1]: LCM:  [ Start  Resource ]  [[xDSCWebService]PSDSCPullServer]
SRV1   ANALYTIC     6/24/2016 11:36:56 AM Executing operations for PS DSC resource MSFT_xDSCWebService with resource name [xDSCWebService]P...
SRV1   VERBOSE      6/24/2016 11:36:56 AM [SRV1]: LCM:  [ Start  Test     ]  [[xDSCWebService]PSDSCPullServer]
SRV1   VERBOSE      6/24/2016 11:36:56 AM [SRV1]:                            [[xDSCWebService]PSDSCPullServer] Check Ensure
SRV1   VERBOSE      6/24/2016 11:36:56 AM [SRV1]:                            [[xDSCWebService]PSDSCPullServer] Check Port
SRV1   VERBOSE      6/24/2016 11:36:56 AM [SRV1]:                            [[xDSCWebService]PSDSCPullServer] Check Physical Path ...
SRV1   VERBOSE      6/24/2016 11:36:56 AM [SRV1]:                            [[xDSCWebService]PSDSCPullServer] Check State
SRV1   VERBOSE      6/24/2016 11:36:56 AM [SRV1]:                            [[xDSCWebService]PSDSCPullServer] Get Full Path for We...
SRV1   VERBOSE      6/24/2016 11:36:56 AM [SRV1]: LCM:  [ End    Test     ]  [[xDSCWebService]PSDSCPullServer] True in 0.0160 seconds.
SRV1   VERBOSE      6/24/2016 11:36:56 AM [SRV1]: LCM:  [ End    Resource ]  [[xDSCWebService]PSDSCPullServer]
SRV1   VERBOSE      6/24/2016 11:36:56 AM [SRV1]:                            [] Consistency check completed.
SRV1   ANALYTIC     6/24/2016 11:36:56 AM Deleting file from C:\Windows\System32\Configuration\DSCEngineCache.mof
SRV1   OPERATIONAL  6/24/2016 11:36:56 AM Consistency engine was run successfully.
SRV1   OPERATIONAL  6/24/2016 11:36:56 AM Job runs under the following LCM setting. ...
SRV1   OPERATIONAL  6/24/2016 11:36:56 AM Operation Consistency Check or Pull completed successfully.
SRV1   ANALYTIC     6/24/2016 11:36:56 AM Deleting file from C:\Windows\System32\Configuration\DSCEngineCache.mof

Tenga en cuenta que, como Trace-xDscOperation agrega eventos de los registros analítico, de depuración y operativo, se le pedirá que habilite estos registros como se describió anteriormente.Note that, since Trace-xDscOperation aggregates events from the Analytic, Debug, and Operational logs, it will prompt you to enable these logs as described above.

Como alternativa, puede recopilar información sobre los eventos si guarda el resultado de Trace-xDscOperation en una variable.Alternately, you can gather information on the events by saving the output of Trace-xDscOperation into a variable. Puede utilizar los comandos siguientes para mostrar todos los eventos de una operación de DSC concreta.You can use the following commands to display all the events for a particular DSC operation.

PS C:\DiagnosticsTest> $Trace = Trace-xDscOperation -SequenceID 4

PS C:\DiagnosticsTest> $Trace.Event

Esto mostrará los mismos resultados que el cmdlet Get-WinEvent, como se muestra en la salida siguiente:This will display the same results as the Get-WinEvent cmdlet, such as in the output below:

   ProviderName: Microsoft-Windows-DSC

TimeCreated                     Id LevelDisplayName Message
-----------                     -- ---------------- -------
6/23/2016 1:36:53 AM          4312 Information      The DscTimer is running LCM method PerformRequiredConfigurationChecks with the flag set to 5.
6/23/2016 1:36:53 AM          4343 Information      The DscTimer has successfully run LCM method PerformRequiredConfigurationChecks with flag 5.
6/23/2016 2:07:00 AM          4312 Information      The DscTimer is running LCM method PerformRequiredConfigurationChecks with the flag set to 5.
6/23/2016 2:07:01 AM          4343 Information      The DscTimer has successfully run LCM method PerformRequiredConfigurationChecks with flag 5.
6/23/2016 2:36:55 AM          4312 Information      The DscTimer is running LCM method PerformRequiredConfigurationChecks with the flag set to 5.
6/23/2016 2:36:56 AM          4343 Information      The DscTimer has successfully run LCM method PerformRequiredConfigurationChecks with flag 5.
6/23/2016 3:06:55 AM          4312 Information      The DscTimer is running LCM method PerformRequiredConfigurationChecks with the flag set to 5.
6/23/2016 3:06:55 AM          4343 Information      The DscTimer has successfully run LCM method PerformRequiredConfigurationChecks with flag 5.
6/23/2016 3:36:55 AM          4312 Information      The DscTimer is running LCM method PerformRequiredConfigurationChecks with the flag set to 5.
6/23/2016 3:36:55 AM          4343 Information      The DscTimer has successfully run LCM method PerformRequiredConfigurationChecks with flag 5.
6/23/2016 4:06:53 AM          4312 Information      The DscTimer is running LCM method PerformRequiredConfigurationChecks with the flag set to 5.
6/23/2016 4:06:53 AM          4343 Information      The DscTimer has successfully run LCM method PerformRequiredConfigurationChecks with flag 5.
6/23/2016 4:36:52 AM          4312 Information      The DscTimer is running LCM method PerformRequiredConfigurationChecks with the flag set to 5.
6/23/2016 4:36:53 AM          4343 Information      The DscTimer has successfully run LCM method PerformRequiredConfigurationChecks with flag 5.
6/23/2016 5:06:52 AM          4312 Information      The DscTimer is running LCM method PerformRequiredConfigurationChecks with the flag set to 5.
6/23/2016 5:06:53 AM          4343 Information      The DscTimer has successfully run LCM method PerformRequiredConfigurationChecks with flag 5.
6/23/2016 5:36:54 AM          4312 Information      The DscTimer is running LCM method PerformRequiredConfigurationChecks with the flag set to 5.
6/23/2016 5:36:54 AM          4343 Information      The DscTimer has successfully run LCM method PerformRequiredConfigurationChecks with flag 5.
6/23/2016 6:06:52 AM          4312 Information      The DscTimer is running LCM method PerformRequiredConfigurationChecks with the flag set to 5.
6/23/2016 6:06:53 AM          4343 Information      The DscTimer has successfully run LCM method PerformRequiredConfigurationChecks with flag 5.
6/23/2016 6:36:56 AM          4312 Information      The DscTimer is running LCM method PerformRequiredConfigurationChecks with the flag set to 5.
6/23/2016 6:36:57 AM          4343 Information      The DscTimer has successfully run LCM method PerformRequiredConfigurationChecks with flag 5.
6/23/2016 7:06:52 AM          4312 Information      The DscTimer is running LCM method PerformRequiredConfigurationChecks with the flag set to 5.
6/23/2016 7:06:53 AM          4343 Information      The DscTimer has successfully run LCM method PerformRequiredConfigurationChecks with flag 5.
6/23/2016 7:36:53 AM          4312 Information      The DscTimer is running LCM method PerformRequiredConfigurationChecks with the flag set to 5.
6/23/2016 7:36:54 AM          4343 Information      The DscTimer has successfully run LCM method PerformRequiredConfigurationChecks with flag 5.
6/23/2016 8:06:54 AM          4312 Information      The DscTimer is running LCM method PerformRequiredConfigurationChecks with the flag set to 5.

Idealmente, primero deberá utilizar Get-xDscOperation para enumerar las últimas configuraciones DSC que se han ejecutado en las máquinas.Ideally, you would first use Get-xDscOperation to list out the last few DSC configuration runs on your machines. A continuación, puede examinar cualquier operación única (mediante su valor de SequenceID o JobID) con Trace-xDscOperation para descubrir lo que hizo en segundo plano.Following this, you can examine any single operation (using its SequenceID or JobID) with Trace-xDscOperation to discover what it did behind the scenes.

Obtención de eventos de un equipo remotoGetting events for a remote computer

Utilice el parámetro ComputerName del cmdlet Trace-xDscOperation para obtener los detalles de los eventos de un equipo remoto.Use the ComputerName parameter of the Trace-xDscOperation cmdlet to get the event details on a remote computer. Para ello, antes es preciso crear una regla de firewall que permita la administración remota en el equipo remoto:Before you can do this, you have to create a firewall rule to allow remote administration on the remote computer:

New-NetFirewallRule -Name "Service RemoteAdmin" -DisplayName "Remote" -Action Allow

A partir de ahí se puede especificar dicho equipo en la llamada a Trace-xDscOperation:Now you can specify that computer in your call to Trace-xDscOperation:

PS C:\DiagnosticsTest> Trace-xDscOperation -ComputerName SRV2 -Credential Get-Credential -SequenceID 5

ComputerName   EventType    TimeCreated           Message
------------   ---------    -----------           -------
SRV2   OPERATIONAL  6/24/2016 11:36:56 AM Operation Consistency Check or Pull started by user sid S-1-5-20 f...
SRV2   ANALYTIC     6/24/2016 11:36:56 AM Deleting file from C:\Windows\System32\Configuration\DSCEngineCach...
SRV2   OPERATIONAL  6/24/2016 11:36:56 AM Running consistency engine.
SRV2   VERBOSE      6/24/2016 11:36:56 AM [SRV2]:                            [] Starting consistency...
SRV2   ANALYTIC     6/24/2016 11:36:56 AM Applying configuration from C:\Windows\System32\Configuration\Curr...
SRV2   ANALYTIC     6/24/2016 11:36:56 AM Parsing the configuration to apply.
SRV2   OPERATIONAL  6/24/2016 11:36:56 AM  Resource execution sequence :: [WindowsFeature]DSCServiceFeature,...
SRV2   VERBOSE      6/24/2016 11:36:56 AM [SRV2]: LCM:  [ Start  Resource ]  [[WindowsFeature]DSCSer...
SRV2   ANALYTIC     6/24/2016 11:36:56 AM Executing operations for PS DSC resource MSFT_RoleResource with re...
SRV2   VERBOSE      6/24/2016 11:36:56 AM [SRV2]: LCM:  [ Start  Test     ]  [[WindowsFeature]DSCSer...
SRV2   VERBOSE      6/24/2016 11:36:56 AM [SRV2]:                            [[WindowsFeature]DSCSer...
SRV2   VERBOSE      6/24/2016 11:36:56 AM [SRV2]:                            [[WindowsFeature]DSCSer...
SRV2   VERBOSE      6/24/2016 11:36:56 AM [SRV2]: LCM:  [ End    Test     ]  [[WindowsFeature]DSCSer...
SRV2   VERBOSE      6/24/2016 11:36:56 AM [SRV2]: LCM:  [ End    Resource ]  [[WindowsFeature]DSCSer...
SRV2   VERBOSE      6/24/2016 11:36:56 AM [SRV2]: LCM:  [ Start  Resource ]  [[xDSCWebService]PSDSCP...
SRV2   ANALYTIC     6/24/2016 11:36:56 AM Executing operations for PS DSC resource MSFT_xDSCWebService with ...
SRV2   VERBOSE      6/24/2016 11:36:56 AM [SRV2]: LCM:  [ Start  Test     ]  [[xDSCWebService]PSDSCP...
SRV2   VERBOSE      6/24/2016 11:36:56 AM [SRV2]:                            [[xDSCWebService]PSDSCP...
SRV2   VERBOSE      6/24/2016 11:36:56 AM [SRV2]:                            [[xDSCWebService]PSDSCP...
SRV2   VERBOSE      6/24/2016 11:36:56 AM [SRV2]:                            [[xDSCWebService]PSDSCP...
SRV2   VERBOSE      6/24/2016 11:36:56 AM [SRV2]:                            [[xDSCWebService]PSDSCP...
SRV2   VERBOSE      6/24/2016 11:36:56 AM [SRV2]:                            [[xDSCWebService]PSDSCP...
SRV2   VERBOSE      6/24/2016 11:36:56 AM [SRV2]: LCM:  [ End    Test     ]  [[xDSCWebService]PSDSCP...
SRV2   VERBOSE      6/24/2016 11:36:56 AM [SRV2]: LCM:  [ End    Resource ]  [[xDSCWebService]PSDSCP...
SRV2   VERBOSE      6/24/2016 11:36:56 AM [SRV2]:                            [] Consistency check co...
SRV2   ANALYTIC     6/24/2016 11:36:56 AM Deleting file from C:\Windows\System32\Configuration\DSCEngineCach...
SRV2   OPERATIONAL  6/24/2016 11:36:56 AM Consistency engine was run successfully.
SRV2   OPERATIONAL  6/24/2016 11:36:56 AM Job runs under the following LCM setting. ...
SRV2   OPERATIONAL  6/24/2016 11:36:56 AM Operation Consistency Check or Pull completed successfully.
SRV2   ANALYTIC     6/24/2016 11:36:56 AM Deleting file from C:\Windows\System32\Configuration\DSCEngineCach...

Los recursos no se actualizan: procedimiento para restablecer la memoria cachéMy resources won't update: How to reset the cache

El motor de DSC almacena en caché los recursos implementados como un módulo de PowerShell por motivos de eficiencia.The DSC engine caches resources implemented as a PowerShell module for efficiency purposes. Sin embargo, esto puede provocar problemas cuando está creando un recurso y probándolo al mismo tiempo, ya que DSC cargará la versión en caché hasta que se reinicie el proceso.However, this can cause problems when you are authoring a resource and testing it simultaneously because DSC will load the cached version until the process is restarted. La única manera de conseguir que DSC cargue la versión más reciente es detener explícitamente el proceso que hospeda el motor de DSC.The only way to make DSC load the newer version is to explicitly kill the process hosting the DSC engine.

De forma similar, cuando se ejecuta Start-DscConfiguration, después de agregar y modificar un recurso personalizado, es posible que la modificación no se ejecute a menos que (o hasta que) se reinicie el equipo.Similarly, when you run Start-DscConfiguration, after adding and modifying a custom resource, the modification may not execute unless, or until, the computer is rebooted. Esto se debe a que DSC se ejecuta en el proceso host del proveedor de WMI (WmiPrvSE) y, normalmente, existen muchas instancias de WmiPrvSE que se ejecutan a la vez.This is because DSC runs in the WMI Provider Host Process (WmiPrvSE), and usually, there are many instances of WmiPrvSE running at once. Al reiniciar, el proceso de host se reinicia y la memoria caché se borra.When you reboot, the host process is restarted and the cache is cleared.

Para reciclar la configuración de correctamente y borrar la memoria caché sin necesidad de reiniciar, debe detener y después reiniciar el proceso del host.To successfully recycle the configuration and clear the cache without rebooting, you must stop and then restart the host process. Esto puede hacerse por instancia, en cuyo caso se identifica el proceso, se detiene y se reinicia.This can be done on a per instance basis, whereby you identify the process, stop it, and restart it. O bien, puede usar DebugMode, como se muestra a continuación, para volver a cargar el recurso de DSC de PowerShell.Or, you can use DebugMode, as demonstrated below, to reload the PowerShell DSC resource.

Para identificar el proceso que hospeda el motor de DSC y detenerlo por instancia, puede mostrar el identificador de proceso del elemento WmiPrvSE que hospeda el motor de DSC.To identify which process is hosting the DSC engine and stop it on a per instance basis, you can list the process ID of the WmiPrvSE which is hosting the DSC engine. A continuación, para actualizar el proveedor, detenga el proceso WmiPrvSE mediante los comandos siguientes y luego ejecute de nuevo Start-DscConfiguration.Then, to update the provider, stop the WmiPrvSE process using the commands below, and then run Start-DscConfiguration again.

###
### find the process that is hosting the DSC engine
###
$dscProcessID = Get-WmiObject msft_providers |
Where-Object {$_.provider -like 'dsccore'} |
Select-Object -ExpandProperty HostProcessIdentifier

###
### Stop the process
###
Get-Process -Id $dscProcessID | Stop-Process

Uso de DebugModeUsing DebugMode

Puede configurar el administrador de configuración de local (LCM) de DSC para que utilice DebugMode y siempre se borre la memoria caché cuando se reinicie el proceso de host.You can configure the DSC Local Configuration Manager (LCM) to use DebugMode to always clear the cache when the host process is restarted. Cuando se establece en TRUE , provoca que el motor siempre vuelva a cargar el recurso de DSC de PowerShell.When set to TRUE , it causes the engine to always reload the PowerShell DSC resource. Cuando haya terminado de escribir el recurso, se puede volver a establecer en FALSE y el motor volverá al comportamiento de almacenamiento en caché de los módulos.Once you are done writing your resource, you can set it back to FALSE and the engine will revert to its behavior of caching the modules.

A continuación se incluye una demostración donde se aprecia cómo DebugMode puede actualizar automáticamente la memoria caché.Following is a demonstration to show how DebugMode can automatically refresh the cache. En primer lugar, echemos un vistazo a la configuración predeterminada:First, let's look at the default configuration:

PS C:\> Get-DscLocalConfigurationManager
AllowModuleOverwrite           : False
CertificateID                  :
ConfigurationID                :
ConfigurationMode              : ApplyAndMonitor
ConfigurationModeFrequencyMins : 30
Credential                     :
DebugMode                      : {None}
DownloadManagerCustomData      :
DownloadManagerName            :
LocalConfigurationManagerState : Ready
RebootNodeIfNeeded             : False
RefreshFrequencyMins           : 15
RefreshMode                    : PUSH
PSComputerName                 :

Puede ver que DebugMode está establecido en "Ninguno" .You can see that DebugMode is set to "None".

Para configurar la demostración de DebugMode, utilice el siguiente recurso de PowerShell:To set up the DebugMode demonstration, use the following PowerShell resource:

function Get-TargetResource
{
    param
    (
        [Parameter(Mandatory)]
        $onlyProperty
    )
    return @{onlyProperty = Get-Content -Path "$env:SystemDrive\OutputFromTestProviderDebugMode.txt"}
}
function Set-TargetResource
{
    param
    (
        [Parameter(Mandatory)]
        $onlyProperty
    )
    "1" | Out-File -PSPath "$env:SystemDrive\OutputFromTestProviderDebugMode.txt"
}
function Test-TargetResource
{
    param
    (
        [Parameter(Mandatory)]
        $onlyProperty
    )
    return $false
}

Ahora, cree una configuración con el recurso anterior denominado TestProviderDebugMode:Now, author a configuration using the above resource called TestProviderDebugMode:

Configuration ConfigTestDebugMode
{
    Import-DscResource -Name TestProviderDebugMode
    Node localhost
    {
        TestProviderDebugMode test
        {
            onlyProperty = "blah"
        }
    }
}
ConfigTestDebugMode

Verá que el contenido del archivo: $env:SystemDrive\OutputFromTestProviderDebugMode.txt es 1.You will see that the contents of file: $env:SystemDrive\OutputFromTestProviderDebugMode.txt is 1.

Ahora, actualice el código del proveedor mediante el siguiente script:Now, update the provider code using the following script:

$newResourceOutput = Get-Random -Minimum 5 -Maximum 30
$content = @"
function Get-TargetResource
{
    param
    (
        [Parameter(Mandatory)]
        `$onlyProperty
    )
    return @{onlyProperty = Get-Content -Path "$env:SystemDrive\OutputFromTestProviderDebugMode.txt"}
}
function Set-TargetResource
{
    param
    (
        [Parameter(Mandatory)]
        `$onlyProperty
    )
    "$newResourceOutput" | Out-File -PSPath C:\OutputFromTestProviderDebugMode.txt
}
function Test-TargetResource
{
    param
    (
        [Parameter(Mandatory)]
        `$onlyProperty
    )
    return `$false
}
"@ | Out-File -FilePath "C:\Program Files\WindowsPowerShell\Modules\MyPowerShellModules\DSCResources\TestProviderDebugMode\TestProviderDebugMode.psm1

Este script genera un número aleatorio y actualiza el código del proveedor en consecuencia.This script generates a random number and updates the provider code accordingly. Con DebugMode establecido en false, el contenido del archivo $env:SystemDrive\OutputFromTestProviderDebugMode.txt no cambia nunca.With DebugMode set to false, the contents of the file $env:SystemDrive\OutputFromTestProviderDebugMode.txt are never changed.

Ahora, establezca DebugMode en "ForceModuleImport" en el script de configuración:Now, set DebugMode to "ForceModuleImport" in your configuration script:

LocalConfigurationManager
{
    DebugMode = "ForceModuleImport"
}

Cuando vuelva a ejecutar el script anterior, verá que el contenido del archivo es cada vez distinto.When you run the above script again, you will see that the content of the file is different every time. (Puede ejecutar Get-DscConfiguration para comprobarlo).(You can run Get-DscConfiguration to check it). A continuación se muestra el resultado de dos ejecuciones adicionales (los resultados pueden ser diferentes cuando ejecute el script):Below is the result of two additional runs (your results may be different when you run the script):

PS C:\> Get-DscConfiguration -CimSession (New-CimSession localhost)

onlyProperty                            PSComputerName
------------                            --------------
20                                      localhost

PS C:\> Get-DscConfiguration -CimSession (New-CimSession localhost)

onlyProperty                            PSComputerName
------------                            --------------
14                                      localhost

DSC devuelve el código de respuesta inesperado "InternalServerError" al registrarse con Windows Pull ServerDSC returns "unexpected response code InternalServerError" when registering with Windows Pull Server

Al aplicar una metaconfiguración a un servidor para registrarlo con una instancia de Windows Pull Server, es posible que se produzca el error que se indica a continuación.When applying a metaconfiguration to a server to register it with an instance of Windows Pull Server, you might encounter the following error.

Registration of the Dsc Agent with the server https://<serverfqdn>:8080/PSDSCPullServer.svc failed. The underlying error is: The attempt to register Dsc Agent with AgentId <ID> with the server
https://<serverfqdn>:8080/PSDSCPullServer.svc/Nodes(AgentId='<ID>') returned unexpected response code InternalServerError. .
    + CategoryInfo          : InvalidResult: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : RegisterDscAgentUnsuccessful,Microsoft.PowerShell.DesiredStateConfiguration.Commands.RegisterDscAgentCommand
    + PSComputerName        : <computername>

Dicho error puede darse cuando el certificado usado en el servidor para cifrar el tráfico tiene un nombre común (CN) distinto al nombre de DNS usado por el nodo para resolver la URL.This can occur when the certificate used on the server to encrypt traffic has a common name (CN) that is different than the DNS name used by the node to resolve the URL. Actualice la instancia de Windows Pull Server para que use un certificado con un nombre corregido.Update the Windows Pull Server instance to use a certificate with a corrected name.

Error al ejecutar Sysprep tras aplicar una configuración de DSCError when running Sysprep after applying a DSC Configuration

Al intentar ejecutar Sysprep para generalizar una instancia de Windows Server tras aplicar una configuración de DSC, es posible que se produzca el siguiente error.When attempting to run Sysprep to generalize a Windows Server after applying a DSC configuration, you might encounter the following error.

SYSPRP LaunchDll:Failure occurred while executing 'DscCore.dll,SysPrep_Cleanup', returned error code 0x2

La generalización de un servidor tras haberlo configurado con Desired State Configuration de Windows PowerShell no se admite.Generalizing a server after it has been configured using Windows PowerShell Desired State Configuration is not a supported scenario. En su lugar, aplique los valores a Windows una vez completada la fase de especialización de la configuración de Windows.Instead, apply configurations to Windows after the Specialize phase of Windows Setup has completed.

Consulte tambiénSee Also

ConceptosConcepts

Otros recursosOther Resources