Enumerating the logged on user when running as system with Azure AD/Entra joined devices
Sometimes when running scripts in the system context with Intune we need to query the local user, whether that is the registry, or the local drive (Requirements scripts, detection scripts where you can’t switch to current user are a good example) Using the environment variables won’t work at the system level as it will just … Read more