NAME
Set-DscLocalConfigurationManager
SYNOPSIS
Applies LCM settings to nodes.SYNTAX
Set-DscLocalConfigurationManager [-Path]
-CimSession [-Confirm] [-Force] [-ThrottleLimit
] [-WhatIf] [ ] Set-DscLocalConfigurationManager [-Path]
[[-ComputerName] ] [-Confirm] [-Credential
] [-Force] [-ThrottleLimit ] [-WhatIf] [ ] DESCRIPTION
The Set-DscLocalConfigurationManager cmdlet applies Local Configuration Manager (LCM) settings, or
meta-configuration, to nodes. Specify computers by specifying computer names or by using Common Information Model
(CIM) sessions. If you do not specify a target computer, the cmdlet applies settings to the local computer.PARAMETERS
-CimSession
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, suchas the output of a New-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227967 or
Get-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227966 cmdlet. The default is the current session on
the local computer. Required? true Position? named Default value None Accept pipeline input? True (ByValue) Accept wildcard characters? false-ComputerName
Specifies an array of computer names. This parameter restricts the computers that have meta-configuration
documents in the Path parameter to those specified in the array. Required? false Position? 1 Default value None Accept pipeline input? True (ByValue) Accept wildcard characters? false-Confirm [
Prompts you for confirmation before running the cmdlet. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -Credential
Specifies a user name and password, as a PSCredential object, for the target computer. To obtain aPSCredential object, use the Get-Credential cmdlet. For more information, type `Get-Help Get-Credential`.
Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-Force [
@{Text=} Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -Path
Specifies a file path of a folder that contains configuration settings files. The cmdlet publishes and applies these LCM settings to computers that have settings files in the specified path. Each target node must have asettings file of the following format: NetBIOS Name.meta.mof.
Required? true Position? 0 Default value None Accept pipeline input? False Accept wildcard characters? false-ThrottleLimit
Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of `0` is entered, then Windows PowerShellr calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-WhatIf [
Shows what would happen if the cmdlet runs. The cmdlet is not run. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216). INPUTS
OUTPUTS
NOTES
Example 1: Apply LCM settings
PS C:\> Set-DscLocalConfigurationManager -Path "C:\DSC\Configurations\"
This command applies the LCM settings from C:\DSC\Configurations\ to the targeted notes. After receiving the settings, LCM processes them.Example 2: Apply LCM settings by using a CIM session
PS C:\> $Session = New-CimSession -ComputerName "Server01" -Credential ACCOUNTS\PattiFuller
PS C:\> Set-DscLocalConfigurationManager -Path "C:\DSC\Configurations\" -CimSession $Session
This example applies LCM settings to a computer and applies the settings. 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 applies LCM settings for the targeted node from C:\DSC\Configurations\ to the computeridentified by the CimSession objects stored in the $Session variable. In this example, the $Session variable
contains a CIM session only for the computer named Server01. The command applies the settings. After the receiving the settings, LCM processes them.RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkId=821464Windows PowerShell Desired State Configuration Overview http://go.microsoft.com/fwlink/?LinkID=311940
Get-DscLocalConfigurationManager