< Back
Start-CDscPullConfiguration
Post
NAME Start-CDscPullConfiguration
SYNOPSIS
Performs a configuration check on a computer that is using DSC's Pull refresh mode.
SYNTAX
Start-CDscPullConfiguration -ComputerName <String[]> [-Credential <PSCredential>] [-ModuleName <String[]>]
[<CommonParameters>]
Start-CDscPullConfiguration [-CimSession <CimSession[]>] [-ModuleName <String[]>] [<CommonParameters>]
DESCRIPTION
The most frequently a computer's LCM will download new configuration is every 15 minutes; the most frequently it
will apply it is every 30 minutes. This function contacts a computer's LCM and tells it to apply and download its
configuration immediately.
If a computer's LCM isn't configured to pull its configuration, an error is written, and nothing happens.
If a configuration check fails, the errors are retrieved from the computer's event log and written out as errors.
The `Remote Event Log Management` firewall rules must be enabled on the computer for this to work. If they aren't,
you'll see an error explaining this. The `Get-CDscError` help topic shows how to enable these firewall rules.
Sometimes, the LCM does a really crappy job of updating to the latest version of a module.
`Start-CDscPullConfiguration` will delete modules on the target computers. Specify the names of the modules to
delete with the `ModuleName` parameter. Make sure you only delete modules that will get installed by the LCM. Only
modules installed in the `$env:ProgramFiles\\WindowsPowerShell\\Modules` directory are removed.
`Start-CDscPullConfiguration` is new in Carbon 2.0.
PARAMETERS
-ComputerName <String[]>
The credential to use when connecting to the target computer.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Credential <PSCredential>
The credentials to use when connecting to the computers.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-CimSession <CimSession[]>
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ModuleName <String[]>
Any modules that should be removed from the target computer's PSModulePath (since the LCM does a *really*
crappy job of removing them).
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Start-CDscPullConfiguration -ComputerName '10.1.2.3','10.4.5.6'
Demonstrates how to immedately download and apply a computer from its pull server.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Start-CDscPullConfiguration -ComputerName '10.1.2.3' -Credential (Get-Credential domain\\username)
Demonstrates how to use custom credentials to contact the remote server.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Start-CDscPullConfiguration -CimSession $session
Demonstrates how to use one or more CIM sessions to invoke a configuration check.
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Start-CDscPullConfiguration -ComputerName 'example.com' -ModuleName 'Carbon'
Demonstrates how to delete modules on the target computers, because sometimes the LCM does a really crappy job of
it.
RELATED LINKS
Get-CDscError
Initialize-CLcm
Get-CDscWinEvent
SYNOPSIS
Performs a configuration check on a computer that is using DSC's Pull refresh mode.
SYNTAX
Start-CDscPullConfiguration -ComputerName <String[]> [-Credential <PSCredential>] [-ModuleName <String[]>]
[<CommonParameters>]
Start-CDscPullConfiguration [-CimSession <CimSession[]>] [-ModuleName <String[]>] [<CommonParameters>]
DESCRIPTION
The most frequently a computer's LCM will download new configuration is every 15 minutes; the most frequently it
will apply it is every 30 minutes. This function contacts a computer's LCM and tells it to apply and download its
configuration immediately.
If a computer's LCM isn't configured to pull its configuration, an error is written, and nothing happens.
If a configuration check fails, the errors are retrieved from the computer's event log and written out as errors.
The `Remote Event Log Management` firewall rules must be enabled on the computer for this to work. If they aren't,
you'll see an error explaining this. The `Get-CDscError` help topic shows how to enable these firewall rules.
Sometimes, the LCM does a really crappy job of updating to the latest version of a module.
`Start-CDscPullConfiguration` will delete modules on the target computers. Specify the names of the modules to
delete with the `ModuleName` parameter. Make sure you only delete modules that will get installed by the LCM. Only
modules installed in the `$env:ProgramFiles\\WindowsPowerShell\\Modules` directory are removed.
`Start-CDscPullConfiguration` is new in Carbon 2.0.
PARAMETERS
-ComputerName <String[]>
The credential to use when connecting to the target computer.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Credential <PSCredential>
The credentials to use when connecting to the computers.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-CimSession <CimSession[]>
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ModuleName <String[]>
Any modules that should be removed from the target computer's PSModulePath (since the LCM does a *really*
crappy job of removing them).
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Start-CDscPullConfiguration -ComputerName '10.1.2.3','10.4.5.6'
Demonstrates how to immedately download and apply a computer from its pull server.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Start-CDscPullConfiguration -ComputerName '10.1.2.3' -Credential (Get-Credential domain\\username)
Demonstrates how to use custom credentials to contact the remote server.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Start-CDscPullConfiguration -CimSession $session
Demonstrates how to use one or more CIM sessions to invoke a configuration check.
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Start-CDscPullConfiguration -ComputerName 'example.com' -ModuleName 'Carbon'
Demonstrates how to delete modules on the target computers, because sometimes the LCM does a really crappy job of
it.
RELATED LINKS
Get-CDscError
Initialize-CLcm
Get-CDscWinEvent