Reporting on the target node status

If you're interested in a quick view of the status of a target node in WMF 5, there is a built-in cmdlet to report on a target node's status, called Get-DscConfigurationStatus. This runs a PSJob that interrogates the state of the DSC runs on the target node and returns the status information:

PS C:Windowssystem32> Get-DscConfigurationStatus | fl *
DurationInSeconds : 4
Error :
HostName : DSC-BOX2
IPV4Addresses : {10.0.2.15, 169.254.35.43, 192.168.50.2, 192.168.50.4...}
IPV6Addresses : {fe80::c524:57eb:b077:5419%7, ::2000:0:0:0, fe80::d80e:a48b:f347:232b%2, ::4000:0:0:0...}
JobID : {E5104F0B-7BD6-11E7-9662-080027928F7F}
LCMVersion : 2.0
Locale : en-US
MACAddresses : {08-00-27-5B-B7-7B, 08-00-27-E1-B2-24, 08-00-27-92-8F-7F, 00-00-00-00-00-00-00-E0...}
MetaConfiguration : MSFT_DSCMetaConfiguration
MetaData : Author: vagrant; Name: SetupTheSite; Version: 2.0.0; GenerationDate: 08/08/2017 00:59:30;GenerationHost: DSC-BOX1;
Mode : Pull
NumberOfResources : 6
RebootRequested : False
ResourcesInDesiredState : {[WindowsFeature]IIS, [WindowsFeature]AspNet45, [xWebsite]DefaultSite,[File]WebContentDir...}
ResourcesNotInDesiredState :
StartDate : 8/8/2017 1:14:16 AM
Status : Success
Type : Consistency
PSComputerName :
CimClass : root/microsoft/windows/desiredstateconfiguration:MSFT_DSCConfigurationStatus
CimInstanceProperties : {DurationInSeconds, Error, HostName, IPV4Addresses...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties

Notable information to see here is the listing of ResourcesInDesiredState and ResourcesNotInDesiredState. This is immediately useful information to determine what was successful and what was not successful in the last run, and it can be used along with the DSC logging already covered to pinpoint and diagnose failures.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset