Variable "$CurrentLoggedOnUserSession.IsUserSession" is NULL with Intune

Not known yet as per Issues · PSAppDeployToolkit/PSAppDeployToolkit · GitHub

At work we don’t have InTune yet so I cannot try to reproduce.

Tip: When posting code, please format it with </> to make it more readable. It makes people more likely to try/read it.

EDIT: you now have company: PSADT and Windows Active Hours