Get a list of deleted profiles

(it, exists folder of (it)) of (folders ((expand environment string of preceding text of last "%00" of (it as string)) of (values "ProfileImagePath" whose ((it as string) does not end with "\systemprofile%00" ) of keys whose (exists value "sid" of it) of key "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\ProfileList" of registry)))

the exists folder of it should tell us if the folder exists. If the folder doesn’t exists then the profile would have been deleted. I’m not sure if that is what your trying to do or not though.

they did something similar to this on this post that made me think to do it this way
Using a folder wildcard - Content Authoring - BigFix Forum

1 Like