# Apply DSC Config (Push) with reboot required. Output?

**URL:** <https://forums.powershell.org/t/apply-dsc-config-push-with-reboot-required-output/11134>\
**Category:** DSC\
**Created:** [August 14, 2018, 1:00pm UTC](https://forums.powershell.org/t/apply-dsc-config-push-with-reboot-required-output/11134 "2018-08-14T13:00:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![motogod](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@motogod](https://forums.powershell.org/u/motogod)\
**Post date:** [August 14, 2018, 1:00pm UTC](https://forums.powershell.org/t/apply-dsc-config-push-with-reboot-required-output/11134/1 "2018-08-14T13:00:04Z")

</div>

So I’m working on a PS Script to stand up new servers in our department. That is working great so far!

My question is this. When applying a DSC Config (via Push) and it requires the box to restart, is there anyway to make the PS script sit there and wait, and reconnect to show me the rest of the output? It seems after the reboot, the config automagically kicks in again, so that’s not the problem. The problem is there can be no “I’m Done!” message to the person running the script if the reboot kicks off, and it does the rest under the covers.

Anyone have a solution for this?

The config is being kicked off as follows:

Start-DscConfiguration -ComputerName $ScriptComputerName -Path $configurationLocation -Wait -Force -Verbose

---

<div class="post-metadata">

**Author:** ![kvprasoon](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/kvprasoon/32/4449_2.png) [@kvprasoon](https://forums.powershell.org/u/kvprasoon)\
**Post date:** [August 15, 2018, 3:43pm UTC](https://forums.powershell.org/t/apply-dsc-config-push-with-reboot-required-output/11134/2 "2018-08-15T15:43:04Z")

</div>

You can use the DSC analytic logs to get the status.

you will have to enable it in the target system.

```
wevtutil.exe set-log “Microsoft-Windows-Dsc/Analytic” /q:True /e:true
```

once enabled, you can query it using Get-WinEvent cmdlet.

```
Get-WinEvent-ComputerName DestServerA “Microsoft-Windows-Dsc/Analytic” -Oldest
```

The message property is as is what is printing in the console.

---

<div class="post-metadata">

**Author:** ![motogod](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@motogod](https://forums.powershell.org/u/motogod)\
**Post date:** [August 24, 2018, 6:59am UTC](https://forums.powershell.org/t/apply-dsc-config-push-with-reboot-required-output/11134/3 "2018-08-24T06:59:20Z")

</div>

I ended up adding a SendEmail DSC Resource to just send out an email message when the config was complete. This seems to be doing the trick for the moment, but I’ll definitely look into this as well. Thanks!

---

<div class="post-metadata">

**Author:** ![wsmelton](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/wsmelton/32/297_2.png) [@wsmelton](https://forums.powershell.org/u/wsmelton)\
**Post date:** [August 24, 2018, 8:36am UTC](https://forums.powershell.org/t/apply-dsc-config-push-with-reboot-required-output/11134/4 "2018-08-24T08:36:01Z")

</div>

A one off possibility…

When the compute restarts being doing a `Test-NetConnection` until the serve comes back online. When the computer comes back online you can then do a `Test-DscConfiguration` to verify the server is compliant with your configuration. This will give a bit cleaner output than trying to pull the event logs.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 9:16pm UTC](https://forums.powershell.org/t/apply-dsc-config-push-with-reboot-required-output/11134/5 "2024-05-16T21:16:27Z")

</div>

Closed on May 16, 2024, 9:16pm UTC


