다음을 통해 공유


Set-DscLocalConfigurationManager

Applies Local Configuration Manager (LCM) settings to nodes.

구문

ComputerNameSet (기본값)

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

CimSessionSet

Set-DscLocalConfigurationManager
    [-Path] <String>
    -CimSession <CimSession[]>
    [-Force]
    [-ThrottleLimit <Int32>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-DscLocalConfigurationManager cmdlet applies 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.

예제

Example 1: Apply LCM settings

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

This command applies the LCM settings from C:\DSC\Configurations\ to the targeted nodes. After receiving the settings, LCM processes them.

Warning

If there are multiple meta mofs for the same computer stored in the specified folder, only the first meta mof will be applied.

Example 2: Apply LCM settings by using a CIM session

$Session = New-CimSession -ComputerName "Server01" -Credential ACCOUNTS\PattiFuller
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 computer 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 receiving the settings, LCM processes them.

매개 변수

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

매개 변수 속성

형식:

CimSession[]

Default value:None
와일드카드 지원:False
DontShow:False

매개 변수 집합

CimSessionSet
Position:Named
필수:True
파이프라인의 값:True
속성 이름별 파이프라인의 값:False
나머지 인수의 값: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.

매개 변수 속성

형식:

String[]

Default value:None
와일드카드 지원:False
DontShow:False
별칭:CN, ServerName

매개 변수 집합

ComputerNameSet
Position:1
필수:False
파이프라인의 값:True
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

-Confirm

Prompts you for confirmation before running the cmdlet.

매개 변수 속성

형식:SwitchParameter
Default value:False
와일드카드 지원:False
DontShow:False
별칭:cf

매개 변수 집합

(All)
Position:Named
필수:False
파이프라인의 값:False
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

-Credential

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.

매개 변수 속성

형식:PSCredential
Default value:None
와일드카드 지원:False
DontShow:False

매개 변수 집합

ComputerNameSet
Position:Named
필수:False
파이프라인의 값:False
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

-Force

Forces the command to run without asking for user confirmation.

매개 변수 속성

형식:SwitchParameter
Default value:None
와일드카드 지원:False
DontShow:False

매개 변수 집합

(All)
Position:Named
필수:False
파이프라인의 값:False
속성 이름별 파이프라인의 값:False
나머지 인수의 값: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 a settings file of the following format: NetBIOS Name.meta.mof.

매개 변수 속성

형식:String
Default value:None
와일드카드 지원:False
DontShow:False

매개 변수 집합

(All)
Position:0
필수:True
파이프라인의 값:False
속성 이름별 파이프라인의 값:False
나머지 인수의 값: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 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.

매개 변수 속성

형식:Int32
Default value:None
와일드카드 지원:False
DontShow:False

매개 변수 집합

(All)
Position:Named
필수:False
파이프라인의 값:False
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

매개 변수 속성

형식:SwitchParameter
Default value:False
와일드카드 지원:False
DontShow:False
별칭:wi

매개 변수 집합

(All)
Position:Named
필수:False
파이프라인의 값:False
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.