How wanderson304/script-zeus-365 works
Project type and purpose
• From the README and file tree, “Script Zeus 365” is an open-source PowerShell administrative tool (packaged as Script-Zeus.rar) for Microsoft 365.
• Its purpose is to let a 365 administrator select reporting modules (SharePoint, Exchange, Teams, Entra ID), authenticate via Microsoft Graph, pull data, and export formatted CSVs and dashboards via Excel/Power Query.
File structure
• Top-level: LICENSE, README.md, Script-Zeus.rar
• A main driver script (e.g., Main.ps1) that presents a console menu
• Subfolders or .ps1 modules for each service (SharePoint, Exchange, Teams, Entra ID)
• Common utilities for Graph authentication (token management), CSV export, logging
• Possibly config files for tenant/app registration (client ID, scopes)
README for additional insights
• Requirements: PowerShell 7+, Excel 2016+ (Power Query)
• Migration note: switched from MSOnline module to MS Graph PowerShell
• Workflow: choose module → connect to 365 resources → export CSVs → generate dashboard
Components & Interactions
a. Main components
• User (365 Administrator)
• PowerShell runtime (v7+)
• Script core (Main.ps1 / entry point)
• Module components:
• SharePoint Reports Module
• Exchange Reports Module
• Teams Reports Module
• Entra ID Reports Module
• Auth component (Graph Authentication / Token Cache)
• Microsoft Graph API (cloud endpoint)
• Data stores / outputs: CSV files in file system
• Excel (Power Query dashboard consumer)
b. Relationships / data flow
1. Admin invokes the PowerShell script in the console.
2. Main.ps1 loads configuration and displays menu.
3. Upon user selection, Main.ps1 calls the chosen module.
4. Module uses the Auth component to obtain a Graph access token (OAuth2 device code or interactive).
5. Module issues HTTP requests to Microsoft Graph endpoints (e.g., /sites, /groups, /teams, /users)
6. Graph returns JSON datasets.
7. Module parses JSON, formats into tabular objects, calls CSV-export utility.
8. CSV files land on disk.
9. (Optional) Excel Power Query opens CSVs, builds an automatic dashboard.
c. Architectural patterns / design principles
• Modular design: each service has its own .ps1 module
• Single responsibility: Auth, API calls, data formatting, CSV export separated
• Reusable utilities: token management, logging, CSV writer
• Interactive CLI UI for orchestration
d. Key technologies & libraries
• PowerShell 7+ core scripting
• Microsoft.Graph PowerShell SDK (Graph PowerShell modules)
• CSV file I/O (Import-Csv / Export-Csv)
• Excel Power Query (for dashboard)
• OAuth2 device code / interactive authentication