This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| & { param($excludeLogs) $d = Get-Date -Format "yyyy-MM-dd-HH-mm"; $zipPath = "D:\_audit\logs\Foo-$d.zip"; $errorLog = "D:\_audit\logs\ErrorLog-$d.txt"; $logDir = "D:\_audit\logs\Foo-$d"; $null = New-Item -ItemType Directory -Force -Path $logDir; $counter = 0; $total = (wevtutil.exe el).Count; wevtutil.exe el | ForEach-Object { $counter++; if ($Host.UI.RawUI) { Write-Progress -Activity "Processing Event Logs" -Status "$_ Processing" -PercentComplete (($counter / $total) * 100); } $time = Measure-Command { if ($_ -notin $excludeLogs) { try { $log = Get-WinEvent -LogName $_ -MaxEvents 1 -Oldest -ErrorAction SilentlyContinue; } catch { $_ >> $errorLog; continue } if ($log) { $logPath = "$logDir\$d-$($_.Replace('/', '-'))-bk.evtx"; Remove-Item -Path $logPath -ErrorAction SilentlyContinue; try { $exportResult = wevtutil.exe epl "$_" $logPath 2>&1; if ($LASTEXITCODE -eq 0) { try { Compress-Archive -Path $logPath -DestinationPath $zipPath -Update -CompressionLevel Optimal; } catch { $_ >> $errorLog; continue }; try |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|  | |
| You | |
| how to make a command to run from a windows terminal with powershell core 7.x so that I can do \`gitreplace <file\_path>\` and it have it go to the file and ultimately be running something like \` curl -L -o "ROADMAP.md" "https://raw.githubusercontent.com/{user}/{repo}/{branch}/ROADMAP.md"\` where the values for \`{user}\` and so on, are discern from git or the folders and file directly around the file(ie: the repo the file belongs to). I am surprised this is not already baked in .. is there an already done solution out there ? other ways please proceed | |
| ChatGPT | |
| ChatGPT |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 3 columns, instead of 1 in line 1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Contact point, Status, Email | |
| jkuzik@cityoflewiston.org | |
| jklone@cityoflewiston.org | |
| ghill@cityoflewiston.org | |
| MayorJohnson@cityoflewiston.org | |
| invinfo@isp.idaho.gov | |
| Richard.Adamson@isp.idaho.gov | |
| regs@fdic.gov | |
| asbpolicy@fdic.gov | |
| ombudsman@fdic.gov |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| As if! |
OlderNewer