Intune has no native maintenance window for Win32 app installs or Remediations, so work can land in the middle of someone’s workday.
This detection script adds a maintenance-window check: outside the window it reports “not applicable” so nothing installs, and inside the window the deployment proceeds as normal. Drop it in as the detection half of a Win32 app or a Remediation to keep installs inside approved hours.