@@ -121,68 +121,236 @@ foreach ($SingleLine in $AuthLogCopyContent) {
121121# print out the user creation activity
122122if ($useradd_Count -ge 1 ) {
123123Write-Output " "
124- Write-Output " New User Creation Activity"
125- Write-Output " +------------------------+"
126- $UsersGroupActivity_HT [" useradd" ]
124+ Write-Output " New User Creation Activity - Raw Events"
125+
126+ # variable to cretae the amount of spaces needed for the table
127+ $MaxLength = ($UsersGroupActivity_HT [" useradd" ] | Measure-Object Length - Maximum).Maximum
128+
129+ # variable to stor the new amount of hyfens
130+ $Border = ' -' * $MaxLength
131+
132+ # foreach loop to iterate and past each event seperate from the hashtable
133+ foreach ($Event in $UsersGroupActivity_HT [" useradd" ]) {
134+
135+ # add space to the right of each event iteration
136+ $Event = $Event.PadRight ($MaxLength )
137+
138+ # print start\middle border
139+ Write-Output " +$Border +"
140+
141+ # print each event
142+ Write-Output " |$Event |"
143+
144+ }
145+
146+ # print last border
147+ Write-Output " +$Border +"
127148}
128149
129150# print out the user deletion activity
130151if ($userdel_Count -ge 1 ) {
131152Write-Output " "
132- Write-Output " User Deletion Activity"
133- Write-Output " +--------------------+"
134- $UsersGroupActivity_HT [" userdel" ]
153+ Write-Output " User Deletion Activity - Raw Events"
154+
155+ # variable to cretae the amount of spaces needed for the table
156+ $MaxLength = ($UsersGroupActivity_HT [" userdel" ] | Measure-Object Length - Maximum).Maximum
157+
158+ # variable to stor the new amount of hyfens
159+ $Border = ' -' * $MaxLength
160+
161+ # foreach loop to iterate and past each event seperate from the hashtable
162+ foreach ($Event in $UsersGroupActivity_HT [" userdel" ]) {
163+
164+ # add space to the right of each event iteration
165+ $Event = $Event.PadRight ($MaxLength )
166+
167+ # print start\middle border
168+ Write-Output " +$Border +"
169+
170+ # print each event
171+ Write-Output " |$Event |"
172+
173+ }
174+
175+ # print last border
176+ Write-Output " +$Border +"
135177}
136178
137179# print out the user Password Change Activity
138180if ($ChangePassword_Count -ge 1 ) {
139181Write-Output " "
140- Write-Output " User Password Change Activity"
141- Write-Output " +---------------------------+"
142- $UsersGroupActivity_HT [" ChangePassword" ]
182+ Write-Output " User Password Change Activity - Raw Events"
183+
184+ # variable to cretae the amount of spaces needed for the table
185+ $MaxLength = ($UsersGroupActivity_HT [" ChangePassword" ] | Measure-Object Length - Maximum).Maximum
186+
187+ # variable to stor the new amount of hyfens
188+ $Border = ' -' * $MaxLength
189+
190+ # foreach loop to iterate and past each event seperate from the hashtable
191+ foreach ($Event in $UsersGroupActivity_HT [" ChangePassword" ]) {
192+
193+ # add space to the right of each event iteration
194+ $Event = $Event.PadRight ($MaxLength )
195+
196+ # print start\middle border
197+ Write-Output " +$Border +"
198+
199+ # print each event
200+ Write-Output " |$Event |"
201+
202+ }
203+
204+ # print last border
205+ Write-Output " +$Border +"
143206}
144207
145208# print out the group creation
146209if ($groupadd_Count -ge 1 ) {
147210Write-Output " "
148- Write-Output " New Group Creation Activity"
149- Write-Output " +-------------------------+"
150- $UsersGroupActivity_HT [" groupadd" ]
211+ Write-Output " New Group Creation Activity - Raw Events"
212+
213+ # variable to cretae the amount of spaces needed for the table
214+ $MaxLength = ($UsersGroupActivity_HT [" groupadd" ] | Measure-Object Length - Maximum).Maximum
215+
216+ # variable to stor the new amount of hyfens
217+ $Border = ' -' * $MaxLength
218+
219+ # foreach loop to iterate and past each event seperate from the hashtable
220+ foreach ($Event in $UsersGroupActivity_HT [" groupadd" ]) {
221+
222+ # add space to the right of each event iteration
223+ $Event = $Event.PadRight ($MaxLength )
224+
225+ # print start\middle border
226+ Write-Output " +$Border +"
227+
228+ # print each event
229+ Write-Output " |$Event |"
230+
231+ }
232+
233+ # print last border
234+ Write-Output " +$Border +"
151235}
152236
153237# print out the group deletion
154238if ($groudel_Count -ge 1 ) {
155239Write-Output " "
156- Write-Output " Group Deletion Activity"
157- Write-Output " +---------------------+"
158- $UsersGroupActivity_HT [" groudel" ]
240+ Write-Output " Group Deletion Activity - Raw Events"
241+
242+ # variable to cretae the amount of spaces needed for the table
243+ $MaxLength = ($UsersGroupActivity_HT [" groudel" ] | Measure-Object Length - Maximum).Maximum
244+
245+ # variable to stor the new amount of hyfens
246+ $Border = ' -' * $MaxLength
247+
248+ # foreach loop to iterate and past each event seperate from the hashtable
249+ foreach ($Event in $UsersGroupActivity_HT [" groudel" ]) {
250+
251+ # add space to the right of each event iteration
252+ $Event = $Event.PadRight ($MaxLength )
253+
254+ # print start\middle border
255+ Write-Output " +$Border +"
256+
257+ # print each event
258+ Write-Output " |$Event |"
259+
260+ }
261+
262+ # print last border
263+ Write-Output " +$Border +"
159264}
160265
161266# print out the add user to group activity
162267if ($AddUserToGroup_Count -ge 1 ) {
163268Write-Output " "
164- Write-Output " User Added To A Group Activity"
165- Write-Output " +----------------------------+"
166- $UsersGroupActivity_HT [" AddUserToGroup" ]
269+ Write-Output " User Added To A Group Activity - Raw Events"
270+
271+ # variable to cretae the amount of spaces needed for the table
272+ $MaxLength = ($UsersGroupActivity_HT [" AddUserToGroup" ] | Measure-Object Length - Maximum).Maximum
273+
274+ # variable to stor the new amount of hyfens
275+ $Border = ' -' * $MaxLength
276+
277+ # foreach loop to iterate and past each event seperate from the hashtable
278+ foreach ($Event in $UsersGroupActivity_HT [" AddUserToGroup" ]) {
279+
280+ # add space to the right of each event iteration
281+ $Event = $Event.PadRight ($MaxLength )
282+
283+ # print start\middle border
284+ Write-Output " +$Border +"
285+
286+ # print each event
287+ Write-Output " |$Event |"
288+
289+ }
290+
291+ # print last border
292+ Write-Output " +$Border +"
167293}
168294
169295# print out the remove user from group activity
170296if ($RemoveUserFromGroup_Count -ge 1 ) {
171- Write-Output " "
172- Write-Output " User Removed From A Group Activity"
173- Write-Output " +--------------------------------+"
174- $UsersGroupActivity_HT [" RemoveUserFromGroup" ]
297+ Write-Output " "
298+ Write-Output " User Removed From A Group Activity - Raw Events"
299+
300+ # variable to cretae the amount of spaces needed for the table
301+ $MaxLength = ($UsersGroupActivity_HT [" RemoveUserFromGroup" ] | Measure-Object Length - Maximum).Maximum
302+
303+ # variable to stor the new amount of hyfens
304+ $Border = ' -' * $MaxLength
305+
306+ # foreach loop to iterate and past each event seperate from the hashtable
307+ foreach ($Event in $UsersGroupActivity_HT [" RemoveUserFromGroup" ]) {
308+
309+ # add space to the right of each event iteration
310+ $Event = $Event.PadRight ($MaxLength )
311+
312+ # print start\middle border
313+ Write-Output " +$Border +"
314+
315+ # print each event
316+ Write-Output " |$Event |"
317+
318+ }
319+
320+ # print last border
321+ Write-Output " +$Border +"
175322}
176323
177324# print out the user information change
178325if ($UserInformationChange_Count -ge 1 ) {
179326Write-Output " "
180- Write-Output " User Information Change"
181- Write-Output " +---------------------+"
182- $UsersGroupActivity_HT [" UserInformationChange" ]
327+ Write-Output " User Information Change - Raw Events"
328+
329+ # variable to cretae the amount of spaces needed for the table
330+ $MaxLength = ($UsersGroupActivity_HT [" UserInformationChange" ] | Measure-Object Length - Maximum).Maximum
331+
332+ # variable to stor the new amount of hyfens
333+ $Border = ' -' * $MaxLength
334+
335+ # foreach loop to iterate and past each event seperate from the hashtable
336+ foreach ($Event in $UsersGroupActivity_HT [" UserInformationChange" ]) {
337+
338+ # add space to the right of each event iteration
339+ $Event = $Event.PadRight ($MaxLength )
340+
341+ # print start\middle border
342+ Write-Output " +$Border +"
343+
344+ # print each event
345+ Write-Output " |$Event |"
346+
347+ }
348+
349+ # print last border
350+ Write-Output " +$Border +"
183351}
184352
185- # reset
353+ # reset variables
186354$useradd_Count = $null
187355$userdel_Count = $null
188356$ChangePassword_Count = $null
0 commit comments