Update-DscConfiguration

Checks the pull server for an updated configuration and applies it.
Update-DscConfiguration [-JobName [<String>]] [-ThrottleLimit [<Int32>]] [-Wait] -CimSession* <CimSession[]>[-Confirm] [-WhatIf] [<CommonParameters>]
Update-DscConfiguration [[-ComputerName] [<String[]>]] [-Credential [<PSCredential>]] [-JobName [<String>]][-ThrottleLimit [<Int32>]] [-Wait] [-Confirm] [-WhatIf] [<CommonParameters>]

The Update-DscConfiguration cmdlet connects to a pull server, downloads the configuration if it differs from what is current on the node, and then applies the configuration to the computer.

This cmdlet is available only as part of the November 2014 update rollup for Windows RT 8.1, Windows 8.1, and Windows Server 2012 R2 (http://support.microsoft.com/en-us/kb/3000850) from the Microsoft Support library. Before you use this cmdlet, review the information in What’s New in Windows PowerShell (http://technet.microsoft.com/library/hh857339.aspx) in the TechNet library.

Parameters
-CimSession <CimSession[]>

  • This value is required
  • Accepts pipeline input ByValue

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.

-ComputerName [<String[]>]

Specifies an array of computer names. The cmdlet applies the configuration settings to the computers that this parameter specifies.

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

-JobName [<String>]

Specifies a friendly name for a job. If you specify this parameter, the cmdlet runs as a job, and it returns a Job object.

By default, Windows PowerShell assigns the name JobN where N is an integer.

If you specify the Wait parameter, do not specify this parameter.

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

-Wait [<SwitchParameter>]

Indicates that the cmdlet blocks the console until it finishes all configuration tasks.

If you specify this parameter, do not specify the JobName parameter.

-Confirm [<SwitchParameter>]

  • Default value is false

Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet.

-WhatIf [<SwitchParameter>]

  • Default value is false

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

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,ErrorAction, ErrorVariable, WarningAction, WarningVariable,OutBuffer, PipelineVariable, and OutVariable.

Examples
  1. Update a configuration:
    PS C:> $Session = New-CimSession -ComputerName "Server01" -Credential ACCOUNTSPattiFuller
    PS C:>  Update-DscConfiguration -CimSession $Session -Wait
    

    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 updates the computer specified in the CimSession stored in $Session. The command specifies the Wait parameter. The console does not accept additional commands until the current command finishes.

Related Links

Get-DscConfiguration
Get-DscConfigurationStatus
Restore-DscConfiguration
Start-DscConfiguration
Stop-DscConfiguration
Test-DscConfiguration