Skip to content

Commit c0093fc

Browse files
PlagueHODCtheGeek
authored andcommitted
DSC: Deprecate xPendingReboot, renamed PendingReboot and moved to ComputerManagementDsc (#4824)
* Deprecate-xPendingReboot * Align bold style to document standard
1 parent 8ba4af2 commit c0093fc

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

dsc/configurations/reboot-a-node.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ title: Reboot a Node
1313
1414
Nodes can be rebooted from within a resource, by using the `$global:DSCMachineStatus` flag. Setting
1515
this flag to `1` in the `Set-TargetResource` function forces the LCM to reboot the Node directly
16-
after the **Set** method of the current resource. Using this flag, the **xPendingReboot** resource
17-
detects if a reboot is pending outside of DSC.
16+
after the **Set** method of the current resource. Using this flag, the **PendingReboot** resource
17+
in the [ComputerManagementDsc](https://github.com/PowerShell/ComputerManagementDsc) DSC Resource
18+
module detects if a reboot is pending outside of DSC.
1819

1920
Your [configurations](configurations.md) may perform steps that require the Node to reboot. This
2021
could include things such as:
@@ -24,8 +25,8 @@ could include things such as:
2425
- File renames
2526
- Computer rename
2627

27-
The **xPendingReboot** resource checks specific computer locations to determine if a reboot is
28-
pending. If the Node requires a reboot outside of DSC, the **xPendingReboot** resource sets the
28+
The **PendingReboot** resource checks specific computer locations to determine if a reboot is
29+
pending. If the Node requires a reboot outside of DSC, the **PendingReboot** resource sets the
2930
`$global:DSCMachineStatus` flag to `1` forcing a reboot and resolving the pending condition.
3031

3132
> [!NOTE]
@@ -35,7 +36,7 @@ pending. If the Node requires a reboot outside of DSC, the **xPendingReboot** re
3536
## Syntax
3637

3738
```
38-
xPendingReboot [String] #ResourceName
39+
PendingReboot [String] #ResourceName
3940
{
4041
Name = [string]
4142
[DependsOn = [string[]]]
@@ -63,8 +64,9 @@ xPendingReboot [String] #ResourceName
6364

6465
## Example
6566

66-
The following example installs Microsoft Exchange using the [xExchange](https://github.com/PowerShell/xExchange) resource.
67-
Throughout the install, the **xPendingReboot** resource is used to reboot the Node.
67+
The following example installs Microsoft Exchange using the [xExchange](https://github.com/PowerShell/xExchange)
68+
resource.
69+
Throughout the install, the **PendingReboot** resource is used to reboot the Node.
6870

6971
> [!NOTE]
7072
> This example requires the credential of an account that has rights to add an Exchange server to
@@ -93,7 +95,7 @@ Configuration Example
9395
)
9496
9597
Import-DscResource -Module xExchange
96-
Import-DscResource -Module xPendingReboot
98+
Import-DscResource -Module ComputerManagementDsc
9799
98100
Node $AllNodes.NodeName
99101
{
@@ -108,7 +110,7 @@ Configuration Example
108110
}
109111
110112
# Check if a reboot is needed before installing Exchange
111-
xPendingReboot BeforeExchangeInstall
113+
PendingReboot BeforeExchangeInstall
112114
{
113115
Name = 'BeforeExchangeInstall'
114116
DependsOn = '[File]ExchangeBinaries'
@@ -120,11 +122,11 @@ Configuration Example
120122
Path = 'C:\Binaries\E15CU6\Setup.exe'
121123
Arguments = '/mode:Install /role:Mailbox /Iacceptexchangeserverlicenseterms'
122124
Credential = $ExchangeAdminCredential
123-
DependsOn = '[xPendingReboot]BeforeExchangeInstall'
125+
DependsOn = '[PendingReboot]BeforeExchangeInstall'
124126
}
125127
126128
# See if a reboot is required after installing Exchange
127-
xPendingReboot AfterExchangeInstall
129+
PendingReboot AfterExchangeInstall
128130
{
129131
Name = 'AfterExchangeInstall'
130132
DependsOn = '[xExchInstall]InstallExchange'
@@ -139,7 +141,8 @@ Configuration Example
139141
140142
## Where to Download
141143

142-
You can download the resources used in this topic at the following locations, or by using the PowerShell gallery.
144+
You can download the resources used in this topic at the following locations, or by using the
145+
PowerShell gallery.
143146

144-
- [xPendingReboot](https://github.com/PowerShell/xPendingReboot)
147+
- [ComputerManagementDsc](https://github.com/PowerShell/ComputerManagementDsc)
145148
- [xExchange](https://github.com/PowerShell/xExchange)

dsc/managing-nodes/metaConfig.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ The following properties are available in a **Settings** block.
8383
| ConfigurationMode| string | Specifies how the LCM actually applies the configuration to the target nodes. Possible values are __"ApplyOnly"__,__"ApplyAndMonitor"__, and __"ApplyAndAutoCorrect"__. <ul><li>__ApplyOnly__: DSC applies the configuration and does nothing further unless a new configuration is pushed to the target node or when a new configuration is pulled from a service. After initial application of a new configuration, DSC does not check for drift from a previously configured state. Note that DSC will attempt to apply the configuration until it is successful before __ApplyOnly__ takes effect. </li><li> __ApplyAndMonitor__: This is the default value. The LCM applies any new configurations. After initial application of a new configuration, if the target node drifts from the desired state, DSC reports the discrepancy in logs. Note that DSC will attempt to apply the configuration until it is successful before __ApplyAndMonitor__ takes effect.</li><li>__ApplyAndAutoCorrect__: DSC applies any new configurations. After initial application of a new configuration, if the target node drifts from the desired state, DSC reports the discrepancy in logs, and then re-applies the current configuration.</li></ul>|
8484
| ConfigurationModeFrequencyMins| UInt32| How often, in minutes, the current configuration is checked and applied. This property is ignored if the ConfigurationMode property is set to ApplyOnly. The default value is 15.|
8585
| DebugMode| string| Possible values are __None__, __ForceModuleImport__, and __All__. <ul><li>Set to __None__ to use cached resources. This is the default and should be used in production scenarios.</li><li>Setting to __ForceModuleImport__, causes the LCM to reload any DSC resource modules, even if they have been previously loaded and cached. This impacts the performance of DSC operations as each module is reloaded on use. Typically you would use this value while debugging a resource</li><li>In this release, __All__ is same as __ForceModuleImport__</li></ul> |
86-
| RebootNodeIfNeeded| bool| Set this to `$true` to allow resources to reboot the Node using the `$global:DSCMachineStatus` flag. Otherwise, you will have to manually reboot the node for any configuration that requires it. The default value is `$false`. To use this setting when a reboot condition is enacted by something other than DSC (such as Windows Installer), combine this setting with the [xPendingReboot](https://github.com/powershell/xpendingreboot) module.|
86+
| RebootNodeIfNeeded| bool| Set this to `$true` to allow resources to reboot the Node using the `$global:DSCMachineStatus` flag. Otherwise, you will have to manually reboot the node for any configuration that requires it. The default value is `$false`. To use this setting when a reboot condition is enacted by something other than DSC (such as Windows Installer), combine this setting with the __PendingReboot__ resource in the [ComputerManagementDsc](https://github.com/PowerShell/ComputerManagementDsc) module.|
8787
| RefreshMode| string| Specifies how the LCM gets configurations. The possible values are __"Disabled"__, __"Push"__, and __"Pull"__. <ul><li>__Disabled__: DSC configurations are disabled for this node.</li><li> __Push__: Configurations are initiated by calling the [Start-DscConfiguration](/powershell/module/psdesiredstateconfiguration/start-dscconfiguration) cmdlet. The configuration is applied immediately to the node. This is the default value.</li><li>__Pull:__ The node is configured to regularly check for configurations from a pull service or SMB path. If this property is set to __Pull__, you must specify an HTTP (service) or SMB (share) path in a __ConfigurationRepositoryWeb__ or __ConfigurationRepositoryShare__ block.</li></ul>|
8888
| RefreshFrequencyMins| Uint32| The time interval, in minutes, at which the LCM checks a pull service to get updated configurations. This value is ignored if the LCM is not configured in pull mode. The default value is 30.|
8989
| ReportManagers| CimInstance[]| Obsolete. Use __ReportServerWeb__ blocks to define an endpoint to send reporting data to a pull service.|

0 commit comments

Comments
 (0)