NAME
Stop-DscConfiguration
SYNOPSIS
Stops a running configuration.SYNTAX
Stop-DscConfiguration [-AsJob] [-CimSession
[] [-Confirm] [-Force] [-ThrottleLimit ] [-WhatIf] ] DESCRIPTION
The Stop-DscConfiguration cmdlet stops a configuration job that is currently running. Specify which computers this
cmdlet applies to by using Common Information Model (CIM) sessions. If there is no configuration job running, this cmdlet returns a warning message. This cmdlet is available only as part of the November 2014 update rollup for Windows RT 8.1, Windows 8.1, andWindows Server 2012 R2http://support.microsoft.com/en-us/kb/3000850
(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 PowerShellhttp://technet.microsoft.com/library/hh857339.aspx (http://technet.microsoft.com/library/hh857339.aspx) in the TechNet library. This cmdlet does not support the Confirm parameter.PARAMETERS
-AsJob [
{{Fill AsJob Description}} Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -CimSession
@{Text=} Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-Confirm [
Prompts you for confirmation before running the cmdlet. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -Force [
@{Text=} Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -ThrottleLimit
@{Text=} Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-WhatIf [
Shows what would happen if the cmdlet runs. The cmdlet is not run. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] 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
NoneOUTPUTS
NoneNOTES
Example 1: Stop a configuration job
PS C:\>$Session = New-CimSession -ComputerName "Server01" -Credential ACCOUNTS\PattiFuller
PS C:\> Stop-DscConfiguration -CimSession $Session
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 stops a currently running configuration job on the computer identified by the CimSession objectstored in $Session.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkId=821463Windows PowerShell Desired State Configuration Overview http://go.microsoft.com/fwlink/?LinkID=311940
Get-DscConfiguration
Get-DscConfigurationStatus
Restore-DscConfiguration
Start-DscConfiguration
Test-DscConfiguration
Update-DscConfiguration