Skip to content

Commit 0d58287

Browse files
committed
Auto-fix PSScriptAnalyzer indentation and whitespace issues
1 parent 4606227 commit 0d58287

292 files changed

Lines changed: 25458 additions & 25458 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BlueTeam-Tools/EventLogMonitoring/EventID-Count-AllEvtx-Events.ps1

Lines changed: 355 additions & 355 deletions
Large diffs are not rendered by default.

BlueTeam-Tools/EventLogMonitoring/EventID307-PrintAudit.ps1

Lines changed: 410 additions & 410 deletions
Large diffs are not rendered by default.

BlueTeam-Tools/EventLogMonitoring/EventID4624-ADUserLoginViaRDP.ps1

Lines changed: 350 additions & 350 deletions
Large diffs are not rendered by default.

BlueTeam-Tools/EventLogMonitoring/EventID4624and4634-ADUserLoginTracking.ps1

Lines changed: 353 additions & 353 deletions
Large diffs are not rendered by default.

BlueTeam-Tools/EventLogMonitoring/EventID4625-ADUserLoginAccountFailed.ps1

Lines changed: 343 additions & 343 deletions
Large diffs are not rendered by default.

BlueTeam-Tools/EventLogMonitoring/EventID4648-ExplicitCredentialsLogon.ps1

Lines changed: 343 additions & 343 deletions
Large diffs are not rendered by default.

BlueTeam-Tools/EventLogMonitoring/EventID4663-TrackingObjectDeletions.ps1

Lines changed: 349 additions & 349 deletions
Large diffs are not rendered by default.

BlueTeam-Tools/EventLogMonitoring/EventID4720to4756-PrivilegedAccessTracking.ps1

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<#
1+
<#
22
.SYNOPSIS
33
PowerShell Script for Tracking Privileged Access Events using Log Parser.
44
@@ -202,135 +202,135 @@ function Compile-PrivilegedAccessEvents {
202202

203203
#region GUI Setup
204204
$form = New-Object System.Windows.Forms.Form -Property @{
205-
Text = 'Privileged Access Auditor (Multiple Event IDs)'
206-
Size = [System.Drawing.Size]::new(450, 350)
205+
Text = 'Privileged Access Auditor (Multiple Event IDs)'
206+
Size = [System.Drawing.Size]::new(450, 350)
207207
StartPosition = 'CenterScreen'
208208
FormBorderStyle = 'FixedSingle'
209-
MaximizeBox = $false
209+
MaximizeBox = $false
210210
}
211211

212212
# User Accounts
213213
$labelUsers = New-Object System.Windows.Forms.Label -Property @{
214214
Location = [System.Drawing.Point]::new(10, 20)
215-
Size = [System.Drawing.Size]::new(100, 20)
216-
Text = "User Accounts:"
215+
Size = [System.Drawing.Size]::new(100, 20)
216+
Text = "User Accounts:"
217217
}
218218
$form.Controls.Add($labelUsers)
219219

220220
$textBoxUsers = New-Object System.Windows.Forms.TextBox -Property @{
221221
Location = [System.Drawing.Point]::new(120, 20)
222-
Size = [System.Drawing.Size]::new(320, 60)
222+
Size = [System.Drawing.Size]::new(320, 60)
223223
Multiline = $true
224-
Text = "user01, user02, user03, user04, user05"
224+
Text = "user01, user02, user03, user04, user05"
225225
}
226226
$form.Controls.Add($textBoxUsers)
227227

228228
# Log Directory
229229
$labelLogDir = New-Object System.Windows.Forms.Label -Property @{
230230
Location = [System.Drawing.Point]::new(10, 90)
231-
Size = [System.Drawing.Size]::new(100, 20)
232-
Text = "Log Directory:"
231+
Size = [System.Drawing.Size]::new(100, 20)
232+
Text = "Log Directory:"
233233
}
234234
$form.Controls.Add($labelLogDir)
235235

236236
$textBoxLogDir = New-Object System.Windows.Forms.TextBox -Property @{
237237
Location = [System.Drawing.Point]::new(120, 90)
238-
Size = [System.Drawing.Size]::new(200, 20)
239-
Text = $logDir
238+
Size = [System.Drawing.Size]::new(200, 20)
239+
Text = $logDir
240240
}
241241
$form.Controls.Add($textBoxLogDir)
242242

243243
$buttonBrowseLogDir = New-Object System.Windows.Forms.Button -Property @{
244244
Location = [System.Drawing.Point]::new(330, 90)
245-
Size = [System.Drawing.Size]::new(100, 20)
246-
Text = "Browse"
245+
Size = [System.Drawing.Size]::new(100, 20)
246+
Text = "Browse"
247247
}
248248
$buttonBrowseLogDir.Add_Click({
249-
$folder = Select-Folder
250-
if ($folder) {
251-
$textBoxLogDir.Text = $folder
252-
Write-Log "Log Directory updated to: '$folder' via browse"
253-
}
254-
})
249+
$folder = Select-Folder
250+
if ($folder) {
251+
$textBoxLogDir.Text = $folder
252+
Write-Log "Log Directory updated to: '$folder' via browse"
253+
}
254+
})
255255
$form.Controls.Add($buttonBrowseLogDir)
256256

257257
# Output Folder
258258
$labelOutputDir = New-Object System.Windows.Forms.Label -Property @{
259259
Location = [System.Drawing.Point]::new(10, 120)
260-
Size = [System.Drawing.Size]::new(100, 20)
261-
Text = "Output Folder:"
260+
Size = [System.Drawing.Size]::new(100, 20)
261+
Text = "Output Folder:"
262262
}
263263
$form.Controls.Add($labelOutputDir)
264264

265265
$textBoxOutputDir = New-Object System.Windows.Forms.TextBox -Property @{
266266
Location = [System.Drawing.Point]::new(120, 120)
267-
Size = [System.Drawing.Size]::new(200, 20)
268-
Text = $outputFolderDefault
267+
Size = [System.Drawing.Size]::new(200, 20)
268+
Text = $outputFolderDefault
269269
}
270270
$form.Controls.Add($textBoxOutputDir)
271271

272272
$buttonBrowseOutputDir = New-Object System.Windows.Forms.Button -Property @{
273273
Location = [System.Drawing.Point]::new(330, 120)
274-
Size = [System.Drawing.Size]::new(100, 20)
275-
Text = "Browse"
274+
Size = [System.Drawing.Size]::new(100, 20)
275+
Text = "Browse"
276276
}
277277
$buttonBrowseOutputDir.Add_Click({
278-
$folder = Select-Folder
279-
if ($folder) {
280-
$textBoxOutputDir.Text = $folder
281-
Write-Log "Output Folder updated to: '$folder' via browse"
282-
}
283-
})
278+
$folder = Select-Folder
279+
if ($folder) {
280+
$textBoxOutputDir.Text = $folder
281+
Write-Log "Output Folder updated to: '$folder' via browse"
282+
}
283+
})
284284
$form.Controls.Add($buttonBrowseOutputDir)
285285

286286
# Status Label
287287
$labelStatus = New-Object System.Windows.Forms.Label -Property @{
288288
Location = [System.Drawing.Point]::new(10, 180)
289-
Size = [System.Drawing.Size]::new(430, 20)
290-
Text = "Ready"
289+
Size = [System.Drawing.Size]::new(430, 20)
290+
Text = "Ready"
291291
}
292292
$form.Controls.Add($labelStatus)
293293

294294
# Progress Bar
295295
$progressBar = New-Object System.Windows.Forms.ProgressBar -Property @{
296296
Location = [System.Drawing.Point]::new(10, 210)
297-
Size = [System.Drawing.Size]::new(430, 20)
297+
Size = [System.Drawing.Size]::new(430, 20)
298298
}
299299
$form.Controls.Add($progressBar)
300300

301301
# Start Button
302302
$button = New-Object System.Windows.Forms.Button -Property @{
303303
Location = [System.Drawing.Point]::new(10, 240)
304-
Size = [System.Drawing.Size]::new(100, 30)
305-
Text = 'Start Analysis'
304+
Size = [System.Drawing.Size]::new(100, 30)
305+
Text = 'Start Analysis'
306306
}
307307
$button.Add_Click({
308-
$script:logDir = $textBoxLogDir.Text
309-
$script:logPath = Join-Path $script:logDir "${scriptName}.log"
310-
$outputFolder = $textBoxOutputDir.Text
308+
$script:logDir = $textBoxLogDir.Text
309+
$script:logPath = Join-Path $script:logDir "${scriptName}.log"
310+
$outputFolder = $textBoxOutputDir.Text
311311

312-
if (-not (Test-Path $script:logDir)) {
313-
New-Item -Path $script:logDir -ItemType Directory -Force | Out-Null
314-
}
312+
if (-not (Test-Path $script:logDir)) {
313+
New-Item -Path $script:logDir -ItemType Directory -Force | Out-Null
314+
}
315315

316-
$userAccounts = if ($textBoxUsers.Text) { $textBoxUsers.Text -split ',\s*' | ForEach-Object { $_.Trim() } } else { @() }
316+
$userAccounts = if ($textBoxUsers.Text) { $textBoxUsers.Text -split ',\s*' | ForEach-Object { $_.Trim() } } else { @() }
317317

318-
Write-Log "Analysis started by user (Users: $($userAccounts -join ', '))"
319-
$script:labelStatus.Text = "Selecting folder..."
320-
$script:form.Refresh()
318+
Write-Log "Analysis started by user (Users: $($userAccounts -join ', '))"
319+
$script:labelStatus.Text = "Selecting folder..."
320+
$script:form.Refresh()
321321

322-
$evtxFolder = Select-Folder
323-
if (-not $evtxFolder) {
324-
Show-MessageBox -Message "No folder selected." -Title "Input Required" -Icon Warning
325-
$script:labelStatus.Text = "Ready"
326-
return
327-
}
322+
$evtxFolder = Select-Folder
323+
if (-not $evtxFolder) {
324+
Show-MessageBox -Message "No folder selected." -Title "Input Required" -Icon Warning
325+
$script:labelStatus.Text = "Ready"
326+
return
327+
}
328328

329-
$script:labelStatus.Text = "Processing files in '$evtxFolder'..."
330-
$script:form.Refresh()
329+
$script:labelStatus.Text = "Processing files in '$evtxFolder'..."
330+
$script:form.Refresh()
331331

332-
Compile-PrivilegedAccessEvents -LogFolderPath $evtxFolder -OutputFolder $outputFolder -UserAccounts $userAccounts
333-
})
332+
Compile-PrivilegedAccessEvents -LogFolderPath $evtxFolder -OutputFolder $outputFolder -UserAccounts $userAccounts
333+
})
334334
$form.Controls.Add($button)
335335

336336
# Script scope variables

0 commit comments

Comments
 (0)