# flatlinebb/mspscripts architecture

> Architecture diagram of the GitHub repository flatlinebb/mspscripts, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/flatlinebb/mspscripts
- Repository: https://github.com/flatlinebb/mspscripts

## Overview

MSPs use this repository as a toolbox of scripts for RMM work, rather than as one application with a shared runtime workflow. Its capabilities include Microsoft 365 administration and reporting, Windows maintenance and recovery, system diagnostics, and assorted endpoint/network utilities. It also includes a separate Azure Logic App template for copying SFTP files to SharePoint. The README documents these purposes but no calls or data flows between scripts; with no source excerpts, the graph keeps those components independent rather than inferring relationships.

Main entry points: [`O365_AddNewUser.ps1`](https://github.com/flatlinebb/mspscripts/blob/master/O365_AddNewUser.ps1) (User administration), [`O365_AddToDistributionGroup.ps1`](https://github.com/flatlinebb/mspscripts/blob/master/O365_AddToDistributionGroup.ps1) (Group management), [`O365_GiveAccessToMailbox.ps1`](https://github.com/flatlinebb/mspscripts/blob/master/O365_GiveAccessToMailbox.ps1) (Mailbox access), [`O365_LicenseReport.ps1`](https://github.com/flatlinebb/mspscripts/blob/master/O365_LicenseReport.ps1) (License reporting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_m365["Microsoft 365"]
  node_m365users["User administration"]
  node_m365groups["Group management"]
  node_m365mailboxes["Mailbox access"]
  node_m365licenses["License reporting"]
  node_m365trace["Message tracing"]
  node_m365report["Mailbox reporting"]
end

subgraph group_windows["Windows Operations"]
  node_windowsupdate["Update repair"]
  node_windowscleanup["Temporary-file cleanup"]
  node_windowsreboot["Reboot management"]
  node_windowsvss["VSS recovery"]
  node_windowswol["Wake-on-LAN<br/>[Send-WOL.ps1]"]
end

subgraph group_diagnostics["System Diagnostics"]
  node_errors["Event log reports"]
  node_storage["Folder size report"]
  node_hyperv["Hyper-V replica check"]
  node_network["WAN speed test<br/>[WAN_speed_test.ps1]"]
end

subgraph group_utilities["Endpoint Utilities"]
  node_printer["Remote printer setup"]
  node_profiles["Profile copying"]
  node_startup["Startup launcher<br/>[Work_StartUp.bat]"]
end

subgraph group_integration["File Integration"]
  node_sftp["SFTP to SharePoint"]
end

node_msp(("MSP technician"))

node_msp -->|"uses in RMM"| node_m365users
node_msp -->|"uses in RMM"| node_m365groups
node_msp -->|"uses in RMM"| node_m365mailboxes
node_msp -->|"uses in RMM"| node_m365licenses
node_msp -->|"uses in RMM"| node_m365trace
node_msp -->|"uses in RMM"| node_m365report
node_msp -->|"uses in RMM"| node_windowsupdate
node_msp -->|"uses in RMM"| node_windowscleanup
node_msp -->|"uses in RMM"| node_windowsreboot
node_msp -->|"uses in RMM"| node_windowsvss
node_msp -->|"uses in RMM"| node_windowswol
node_msp -->|"uses in RMM"| node_errors
node_msp -->|"uses in RMM"| node_storage
node_msp -->|"uses in RMM"| node_hyperv
node_msp -->|"uses in RMM"| node_network
node_msp -->|"uses in RMM"| node_printer
node_msp -->|"uses in RMM"| node_profiles
node_msp -->|"uses in RMM"| node_startup

click node_m365users "https://github.com/flatlinebb/mspscripts/blob/master/O365_AddNewUser.ps1"
click node_m365groups "https://github.com/flatlinebb/mspscripts/blob/master/O365_AddToDistributionGroup.ps1"
click node_m365mailboxes "https://github.com/flatlinebb/mspscripts/blob/master/O365_GiveAccessToMailbox.ps1"
click node_m365licenses "https://github.com/flatlinebb/mspscripts/blob/master/O365_LicenseReport.ps1"
click node_m365trace "https://github.com/flatlinebb/mspscripts/blob/master/O365Exchange_MessageTrace.ps1"
click node_m365report "https://github.com/flatlinebb/mspscripts/blob/master/MailboxSizeReport_new.ps1"
click node_windowsupdate "https://github.com/flatlinebb/mspscripts/blob/master/Repair_Windows_Update_Advanced.bat"
click node_windowscleanup "https://github.com/flatlinebb/mspscripts/blob/master/CleanTempFiles_Connor.ps1"
click node_windowsreboot "https://github.com/flatlinebb/mspscripts/blob/master/Get-PendingReboot.ps1"
click node_windowsvss "https://github.com/flatlinebb/mspscripts/blob/master/Restart_VSS_Writers.bat"
click node_windowswol "https://github.com/flatlinebb/mspscripts/blob/master/Send-WOL.ps1"
click node_errors "https://github.com/flatlinebb/mspscripts/blob/master/Get_Events_Errors_30days.ps1"
click node_storage "https://github.com/flatlinebb/mspscripts/blob/master/Get_Folder_Sizes.ps1"
click node_hyperv "https://github.com/flatlinebb/mspscripts/blob/master/Check-HyperVReplica.ps1"
click node_network "https://github.com/flatlinebb/mspscripts/blob/master/WAN_speed_test.ps1"
click node_printer "https://github.com/flatlinebb/mspscripts/blob/master/AddGlobalPrinterRemotely.cmd"
click node_profiles "https://github.com/flatlinebb/mspscripts/blob/master/Windows%20Profiles%20Copy.bat"
click node_startup "https://github.com/flatlinebb/mspscripts/blob/master/Work_StartUp.bat"
click node_sftp "https://github.com/flatlinebb/mspscripts/blob/master/Copy%20the%20file%20to%20SharePoint%20when%20a%20new%20file%20is%20added%20to%20an%20SFTP%20Server.json"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_m365users,node_m365groups,node_m365mailboxes,node_m365licenses,node_m365trace,node_m365report toneBlue
class node_windowsupdate,node_windowscleanup,node_windowsreboot,node_windowsvss,node_windowswol toneAmber
class node_errors,node_storage,node_hyperv,node_network toneMint
class node_printer,node_profiles,node_startup toneRose
class node_sftp,node_msp toneIndigo
```

## Components

### Microsoft 365

- [User administration](https://github.com/flatlinebb/mspscripts/blob/master/O365_AddNewUser.ps1): `O365_AddNewUser.ps1`
- [Group management](https://github.com/flatlinebb/mspscripts/blob/master/O365_AddToDistributionGroup.ps1): `O365_AddToDistributionGroup.ps1`
- [Mailbox access](https://github.com/flatlinebb/mspscripts/blob/master/O365_GiveAccessToMailbox.ps1): `O365_GiveAccessToMailbox.ps1`
- [License reporting](https://github.com/flatlinebb/mspscripts/blob/master/O365_LicenseReport.ps1): `O365_LicenseReport.ps1`
- [Message tracing](https://github.com/flatlinebb/mspscripts/blob/master/O365Exchange_MessageTrace.ps1): `O365Exchange_MessageTrace.ps1`
- [Mailbox reporting](https://github.com/flatlinebb/mspscripts/blob/master/MailboxSizeReport_new.ps1): `MailboxSizeReport_new.ps1`

### Windows Operations

- [Update repair](https://github.com/flatlinebb/mspscripts/blob/master/Repair_Windows_Update_Advanced.bat): `Repair_Windows_Update_Advanced.bat`
- [Temporary-file cleanup](https://github.com/flatlinebb/mspscripts/blob/master/CleanTempFiles_Connor.ps1): `CleanTempFiles_Connor.ps1`
- [Reboot management](https://github.com/flatlinebb/mspscripts/blob/master/Get-PendingReboot.ps1): `Get-PendingReboot.ps1`
- [VSS recovery](https://github.com/flatlinebb/mspscripts/blob/master/Restart_VSS_Writers.bat): `Restart_VSS_Writers.bat`
- [Wake-on-LAN](https://github.com/flatlinebb/mspscripts/blob/master/Send-WOL.ps1): `Send-WOL.ps1`

### System Diagnostics

- [Event log reports](https://github.com/flatlinebb/mspscripts/blob/master/Get_Events_Errors_30days.ps1): `Get_Events_Errors_30days.ps1`
- [Folder size report](https://github.com/flatlinebb/mspscripts/blob/master/Get_Folder_Sizes.ps1): `Get_Folder_Sizes.ps1`
- [Hyper-V replica check](https://github.com/flatlinebb/mspscripts/blob/master/Check-HyperVReplica.ps1): `Check-HyperVReplica.ps1`
- [WAN speed test](https://github.com/flatlinebb/mspscripts/blob/master/WAN_speed_test.ps1): `WAN_speed_test.ps1`

### Endpoint Utilities

- [Remote printer setup](https://github.com/flatlinebb/mspscripts/blob/master/AddGlobalPrinterRemotely.cmd): `AddGlobalPrinterRemotely.cmd`
- [Profile copying](https://github.com/flatlinebb/mspscripts/blob/master/Windows%20Profiles%20Copy.bat): `Windows Profiles Copy.bat`
- [Startup launcher](https://github.com/flatlinebb/mspscripts/blob/master/Work_StartUp.bat): `Work_StartUp.bat`

### File Integration

- [SFTP to SharePoint](https://github.com/flatlinebb/mspscripts/blob/master/Copy%20the%20file%20to%20SharePoint%20when%20a%20new%20file%20is%20added%20to%20an%20SFTP%20Server.json): `Copy the file to SharePoint when a new file is added to an SFTP Server.json`

### Other components

- **MSP technician**

## Connections

- MSP technician → User administration: uses in RMM (evidence: `README.md`)
- MSP technician → Group management: uses in RMM (evidence: `README.md`)
- MSP technician → Mailbox access: uses in RMM (evidence: `README.md`)
- MSP technician → License reporting: uses in RMM (evidence: `README.md`)
- MSP technician → Message tracing: uses in RMM (evidence: `README.md`)
- MSP technician → Mailbox reporting: uses in RMM (evidence: `README.md`)
- MSP technician → Update repair: uses in RMM (evidence: `README.md`)
- MSP technician → Temporary-file cleanup: uses in RMM (evidence: `README.md`)
- MSP technician → Reboot management: uses in RMM (evidence: `README.md`)
- MSP technician → VSS recovery: uses in RMM (evidence: `README.md`)
- MSP technician → Wake-on-LAN: uses in RMM (evidence: `README.md`)
- MSP technician → Event log reports: uses in RMM (evidence: `README.md`)
- MSP technician → Folder size report: uses in RMM (evidence: `README.md`)
- MSP technician → Hyper-V replica check: uses in RMM (evidence: `README.md`)
- MSP technician → WAN speed test: uses in RMM (evidence: `README.md`)
- MSP technician → Remote printer setup: uses in RMM (evidence: `README.md`)
- MSP technician → Profile copying: uses in RMM (evidence: `README.md`)
- MSP technician → Startup launcher: uses in RMM (evidence: `README.md`)
