Update-DscConfiguration
Checks the pull server for an updated configuration and applies it.
Синтаксис
ComputerNameSet (по умолчанию)
Update-DscConfiguration
[[-ComputerName] <String[]>]
[-Wait]
[-JobName <String>]
[-Credential <PSCredential>]
[-ThrottleLimit <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
CimSessionSet
Update-DscConfiguration
-CimSession <CimSession[]>
[-Wait]
[-JobName <String>]
[-ThrottleLimit <Int32>]
[-WhatIf]
[-Confirm]
[<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.
Примеры
Example 1: Update a configuration
Update-DscConfiguration -Wait -Verbose
After running this command, the server will connect to the registered pull service, download the latest assigned configuration, and then apply it. The Wait and Verbose parameters are optional. When working interactively, these parameters combined enable real-time feedback about progress and success or failure when applying the configuration.
Example 2: Update a configuration by connecting over a CIM session
$Session = New-CimSession -ComputerName "Server01" -Credential ACCOUNTS\PattiFuller
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.
Параметры
-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.
Свойства параметра
Тип: | |
Default value: | None |
Поддерживаются подстановочные знаки: | False |
DontShow: | False |
Наборы параметров
CimSessionSet
Position: | Named |
Обязательно: | True |
Значение из конвейера: | True |
Значение из конвейера по имени свойства: | False |
Значение из оставшихся аргументов: | False |
-ComputerName
Specifies an array of computer names. The cmdlet applies the configuration settings to the computers that this parameter specifies.
Свойства параметра
Тип: | String[] |
Default value: | None |
Поддерживаются подстановочные знаки: | False |
DontShow: | False |
Aliases: | 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 |
Aliases: | 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 |
-JobName
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.
Свойства параметра
Тип: | String |
Default value: | None |
Поддерживаются подстановочные знаки: | False |
DontShow: | False |
Наборы параметров
(All)
Position: | Named |
Обязательно: | False |
Значение из конвейера: | 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 |
-Wait
Indicates that the cmdlet blocks the console until it finishes all configuration tasks.
If you specify this parameter, do not specify the JobName parameter.
Свойства параметра
Тип: | SwitchParameter |
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 |
Aliases: | 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.