@symbeon/orbit-devops 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/.agent/skills/orbit-devops/SKILL.md +54 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +44 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.md +33 -0
  4. package/.github/PULL_REQUEST_TEMPLATE.md +51 -0
  5. package/.github/dependabot.yml +64 -0
  6. package/ARCHITECTURE.json +98 -0
  7. package/AdditionalCleanup.ps1 +70 -0
  8. package/AnalyzeCursor.ps1 +25 -0
  9. package/AppDataAudit.ps1 +16 -0
  10. package/CHANGELOG.md +83 -0
  11. package/CONFIG_LOG.md +35 -0
  12. package/CONTRIBUTING.md +203 -0
  13. package/CategorizedScan.ps1 +37 -0
  14. package/CategorizedScan_v2.ps1 +38 -0
  15. package/CheckAnaconda.ps1 +9 -0
  16. package/CheckAppData.ps1 +8 -0
  17. package/CheckAppDataRoaming.ps1 +8 -0
  18. package/CheckBackupSizes.ps1 +17 -0
  19. package/CheckCacheSize.ps1 +17 -0
  20. package/CheckNodeModules.ps1 +17 -0
  21. package/CheckSpace.ps1 +2 -0
  22. package/CheckTargetSizes.ps1 +17 -0
  23. package/CheckUserRoot.ps1 +10 -0
  24. package/DeepStorageAnalysis.ps1 +76 -0
  25. package/DetailedBloatAudit.ps1 +55 -0
  26. package/DetailedBloatAudit_v3.ps1 +50 -0
  27. package/DetailedProcessAudit.ps1 +43 -0
  28. package/DiagnosticoSistema.ps1 +155 -0
  29. package/ExecuteCleanup.ps1 +73 -0
  30. package/ExecuteTotalCleanup.ps1 +86 -0
  31. package/FinalCategorizedReport.ps1 +49 -0
  32. package/FinalDeepDive.ps1 +34 -0
  33. package/ForcePush.ps1 +31 -0
  34. package/ForensicRAMAudit.ps1 +26 -0
  35. package/ForensicRAMAudit_UTF8.ps1 +32 -0
  36. package/ForensicRAMAudit_v2.ps1 +25 -0
  37. package/ForensicRAMAudit_v3.ps1 +25 -0
  38. package/FullRAMReport_Local.txt +0 -0
  39. package/FullRAMReport_UTF8.txt +1400 -0
  40. package/GiantHunt.ps1 +26 -0
  41. package/GlobalRAMAudit.ps1 +57 -0
  42. package/LICENSE +21 -0
  43. package/MeasureSuspects.ps1 +17 -0
  44. package/NEXT_STEPS.md +35 -0
  45. package/Orbit.ps1 +40 -0
  46. package/PostRebootCleanup.ps1 +60 -0
  47. package/RAMAudit.ps1 +41 -0
  48. package/RAMAudit_v2.ps1 +24 -0
  49. package/README.md +58 -0
  50. package/RootAudit.ps1 +14 -0
  51. package/RunDiagnostic.ps1 +119 -0
  52. package/RunDiagnosticSimple.ps1 +42 -0
  53. package/SECURITY.md +67 -0
  54. package/SETUP.md +34 -0
  55. package/SafeSurgery.ps1 +69 -0
  56. package/ScanPrograms.ps1 +13 -0
  57. package/ScanRepoWaste.ps1 +45 -0
  58. package/ScanStorage.ps1 +41 -0
  59. package/ScanTargets.ps1 +39 -0
  60. package/SimpleSurgicalAudit.ps1 +22 -0
  61. package/SurgicalBloatAudit.ps1 +35 -0
  62. package/SurgicalScan.ps1 +28 -0
  63. package/SystemDiagnostic.ps1 +588 -0
  64. package/SystemDiagnosticSimple.ps1 +141 -0
  65. package/SystemDiagnosticUser.ps1 +92 -0
  66. package/SystemDiagnosticUser_v2.ps1 +36 -0
  67. package/UserAudit.ps1 +23 -0
  68. package/bin/orbit.js +99 -0
  69. package/check_environment.ps1 +104 -0
  70. package/deep_downloads_org_log.txt +15 -0
  71. package/diagnostic_error.txt +83 -0
  72. package/diskpart_log.txt +0 -0
  73. package/docs/DEPRECATED_USERNAME_CHANGE.md +138 -0
  74. package/docs/PROJECT_STRUCTURE.md +156 -0
  75. package/downloads_audit.txt +32 -0
  76. package/downloads_audit_clear.txt +27 -0
  77. package/downloads_org_log.txt +85 -0
  78. package/mcp/README.md +61 -0
  79. package/mcp/server.py +109 -0
  80. package/package.json +39 -0
  81. package/scripts/mac/diagnostic.sh +46 -0
  82. package/scripts/stack/Push-Stack.ps1 +41 -0
  83. package/scripts/stack/SnapshotEnv.ps1 +22 -0
  84. package/scripts/utils/DeepOrganizeDownloads.ps1 +82 -0
  85. package/scripts/utils/OrganizeDownloads.ps1 +40 -0
  86. package/scripts/wsl/CompactWSL.ps1 +60 -0
  87. package/setup_environment.ps1 +59 -0
  88. package/sizes.txt +6 -0
  89. package/verify_environment.ps1 +46 -0
@@ -0,0 +1,155 @@
1
+ # Diagnóstico do Sistema Windows
2
+ # Versão: 1.0
3
+
4
+ # Verificar se está rodando como administrador
5
+ $isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
6
+
7
+ if (-not $isAdmin) {
8
+ Write-Host "Elevando privilégios para administrador..." -ForegroundColor Yellow
9
+ Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs
10
+ exit
11
+ }
12
+
13
+ # Configuração de codificação
14
+ $null = cmd /c chcp 65001
15
+ [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
16
+ [Console]::InputEncoding = [System.Text.Encoding]::UTF8
17
+ $OutputEncoding = [System.Text.Encoding]::UTF8
18
+
19
+ # Configuração do relatório
20
+ $timestamp = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
21
+ $reportPath = Join-Path ([Environment]::GetFolderPath("Desktop")) "diagnostico_sistema_$timestamp.txt"
22
+
23
+ # Função para escrever log
24
+ function Write-Log {
25
+ param(
26
+ [string]$Message,
27
+ [string]$Type = "INFO"
28
+ )
29
+
30
+ $time = Get-Date -Format "HH:mm:ss"
31
+ $line = "[$time] [$Type] $Message"
32
+
33
+ # Escrever no arquivo
34
+ try {
35
+ Add-Content -Path $reportPath -Value $line -Encoding UTF8
36
+ }
37
+ catch {
38
+ Write-Warning "Erro ao escrever no arquivo: $_"
39
+ }
40
+
41
+ # Mostrar na tela com cores
42
+ switch ($Type) {
43
+ "ERRO" { Write-Host $line -ForegroundColor Red }
44
+ "AVISO" { Write-Host $line -ForegroundColor Yellow }
45
+ "SUCESSO" { Write-Host $line -ForegroundColor Green }
46
+ default { Write-Host $line }
47
+ }
48
+ }
49
+
50
+ # Início do diagnóstico
51
+ Clear-Host
52
+ Write-Log "Iniciando diagnóstico do sistema" -Type "SUCESSO"
53
+ Write-Log "Relatório será salvo em: $reportPath" -Type "INFO"
54
+
55
+ # 1. Sistema Operacional
56
+ Write-Log "`nVerificando Sistema Operacional..." -Type "INFO"
57
+ try {
58
+ $os = Get-CimInstance Win32_OperatingSystem
59
+ Write-Log "Sistema: $($os.Caption)" -Type "SUCESSO"
60
+ Write-Log "Versão: $($os.Version)" -Type "SUCESSO"
61
+ Write-Log "Arquitetura: $($os.OSArchitecture)" -Type "SUCESSO"
62
+ Write-Log "Último Boot: $($os.LastBootUpTime)" -Type "SUCESSO"
63
+ }
64
+ catch {
65
+ Write-Log "Erro ao verificar sistema operacional: $_" -Type "ERRO"
66
+ }
67
+
68
+ # 2. Hardware
69
+ Write-Log "`nVerificando Hardware..." -Type "INFO"
70
+ try {
71
+ # CPU
72
+ $cpu = Get-CimInstance Win32_Processor
73
+ Write-Log "Processador: $($cpu.Name)" -Type "SUCESSO"
74
+ Write-Log "Núcleos Físicos: $($cpu.NumberOfCores)" -Type "SUCESSO"
75
+ Write-Log "Threads: $($cpu.NumberOfLogicalProcessors)" -Type "SUCESSO"
76
+
77
+ # Memória
78
+ $totalMemory = (Get-CimInstance Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum).Sum
79
+ $availableMemory = (Get-CimInstance Win32_OperatingSystem).FreePhysicalMemory * 1KB
80
+ $totalMemoryGB = [math]::Round($totalMemory / 1GB, 2)
81
+ $availableMemoryGB = [math]::Round($availableMemory / 1GB, 2)
82
+ $usedMemoryPercent = [math]::Round(($totalMemory - $availableMemory) / $totalMemory * 100, 2)
83
+
84
+ Write-Log "`nMemória RAM:" -Type "SUCESSO"
85
+ Write-Log "Total: $totalMemoryGB GB" -Type "INFO"
86
+ Write-Log "Disponível: $availableMemoryGB GB" -Type "INFO"
87
+ Write-Log "Em uso: $usedMemoryPercent%" -Type $(if ($usedMemoryPercent -gt 80) { "AVISO" } else { "INFO" })
88
+ }
89
+ catch {
90
+ Write-Log "Erro ao verificar hardware: $_" -Type "ERRO"
91
+ }
92
+
93
+ # 3. Discos
94
+ Write-Log "`nVerificando Discos..." -Type "INFO"
95
+ try {
96
+ Get-Volume | Where-Object { $_.DriveLetter } | ForEach-Object {
97
+ $free = [math]::Round($_.SizeRemaining / 1GB, 2)
98
+ $total = [math]::Round($_.Size / 1GB, 2)
99
+ $used = [math]::Round(100 - ($_.SizeRemaining / $_.Size * 100), 2)
100
+
101
+ Write-Log "Drive $($_.DriveLetter):" -Type "SUCESSO"
102
+ Write-Log " Total: $total GB" -Type "INFO"
103
+ Write-Log " Livre: $free GB" -Type "INFO"
104
+ Write-Log " Uso: $used%" -Type $(if ($used -gt 90) { "AVISO" } else { "INFO" })
105
+ }
106
+ }
107
+ catch {
108
+ Write-Log "Erro ao verificar discos: $_" -Type "ERRO"
109
+ }
110
+
111
+ # 4. Serviços Críticos
112
+ Write-Log "`nVerificando Serviços Críticos..." -Type "INFO"
113
+ $servicosCriticos = @(
114
+ "wuauserv" # Windows Update
115
+ "WinDefend" # Windows Defender
116
+ "wscsvc" # Security Center
117
+ "RpcSs" # Remote Procedure Call
118
+ "EventLog" # Event Log
119
+ )
120
+
121
+ foreach ($servico in $servicosCriticos) {
122
+ try {
123
+ $status = Get-Service -Name $servico -ErrorAction Stop
124
+ Write-Log "$($status.DisplayName): $($status.Status)" -Type $(
125
+ if ($status.Status -eq "Running") { "SUCESSO" }
126
+ else { "AVISO" }
127
+ )
128
+ }
129
+ catch {
130
+ Write-Log "Erro ao verificar serviço $servico" -Type "ERRO"
131
+ }
132
+ }
133
+
134
+ # 5. Finalização
135
+ Write-Log "`nDiagnóstico concluído" -Type "SUCESSO"
136
+
137
+ # Verificar se o relatório foi gerado
138
+ if (Test-Path $reportPath) {
139
+ $fileInfo = Get-Item $reportPath
140
+ Write-Log "`nRelatório gerado com sucesso:" -Type "SUCESSO"
141
+ Write-Log "Caminho: $($fileInfo.FullName)" -Type "INFO"
142
+ Write-Log "Tamanho: $([math]::Round($fileInfo.Length/1KB, 2)) KB" -Type "INFO"
143
+
144
+ # Tentar abrir o relatório
145
+ try {
146
+ Invoke-Item $reportPath
147
+ }
148
+ catch {
149
+ Write-Log "Não foi possível abrir o relatório automaticamente" -Type "AVISO"
150
+ }
151
+ }
152
+
153
+ Write-Host "`nPressione qualquer tecla para sair..." -ForegroundColor Yellow
154
+ $null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
155
+
@@ -0,0 +1,73 @@
1
+ $ErrorActionPreference = "SilentlyContinue"
2
+ $logPath = "$env:USERPROFILE\Desktop\DIAGNOSTIC_BACKUP\CLEANUP_LOG.txt"
3
+
4
+ function Write-Log {
5
+ param($Message)
6
+ $line = "[$(Get-Date -Format 'HH:mm:ss')] $Message"
7
+ Write-Host $line -ForegroundColor Cyan
8
+ $line | Out-File -FilePath $logPath -Append -Encoding utf8
9
+ }
10
+
11
+ Write-Log "=== STARTING CLEANUP PROCESS ==="
12
+
13
+ # 1. Cursor Backup
14
+ $cursorBackup = "$env:USERPROFILE\AppData\Roaming\Cursor\User\globalStorage\state.vscdb.backup"
15
+ if (Test-Path $cursorBackup) {
16
+ Write-Log "Removing Cursor Backup: $cursorBackup"
17
+ try {
18
+ $item = Get-Item $cursorBackup
19
+ $sizeGB = [math]::Round($item.Length / 1GB, 2)
20
+ Remove-Item $cursorBackup -Force -ErrorAction Stop
21
+ Write-Log "SUCCESS: Removed $sizeGB GB from Cursor backup."
22
+ }
23
+ catch {
24
+ Write-Log "ERROR: Could not remove Cursor backup: $_"
25
+ }
26
+ }
27
+ else {
28
+ Write-Log "INFO: Cursor backup file not found."
29
+ }
30
+
31
+ # 2. Docker Prune
32
+ Write-Log "Running Docker System Prune..."
33
+ if (Get-Command docker -ErrorAction SilentlyContinue) {
34
+ try {
35
+ # Prune stopped containers, networks, and dangling images
36
+ # We capture the output to log it
37
+ $output = docker system prune -f 2>&1
38
+ Write-Log "Docker Prune Output:"
39
+ $output | ForEach-Object { Write-Log " $_" }
40
+ }
41
+ catch {
42
+ Write-Log "ERROR running Docker prune: $_"
43
+ }
44
+ }
45
+ else {
46
+ Write-Log "WARNING: Docker command not found."
47
+ }
48
+
49
+ # 3. Temp Files
50
+ Write-Log "Cleaning User Temp Folder..."
51
+ $tempPath = "$env:USERPROFILE\AppData\Local\Temp"
52
+ if (Test-Path $tempPath) {
53
+ $before = (Get-ChildItem $tempPath -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).Sum
54
+
55
+ Get-ChildItem $tempPath -Recurse -Force -ErrorAction SilentlyContinue | Where-Object {
56
+ # Only delete files older than 24 hours to be safe(r) for running apps
57
+ $_.LastWriteTime -lt (Get-Date).AddDays(-1)
58
+ } | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue
59
+
60
+ $after = (Get-ChildItem $tempPath -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).Sum
61
+ $clearedMB = [math]::Round(($before - $after) / 1MB, 2)
62
+ Write-Log "SUCCESS: Cleared approx $clearedMB MB from Temp (older than 24h)."
63
+ }
64
+
65
+ # 4. Verify Result
66
+ Write-Log "=== FINAL STORAGE CHECK ==="
67
+ Get-Volume -DriveLetter C | ForEach-Object {
68
+ $free = [math]::Round($_.SizeRemaining / 1GB, 2)
69
+ $total = [math]::Round($_.Size / 1GB, 2)
70
+ Write-Log "Drive C: Free Space: $free GB (Total: $total GB)"
71
+ }
72
+
73
+ Write-Log "Cleanup Completed."
@@ -0,0 +1,86 @@
1
+ $ErrorActionPreference = "SilentlyContinue"
2
+ $logPath = "$env:USERPROFILE\Desktop\DIAGNOSTIC_BACKUP\TOTAL_CLEANUP_LOG.txt"
3
+
4
+ function Write-Log {
5
+ param($Message)
6
+ $line = "[$(Get-Date -Format 'HH:mm:ss')] $Message"
7
+ Write-Host $line -ForegroundColor Cyan
8
+ $line | Out-File -FilePath $logPath -Append -Encoding utf8
9
+ }
10
+
11
+ Write-Log "=== STARTING TOTAL CLEANUP ==="
12
+
13
+ # 1. HIBERNATION
14
+ Write-Log "--- Disabling Hibernation ---"
15
+ try {
16
+ powercfg -h off 2>&1 | Out-Null
17
+ if ($LASTEXITCODE -eq 0) {
18
+ Write-Log "SUCCESS: Hibernation disabled (Reclaimed ~3GB)"
19
+ }
20
+ else {
21
+ Write-Log "WARNING: Could not disable hibernation (Requires Admin)"
22
+ }
23
+ }
24
+ catch { Write-Log "Error disabling hibernation: $_" }
25
+
26
+ # 2. DOCKER
27
+ Write-Log "--- Docker Cleanup ---"
28
+ if (Get-Command docker -ErrorAction SilentlyContinue) {
29
+ # Stop all containers
30
+ $containers = docker ps -q
31
+ if ($containers) {
32
+ Write-Log "Stopping containers..."
33
+ docker stop $containers | Out-Null
34
+ }
35
+
36
+ # Prune everything
37
+ Write-Log "Pruning ALL images and volumes..."
38
+ $output = docker system prune -a --volumes -f 2>&1
39
+ Write-Log "Docker Output:"
40
+ $output | ForEach-Object { Write-Log " $_" }
41
+ }
42
+
43
+ # 3. ANACONDA
44
+ Write-Log "--- Removing Anaconda ---"
45
+ $anacondaPath = "$env:USERPROFILE\anaconda3"
46
+ if (Test-Path $anacondaPath) {
47
+ Write-Log "Found Anaconda at $anacondaPath"
48
+
49
+ # Try Uninstaller
50
+ $uninstaller = "$anacondaPath\Uninstall-Anaconda3.exe"
51
+ if (Test-Path $uninstaller) {
52
+ Write-Log "Running Uninstaller..."
53
+ try {
54
+ # Run uninstaller silent mode if possible, or just start it
55
+ Start-Process -FilePath $uninstaller -ArgumentList "/S", "/D=$anacondaPath" -Wait -NoNewWindow
56
+ Write-Log "Uninstaller finished."
57
+ }
58
+ catch {
59
+ Write-Log "Uninstaller failed, falling back to force delete."
60
+ }
61
+ }
62
+
63
+ # Force Delete if still exists
64
+ if (Test-Path $anacondaPath) {
65
+ Write-Log "Force deleting remaining files..."
66
+ Remove-Item $anacondaPath -Recurse -Force -ErrorAction SilentlyContinue
67
+ }
68
+
69
+ if (-not (Test-Path $anacondaPath)) {
70
+ Write-Log "SUCCESS: Anaconda removed."
71
+ }
72
+ else {
73
+ Write-Log "PARTIAL: Some files might remain in $anacondaPath"
74
+ }
75
+ }
76
+ else {
77
+ Write-Log "Anaconda folder not found (maybe already removed)."
78
+ }
79
+
80
+ # 4. FINAL CHECK
81
+ Write-Log "=== FINAL STATUS ==="
82
+ Get-Volume -DriveLetter C | ForEach-Object {
83
+ $free = [math]::Round($_.SizeRemaining / 1GB, 2)
84
+ $total = [math]::Round($_.Size / 1GB, 2)
85
+ Write-Log "Drive C: Free Space: $free GB (Total: $total GB)"
86
+ }
@@ -0,0 +1,49 @@
1
+ $ErrorActionPreference = "SilentlyContinue"
2
+ $root = "c:\Users\João\Desktop\PROJETOS"
3
+ $categories = @("00_ECOSYSTEM_COMERCIAL", "01_CORE_SYSTEMS", "02_ORGANIZATIONS", "03_AI_AGENTS", "04_DEVELOPER_TOOLS", "05_PLATFORMS", "06_UTILITIES", "07_RESEARCH", "08_PROFILE", "GUARDRIVE")
4
+
5
+ Write-Host "=== PROJECT BLOAT AUDIT (BY CATEGORY) ===" -ForegroundColor Cyan
6
+ $finalReport = @()
7
+
8
+ foreach ($cat in $categories) {
9
+ $catPath = "$root\$cat"
10
+ if (-not (Test-Path $catPath)) { continue }
11
+
12
+ $nodeSize = 0
13
+ $targetSize = 0
14
+ $venvSize = 0
15
+
16
+ # 1. node_modules
17
+ $nodes = Get-ChildItem -Path $catPath -Filter "node_modules" -Recurse -Directory -Force -ErrorAction SilentlyContinue | Where-Object { $_.FullName -notmatch "node_modules.*node_modules" }
18
+ foreach ($n in $nodes) {
19
+ $s = Get-ChildItem $n.FullName -Recurse -Force | Measure-Object -Property Length -Sum
20
+ $nodeSize += $s.Sum
21
+ }
22
+
23
+ # 2. target (Rust)
24
+ $targets = Get-ChildItem -Path $catPath -Filter "target" -Recurse -Directory -Force -ErrorAction SilentlyContinue
25
+ foreach ($t in $targets) {
26
+ $s = Get-ChildItem $t.FullName -Recurse -Force | Measure-Object -Property Length -Sum
27
+ $targetSize += $s.Sum
28
+ }
29
+
30
+ # 3. venv / .venv
31
+ $venvs = Get-ChildItem -Path $catPath -Include "venv", ".venv" -Recurse -Directory -Force -ErrorAction SilentlyContinue
32
+ foreach ($v in $venvs) {
33
+ $s = Get-ChildItem $v.FullName -Recurse -Force | Measure-Object -Property Length -Sum
34
+ $venvSize += $s.Sum
35
+ }
36
+
37
+ $total = $nodeSize + $targetSize + $venvSize
38
+ if ($total -gt 1MB) {
39
+ $finalReport += [PSCustomObject]@{
40
+ Category = $cat
41
+ "Node(GB)" = [math]::Round($nodeSize / 1GB, 2)
42
+ "Rust(GB)" = [math]::Round($targetSize / 1GB, 2)
43
+ "PyVenv(GB)" = [math]::Round($venvSize / 1GB, 2)
44
+ "TOTAL(GB)" = [math]::Round($total / 1GB, 2)
45
+ }
46
+ }
47
+ }
48
+
49
+ $finalReport | Sort-Object "TOTAL(GB)" -Descending | Format-Table -AutoSize
@@ -0,0 +1,34 @@
1
+ $ErrorActionPreference = "SilentlyContinue"
2
+ $user = $env:USERPROFILE
3
+
4
+ Write-Host "=== FINAL DEEP DIVE AUDIT ===" -ForegroundColor Cyan
5
+
6
+ # 1. Media Folders
7
+ $media = @("Videos", "Pictures", "Music", "Documents")
8
+ foreach ($m in $media) {
9
+ $path = Join-Path $user $m
10
+ if (Test-Path $path) {
11
+ $size = Get-ChildItem $path -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum
12
+ Write-Host "$m : $([math]::Round($size.Sum / 1GB, 2)) GB"
13
+ }
14
+ }
15
+
16
+ # 2. Other Users
17
+ Write-Host "`n--- Checking Other Users ---"
18
+ Get-ChildItem "C:\Users" -Directory | ForEach-Object {
19
+ if ($_.Name -ne "João" -and $_.Name -ne "Public") {
20
+ $size = Get-ChildItem $_.FullName -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum
21
+ Write-Host "User $($_.Name) : $([math]::Round($size.Sum / 1GB, 2)) GB"
22
+ }
23
+ }
24
+
25
+ # 3. Windows Directory
26
+ Write-Host "`n--- Checking Windows Directory ---"
27
+ $winSize = Get-ChildItem "C:\Windows" -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum
28
+ Write-Host "Windows : $([math]::Round($winSize.Sum / 1GB, 2)) GB"
29
+
30
+ # 4. Hidden Large Files in Root
31
+ Write-Host "`n--- Checking Root Virtual Disks ---"
32
+ Get-ChildItem "C:\" -File -Force -ErrorAction SilentlyContinue | Where-Object { $_.Length -gt 1GB } | ForEach-Object {
33
+ Write-Host "ROOT FILE: $($_.Name) : $([math]::Round($_.Length / 1GB, 2)) GB"
34
+ }
package/ForcePush.ps1 ADDED
@@ -0,0 +1,31 @@
1
+ # ForcePush.ps1
2
+ # Script para fazer push ignorando configurações globais de credenciais
3
+
4
+ Write-Host "🔐 Obtendo token autenticado do GitHub CLI..." -ForegroundColor Cyan
5
+ try {
6
+ $token = gh auth token
7
+ if (-not $token) { throw "Não foi possível obter o token. Rode 'gh auth login' primeiro." }
8
+ } catch {
9
+ Write-Error "Erro ao obter token: $_"
10
+ exit 1
11
+ }
12
+
13
+ Write-Host "🚀 Iniciando Push Seguro (Bypassing Credential Manager)..." -ForegroundColor Yellow
14
+
15
+ # Monta a URL com o token autenticado
16
+ $repoUrl = "https://oauth2:$token@github.com/SH1W4/Orbit-DevOps.git"
17
+
18
+ # Executa o push desativando os helpers de credencial do sistema e global
19
+ # -c credential.helper= : Limpa qualquer helper configurado
20
+ try {
21
+ git -c credential.helper= push $repoUrl main
22
+
23
+ if ($LASTEXITCODE -eq 0) {
24
+ Write-Host "`n✅ SUCESSO! Código enviado para o GitHub." -ForegroundColor Green
25
+ } else {
26
+ throw "Git push falhou com código de saída $LASTEXITCODE"
27
+ }
28
+ } catch {
29
+ Write-Host "`n❌ FALHA NO PUSH" -ForegroundColor Red
30
+ Write-Host "Erro: $_"
31
+ }
@@ -0,0 +1,26 @@
1
+ $ErrorActionPreference = "SilentlyContinue"
2
+ $reportFile = "c:\Users\João\Desktop\PROJETOS\04_DEVELOPER_TOOLS\orbit-devops\FullRAMReport.txt"
3
+ $userPath = "c:\Users\João\Desktop\PROJETOS"
4
+
5
+ Write-Output "=== AUDITORIA FORENSE DE RAM (100% DOS PROCESSOS) ===" > $reportFile
6
+ Write-Output "Data: $(Get-Date)" >> $reportFile
7
+ Write-Output "`n[1. RESUMO POR EMPRESA]" >> $reportFile
8
+ Get-Process | Group-Object Company | Sort-Object Count -Descending | ForEach-Object {
9
+ $size = [math]::Round(($_.Group | Measure-Object WorkingSet -Sum).Sum / 1MB, 2)
10
+ Write-Output "Empresa: $($_.Name) | Count: $($_.Count) | Total RAM: $size MB" >> $reportFile
11
+ }
12
+
13
+ Write-Output "`n[2. LISTA COMPLETA DE PROCESSOS (TOP 200)]" >> $reportFile
14
+ Get-Process | Sort-Object WorkingSet -Descending | Select-Object -First 200 Name, Id, @{Name = 'RAM_MB'; Expression = { [math]::Round($_.WorkingSet / 1MB, 2) } }, Company, Description | Format-Table -AutoSize >> $reportFile
15
+
16
+ Write-Output "`n[3. SERVICOS DO WINDOWS ATIVOS]" >> $reportFile
17
+ Get-Service | Where-Object { $_.Status -eq 'Running' } | Select-Object Name, DisplayName | Format-Table -AutoSize >> $reportFile
18
+
19
+ Write-Output "`n[4. ANALISE DO ACER CLUSTER]" >> $reportFile
20
+ Get-Process | Where-Object { $_.Name -match "Acer" -or $_.Company -match "Acer" } | ForEach-Object {
21
+ $size = [math]::Round($_.WorkingSet / 1MB, 2)
22
+ Write-Output "Acer Process: $($_.Name) | Size: $size MB | Desc: $($_.Description)" >> $reportFile
23
+ }
24
+
25
+ Write-Output "`n=== FIM DO RELATORIO ===" >> $reportFile
26
+ Write-Host "Relatorio gerado em: $reportFile"
@@ -0,0 +1,32 @@
1
+ $ErrorActionPreference = "SilentlyContinue"
2
+ $reportFile = "FullRAMReport_UTF8.txt"
3
+
4
+ # Usando UTF8 para compatibilidade de leitura
5
+ $report = New-Object System.Collections.Generic.List[string]
6
+
7
+ $report.Add("=== AUDITORIA FORENSE DE RAM (100% DOS PROCESSOS) ===")
8
+ $report.Add("Data: $(Get-Date)")
9
+ $report.Add("`n[1. RESUMO POR EMPRESA]")
10
+ Get-Process | Group-Object Company | Sort-Object Count -Descending | ForEach-Object {
11
+ $size = [math]::Round(($_.Group | Measure-Object WorkingSet -Sum).Sum / 1MB, 2)
12
+ $report.Add("Empresa: $($_.Name) | Count: $($_.Count) | Total RAM: $size MB")
13
+ }
14
+
15
+ $report.Add("`n[2. LISTA COMPLETA DE PROCESSOS (TOP 200)]")
16
+ $p200 = Get-Process | Sort-Object WorkingSet -Descending | Select-Object -First 200 Name, Id, @{Name = 'RAM_MB'; Expression = { [math]::Round($_.WorkingSet / 1MB, 2) } }, Company, Description | Out-String
17
+ $report.Add($p200)
18
+
19
+ $report.Add("`n[3. SERVICOS DO WINDOWS ATIVOS]")
20
+ $services = Get-Service | Where-Object { $_.Status -eq 'Running' } | Select-Object Name, DisplayName | Out-String
21
+ $report.Add($services)
22
+
23
+ $report.Add("`n[4. ANALISE DO ACER CLUSTER]")
24
+ Get-Process | Where-Object { $_.Name -match "Acer" -or $_.Company -match "Acer" } | ForEach-Object {
25
+ $size = [math]::Round($_.WorkingSet / 1MB, 2)
26
+ $report.Add("Acer Process: $($_.Name) | Size: $size MB | Desc: $($_.Description)")
27
+ }
28
+
29
+ $report.Add("`n=== FIM DO RELATORIO ===")
30
+
31
+ [System.IO.File]::WriteAllLines($reportFile, $report, [System.Text.Encoding]::UTF8)
32
+ Write-Host "Relatorio gerado em UTF8: $reportFile"
@@ -0,0 +1,25 @@
1
+ $ErrorActionPreference = "SilentlyContinue"
2
+ $reportFile = "C:\Users\Public\FullRAMReport.txt"
3
+
4
+ Write-Output "=== AUDITORIA FORENSE DE RAM (100% DOS PROCESSOS) ===" > $reportFile
5
+ Write-Output "Data: $(Get-Date)" >> $reportFile
6
+ Write-Output "`n[1. RESUMO POR EMPRESA]" >> $reportFile
7
+ Get-Process | Group-Object Company | Sort-Object Count -Descending | ForEach-Object {
8
+ $size = [math]::Round(($_.Group | Measure-Object WorkingSet -Sum).Sum / 1MB, 2)
9
+ Write-Output "Empresa: $($_.Name) | Count: $($_.Count) | Total RAM: $size MB" >> $reportFile
10
+ }
11
+
12
+ Write-Output "`n[2. LISTA COMPLETA DE PROCESSOS (TOP 200)]" >> $reportFile
13
+ Get-Process | Sort-Object WorkingSet -Descending | Select-Object -First 200 Name, Id, @{Name = 'RAM_MB'; Expression = { [math]::Round($_.WorkingSet / 1MB, 2) } }, Company, Description | Format-Table -AutoSize >> $reportFile
14
+
15
+ Write-Output "`n[3. SERVICOS DO WINDOWS ATIVOS]" >> $reportFile
16
+ Get-Service | Where-Object { $_.Status -eq 'Running' } | Select-Object Name, DisplayName | Format-Table -AutoSize >> $reportFile
17
+
18
+ Write-Output "`n[4. ANALISE DO ACER CLUSTER]" >> $reportFile
19
+ Get-Process | Where-Object { $_.Name -match "Acer" -or $_.Company -match "Acer" } | ForEach-Object {
20
+ $size = [math]::Round($_.WorkingSet / 1MB, 2)
21
+ Write-Output "Acer Process: $($_.Name) | Size: $size MB | Desc: $($_.Description)" >> $reportFile
22
+ }
23
+
24
+ Write-Output "`n=== FIM DO RELATORIO ===" >> $reportFile
25
+ Write-Host "Relatorio gerado em: $reportFile"
@@ -0,0 +1,25 @@
1
+ $ErrorActionPreference = "SilentlyContinue"
2
+ $reportFile = "FullRAMReport_Local.txt"
3
+
4
+ Write-Output "=== AUDITORIA FORENSE DE RAM (100% DOS PROCESSOS) ===" > $reportFile
5
+ Write-Output "Data: $(Get-Date)" >> $reportFile
6
+ Write-Output "`n[1. RESUMO POR EMPRESA]" >> $reportFile
7
+ Get-Process | Group-Object Company | Sort-Object Count -Descending | ForEach-Object {
8
+ $size = [math]::Round(($_.Group | Measure-Object WorkingSet -Sum).Sum / 1MB, 2)
9
+ Write-Output "Empresa: $($_.Name) | Count: $($_.Count) | Total RAM: $size MB" >> $reportFile
10
+ }
11
+
12
+ Write-Output "`n[2. LISTA COMPLETA DE PROCESSOS (TOP 200)]" >> $reportFile
13
+ Get-Process | Sort-Object WorkingSet -Descending | Select-Object -First 200 Name, Id, @{Name = 'RAM_MB'; Expression = { [math]::Round($_.WorkingSet / 1MB, 2) } }, Company, Description | Format-Table -AutoSize >> $reportFile
14
+
15
+ Write-Output "`n[3. SERVICOS DO WINDOWS ATIVOS]" >> $reportFile
16
+ Get-Service | Where-Object { $_.Status -eq 'Running' } | Select-Object Name, DisplayName | Format-Table -AutoSize >> $reportFile
17
+
18
+ Write-Output "`n[4. ANALISE DO ACER CLUSTER]" >> $reportFile
19
+ Get-Process | Where-Object { $_.Name -match "Acer" -or $_.Company -match "Acer" } | ForEach-Object {
20
+ $size = [math]::Round($_.WorkingSet / 1MB, 2)
21
+ Write-Output "Acer Process: $($_.Name) | Size: $size MB | Desc: $($_.Description)" >> $reportFile
22
+ }
23
+
24
+ Write-Output "`n=== FIM DO RELATORIO ===" >> $reportFile
25
+ Write-Host "Relatorio gerado em: $reportFile"
Binary file