Export (0) Print
Expand All

Set-DscLocalConfigurationManager

Set-DscLocalConfigurationManager

Applies Local Configuration Manager settings to nodes.

Syntax

Parameter Set: ComputerNameSet
Set-DscLocalConfigurationManager [[-ComputerName] <String[]> ] [-Path] <String> [-Credential <PSCredential> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: CimSessionSet
Set-DscLocalConfigurationManager [-Path] <String> -CimSession <CimSession[]> [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Set-DscLocalConfigurationManager cmdlet applies Local Configuration Manager settings, or meta-configuration, to nodes.Specify a path to the configuration settings folder. 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<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. The default is the current session on the local computer.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-ComputerName<String[]>

Specifies an array of computer names. The cmdlet publishes and applies the configuration settings in the location specified by the Path parameter to these computers.


Aliases

CN,ServerName

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Credential<PSCredential>

Specifies a user name and password, as a PSCredential object, for the target computer. To obtain a PSCredential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Path<String>

Specifies a file path of a folder that contains configuration settings files. The cmdlet publishes and applies these Local Configuration Manager settings to computers specified by the ComputerName parameter.


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ThrottleLimit<Int32>

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 PowerShell® 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.


Aliases

none

Required?

false

Position?

named

Default Value

32

Accept Pipeline Input?

false

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

-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

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Apply Local Configuration Manager settings

This command applies the Local Configuration Manager settings from C:\DSC\Configurations\ to the local computer. After receiving the settings, Local Configuration Manager processes them.


PS C:\> Set-DscLocalConfigurationManager -Path "C:\DSC\Configurations\"

Example 2: Apply Local Configuration Manager settings by using a CIM session

This example applies Local Configuration Manager 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 Local Configuration Manager settings from C:\DSC\Configurations\ to the computers identified 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, Local Configuration Manager processes them.


PS C:\> $Session = New-CimSession –ComputerName "Server01" –Credential ACCOUNTS\PattiFuller
PS C:\> Set-DscLocalConfigurationManager -Path "C:\DSC\Configurations\" -CimSession $Session

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft