PSADT and Windows Active Hours

We are in the process of moving to Endpoint Manager (Autopilot/Intune). Of course, unlike with SCCM, there is no option to “install only with user logged out”. Has anyone utilized machine Active Hours settings in a PSADT script? Would appreciate any guidance/tips. Thanks.

Please see other post Variable "$CurrentLoggedOnUserSession.IsUserSession" is NULL with Intune

and try to use $CurrentLoggedOnUserSession.IsUserSession

If it works for you, you solve YOUR problem and help out for HIS problem
If it fails, you help out for HIS problem and we have a new bug to report (I’ll report it if needed)

Ok. Will try. Thanks.