Get List of User Profile Folders (PoSH)

The following snippet of PowerShell will collect the list of profiles active on a system from the registry and populate an array. I remove any profile folder that does not exist, as well as any that are within the Windows folder (e.g. NetworkService, LocalSystem), but you can modify as you see fit if that doesn’t …