# 4. Folder Structure 📁

WARNING: Due to continued development, this is subject to change.

  • Folder tree

# Folder tree

plaintext
OfficeSpaceManager/                  # Project root
│
│   All scripts and modules use robust root resolution for module imports:
│   - $env:OfficeSpaceManagerRoot is set at runtime using the Resolve-OfficeSpaceManagerRoot.ps1 helper.
│   - All Import-Module statements use this variable for absolute, error-proof paths.
│   - This prevents all fragile path errors regardless of working directory or invocation method.
│   - See Modules/Utilities/Resolve-OfficeSpaceManagerRoot.ps1 for implementation details.
│
├── Invoke-MainMenu.ps1              # Main CLI entry point for all operations
│                                    # Supports -LogVerbose for transcript and input logging.
│                                    # Robustly enforces first-time setup and Exchange Online connection │                                      at launch.
├── Backups/                         # Backups and backup scripts
│   ├── Restore-MetadataSnapshot.ps1 # Restore metadata snapshot
│   └── Save-MetadataSnapshot.ps1    # Save metadata snapshot
│
├── CLI/                             # CLI scripts and menu entry points
│   ├── ConfigurationMenu.ps1        # Configuration menu
│   ├── LogsMenu.ps1                 # Logs menu
│   ├── ManageResourcesMenu.ps1      # Resource management menu
│   ├── OrphanMetadatamenu.ps1       # Orphan metadata menu
│   ├── Display-PanelHeader.ps1      # (Obsolete) All references replaced with approved verb functions
│   ├── Show-ActionHistory.ps1       # (Obsolete) All references replaced with approved verb functions
│   ├── Logs/                        # CLI-specific logs
│   ├── Manage/                      # CLI-specific management scripts
│   └── Wizards/                     # Interactive CLI wizards for resource/desk pools
│
├── config/                          # Tenant config and first-run flags
│   ├── FirstRunComplete.json        # First-run completion flag
│   └── TenantConfig.json            # Tenant configuration
│
├── Configuration/                   # Config validation/setup flows (legacy scripts)
│   ├── Create-ConfigBackup.ps1      # Create config backup ZIP
│   ├── Enable-PlacesFeatures.ps1    # Enable Microsoft Places features
│   ├── Restore-ConfigBackup.ps1     # Restore config from backup
│   ├── Run-FirstTimeSetup.ps1       # First-time setup wizard
│   ├── Validate-ExchangeSetup.ps1   # Validate Exchange setup
│   └── Validate-PlacesFeatures.ps1  # Validate Places/Teams setup
│
├── EnvironmentSetup/                # M365 mailbox/calendar config scripts
│   ├── Ensure-CalendarProcessingSettings.ps1 # Ensure correct calendar processing
│   ├── Pin-PlacesAppInTeams.ps1              # Pin Places app in Teams
│   └── Update-MailboxTypes.ps1               # Update mailbox types
│
├── Logs/                            # Log files and log management scripts
│   ├── ActionHistory-*.txt          # Action history logs
│   ├── Archive/                     # Archived logs
│   ├── Clear-LogHistory.ps1         # Clear log history
│   ├── Compress-Logs.ps1            # Compress logs
│   ├── Export-ActionHistory.ps1     # Export action history
│   ├── Log_*.log                    # Log files
│   └── View-LogHistory.ps1          # View log history
│
├── Metadata/                        # Primary system metadata (JSON)
│   ├── .lastSync.json               # Last sync state
│   └── CachedResources.json         # Cached resources
│
├── Modules/                         # PowerShell modules (core logic, reusable functions)
│   ├── CLI/                         # CLI menu rendering and user interaction logic
│   ├── Configuration/               # Config import/export, backup/restore, validation
│   ├── Logging/                     # Centralised logging and error handling
│   ├── Reporting/                   # Reporting and summary generation
│   ├── SiteManagement/              # Site/building/floor/desk management logic
│   ├── UserManagement/              # User and permissions logic
│   └── Utilities/                   # Helper and utility functions (e.g., connections)
│
├── OrphanFixer/                     # Tools for resolving orphaned resources
│   ├── Detect-NonStandardResources.ps1     # Detect non-standard resources
│   ├── Find-OrphanedResources.ps1          # Find orphaned resources
│   ├── Fix-OrphanedResources.ps1           # Remediate orphaned resources
│   ├── Suggest-RenameResource.ps1          # Suggest resource renames
│   └── Validate-DeskPoolMappings.ps1       # Validate desk pool mappings
│
├── SiteManagement/                  # Metadata sync and site structure operations
│   ├── CachedResources/                     # Cached resource data/scripts
│   ├── Export-SiteStructureTemplates.ps1    # Export site structure templates
│   ├── Import-SiteStructureFromCSV.ps1      # Import site structure from CSV
│   ├── Get-SiteStructure.ps1                # Get site structure
│   └── Sync-MetadataToCloud.ps1             # Sync metadata to cloud
│
├── TemplateManagement/              # Import/export CSV metadata templates
│   ├── Export-AllTemplates.ps1      # Export all templates
│   ├── Export-MetadataTemplates.ps1 # Export metadata templates
│   ├── Import-FromCSV.ps1           # Import from CSV
│   ├── Import-MetadataFromCSV.ps1   # Import metadata from CSV
│   └── Validate-CSVImport.ps1       # Validate CSV import
│
├── Tests/                           # Unit and integration tests (Pester, etc.)
│
├── TestSuite/                       # Simulation and test suite scripts
│   ├── Cleanup-TestResources.ps1    # Remove test resources
│   ├── Run-BookingSimulation.ps1    # Simulate booking scenarios
│   ├── Run-TestSuite.ps1            # Run all tests
│   ├── Simulate-BookingTest.ps1     # Simulate a booking test
│   ├── Test-DeskProvisioning.ps1    # Test desk provisioning
│   ├── Test-MailboxSettings.ps1     # Test mailbox settings
│   └── Test-RoomProvisioning.ps1    # Test room provisioning

Each folder and file is annotated above with a short summary of its purpose and contents.