Start-DscConfiguration
Applies configuration to nodes.
Start-DscConfiguration [-Force] [-JobName [<String>]] [-ThrottleLimit [<Int32>]] [-Wait] -CimSession*<CimSession[]> -UseExisting* [-Confirm] [-WhatIf] [<CommonParameters>]
Start-DscConfiguration [[-Path] [<String>]] [-Force] [-JobName [<String>]] [-ThrottleLimit [<Int32>]] [-Wait]-CimSession* <CimSession[]> [-Confirm] [-WhatIf] [<CommonParameters>]
Start-DscConfiguration [[-Path] [<String>]] [[-ComputerName] [<String[]>]] [-Credential [<PSCredential>]] [-Force][-JobName [<String>]] [-ThrottleLimit [<Int32>]] [-Wait] [-Confirm] [-WhatIf] [<CommonParameters>]
Start-DscConfiguration [[-ComputerName] [<String[]>]] [-Credential [<PSCredential>]] [-Force] [-JobName[<String>]] [-ThrottleLimit [<Int32>]] [-Wait] -UseExisting* [-Confirm] [-WhatIf] [<CommonParameters>]
The Start-DscConfiguration cmdlet applies configuration to nodes. When used with the UseExisting parameter, the existing configuration on the target computer is applied. Specify which computers that you want to apply configuration to by specifying computer names or by using Common Information Model (CIM) sessions.
By default, this cmdlet creates a job and returns a Job object. For more information about background jobs, type Get-Help about_Jobs. To use this cmdlet interactively, specify the Wait parameter.
Specify the Verbose parameter to see details of what the cmdlet does when it applies configuration settings.
Parameters |
---|
-CimSession <CimSession[]>
|
-ComputerName [<String[]>]
|
-Credential [<PSCredential>]
|
-Force [<SwitchParameter>]
|
-JobName [<String>]
|
-Path [<String>]
|
-ThrottleLimit [<Int32>]
|
-UseExisting <SwitchParameter>
|
-Wait [<SwitchParameter>]
|
-Confirm [<SwitchParameter>]
|
-WhatIf [<SwitchParameter>]
|
<CommonParameters>
|
Examples
- Apply configuration settings:
PS C:> Start-DscConfiguration -Path "C:DSCConfigurations"
This command applies the configuration settings from C:DSCConfigurations to the every computer that has settings in that folder. The command returns Job objects for each target node deployed to.
- Apply configuration settings and wait for configuration to complete:
PS C:> Start-DscConfiguration -Path "C:DSCConfigurations" -Wait -Verbose
This command applies the configuration from C:DSCConfigurations to the local computer. The command returns Job objects for each target node deployed to, in this case, just the local computer. This example specifies the Verbose parameter. Therefore, the command sends messages to the console as it proceeds. The command includes the Wait parameter. Therefore, you cannot use the console until the command finishes all configuration tasks.
- Apply configuration settings by using a CIM session:
PS C:> $Session = New-CimSession -ComputerName "Server01" -Credential ACCOUNTSPattiFuller PS C:> Start-DscConfiguration -Path "C:DSCConfigurations" -CimSession $Session
This example applies configuration settings to a specified computer. 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 NewCimSession.
The second command applies the configuration settings from C:DSCConfigurations 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 configuration. The command creates Job objects for each configured computer.
Related Links
Get-DscConfiguration
Get-DscConfigurationStatus
Restore-DscConfiguration
Stop-DscConfiguration
Test-DscConfiguration
Update-DscConfiguration