Get-DscLocalConfigurationManager
Gets Local Configuration Manager (LCM) settings and states for the node.
Syntax
Get-DscLocalConfigurationManager
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[<CommonParameters>]
Description
The Get-DscLocalConfigurationManager
cmdlet gets LCM settings, or meta-configuration, and the
states of LCM for the node. Specify computers by using Common Information Model (CIM) sessions. If
you do not specify a target computer, the cmdlet gets the configuration settings from the local
computer.
Examples
Example 1: Get LCM settings for the local computer
Get-DscLocalConfigurationManager
ActionAfterReboot : ContinueConfiguration
AgentId : 47edd8c9-2798-4827-839a-b35cc87e69fb
AllowModuleOverWrite : False
CertificateID :
ConfigurationDownloadManagers : {}
ConfigurationID :
ConfigurationMode : ApplyAndMonitor
ConfigurationModeFrequencyMins : 15
Credential :
DebugMode : {NONE}
DownloadManagerCustomData :
DownloadManagerName :
LCMCompatibleVersions : {1.0, 2.0}
LCMState : Idle
LCMStateDetail :
LCMVersion : 2.0
StatusRetentionTimeInDays : 10
SignatureValidationPolicy : NONE
SignatureValidations : {}
MaximumDownloadSizeMB : 500
PartialConfigurations :
RebootNodeIfNeeded : False
RefreshFrequencyMins : 30
RefreshMode : PUSH
ReportManagers : {}
ResourceModuleManagers : {}
PSComputerName
This command gets LCM settings for the local computer.
For more information on the individual attributes of the output, see the Configuring the Local Configuration Manager documentation.
Example 2: Get LCM settings for a specified computer
$Session = New-CimSession -ComputerName "Server01" -Credential ACCOUNTS\PattiFuller
Get-DscLocalConfigurationManager -CimSession $Session
ActionAfterReboot : ContinueConfiguration
AgentId : 169dfa57-a7f9-43be-a7a5-9dd06587e052
AllowModuleOverWrite : False
CertificateID :
ConfigurationDownloadManagers : {}
ConfigurationID :
ConfigurationMode : ApplyAndMonitor
ConfigurationModeFrequencyMins : 15
Credential :
DebugMode : {NONE}
DownloadManagerCustomData :
DownloadManagerName :
LCMCompatibleVersions : {1.0, 2.0}
LCMState : Idle
LCMStateDetail :
LCMVersion : 2.0
StatusRetentionTimeInDays : 10
SignatureValidationPolicy : NONE
SignatureValidations : {}
MaximumDownloadSizeMB : 500
PartialConfigurations :
RebootNodeIfNeeded : False
RefreshFrequencyMins : 30
RefreshMode : PUSH
ReportManagers : {}
ResourceModuleManagers : {}
PSComputerName : Server01
PSComputerName : Server01
This example gets LCM settings for a computer specified by a CIM session. The example creates a CIM session for a computer named Server01 for use with the cmdlet. Alternatively, create an array of CIM sessions to apply the cmdlet to multiple specified computers.
The first command creates a CIM session by using the New-CimSession
cmdlet, and then stores the
CimSession object in the $Session variable. The command prompts you for a password. For more
information, type Get-Help New-CimSession
.
The second command gets Local Configuration Manager settings for the computers identified by the CimSession objects stored in the $Session variable. In this case, the computer named Server01.
Parameters
-AsJob
Indicates that this cmdlet runs the command as a background job.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CimSession
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session
object, such as the output of a New-CimSession
or Get-CimSession
cmdlet.
Type: | CimSession[] |
Aliases: | Session |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ThrottleLimit
Specifies the maximum number of concurrent operations that can be established to run the cmdlet.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |