My apologies if this is a bit convoluted for my first post here but I’m at my wits end on this. I have a script which audits certain groups within a trusted domain for membership changes, adds, removes and the dates associated. For some group members who are cross domains I’m obviously getting the sid in place of the account name. I’m needing a way to translate these sids and keep the formatting provided in the script as this is for non-technical auditing types. My code is below and followed by this is the report formatting:
S-1-5-21-1565465683-344022488-928725530-11781,03/05/2018 17:44:55 - needs translation
User Numberone ,11/03/2017 09:12:44
S-1-5-21-1565465683-344022488-928725530-339742,06/11/2018 16:47:29 - needs translation
S-1-5-21-1565465683-344022488-928725530-402282,06/01/2018 15:27:08 - " "
S-1-5-21-1565465683-344022488-928725530-84525,04/23/2018 10:17:04 - " "