I'm getting a list of SID numbers using $list = gwmi win32_userprofile | ft localpath, sid -a and I want to split each line of the output ($list) into a separate variable. I can't figure out how to do this - any suggestions on the most efficient way? An array? If so, how?
The purpose of this is to then further filter the output to display only SID's that start with S-1-5-21-*, and then assign numbers to each resulting line, allowing the user to select a user SID for domain migration by typing a number.