title: Configure a DSC Resource to restart
body: <p>I have a DSC resource that installs dotnet feature and then installs an update to dotnet.</p>
  
  <p>In the Local Configuration Manager I have set <code>RebootNodeIfNeeded</code> to <code>$true</code>.</p>
  
  <p>After dotnet installs, it does not request a reboot (even used xPendingReboot module to confirm this).</p>
  
  <pre class="lang-ps1 prettyprint-override"><code>Configuration WebServer
  {
  WindowsFeature NetFramework45Core
  {
      Name = "Net-Framework-45-Core"
      Ensure = "Present"
  }
  
  xPendingReboot Reboot
  {
      Name = "Prior to upgrading Dotnet4.5.2"
  }
  
  cChocoPackageInstaller InstallDotNet452
  {
      name = "dotnet4.5.2"
  }
  
  }
  </code></pre>
  
  <p>This is a problem as dotnet doesn't work properly with our app unless the server has been rebooted and we are trying to make these reboots happen automatically no user input required.</p>
  
  <p>Is there any way to make a resource push to the localdscmanager (LCM) that it needs a reboot when there's something being installed?</p>
  
  <p>I have found the below command</p>
  
  <pre class="lang-ps1 prettyprint-override"><code> $global:DSCMachineStatus = 1 
  </code></pre>
  
  <p>Which sets a reboot. but I'm unsure as to how to use it to reboot right after the 4.5 module is installed.</p>