This installer uses a scalable, service-based organisation that mirrors how Microsoft 365 services are actually structured. Instead of arbitrary categories, modules are organised by the services they manage, making it intuitive and future-proof.
Modules are grouped by the Microsoft 365 service they manage:
- Authentication - Core authentication modules
- Identity - User and directory management
- Exchange - Email and calendar administration
- Teams - Microsoft Teams management
- SharePoint - SharePoint Online administration
- Security - Security alerts and compliance
- Reporting - Analytics and data visualization
- Power Platform - Power Apps, Automate, BI
- Azure - Azure service integration
- Development - Development and automation tools
Services are installed in logical order based on dependencies:
- Authentication (required first)
- Identity (users/groups)
- Core services (Exchange, Teams, SharePoint)
- Specialised services (Security, Power Platform)
Common combinations for different admin roles:
| Profile | Services Included | Use Case |
|---|---|---|
basic |
Authentication, Identity, Exchange, Teams, SharePoint, Reporting | Day-to-day M365 admin |
security |
Basic + Security/Compliance | Security administrator |
power |
Authentication, Identity, Power Platform, Reporting | Power Platform admin |
developer |
Basic + Development tools | Script development |
enterprise |
All services | Full enterprise admin |
.\Install-ModulesSimple.ps1When run without parameters, the script displays an interactive menu:
================================================================================
MICROSOFT 365 POWERSHELL MODULE INSTALLER
Select Installation Profile
================================================================================
[1] Basic Administrator
Essential modules for day-to-day Microsoft 365 administration
Services: 6 (authentication, identity, exchange, teams, SharePoint, reporting)
Modules: ~10 modules will be installed
[2] Security Administrator
Core modules plus security and compliance tools
Services: 7 (authentication, identity, exchange, teams, SharePoint, security, reporting)
Modules: ~13 modules will be installed.
[3] Power Platform Administrator
Core modules plus Power Platform administration
Services: 4 (authentication, identity, Power Platform, reporting)
Modules: ~8 modules will be installed
[4] Developer/Automation
Core modules plus development and automation tools
Services: 7 (authentication, identity, exchange, teams, SharePoint, development, reporting)
Modules: ~13 modules will be installed
[5] Enterprise Administrator
All modules for comprehensive Microsoft 365 and Azure management
Services: 10 (all services)
Modules: ~25 modules will be installed
[6] Custom Configuration
Use your customised JSON configuration settings
Services: Based on 'enabled' settings in modules-config.json
[7] Exit
Cancel installation and exit
Select an option [1-7]:
# Basic Microsoft 365 administration
.\Install-ModulesSimple.ps1 -Profile basic
# Security administrator
.\Install-ModulesSimple.ps1 -Profile security
# Power Platform administrator
.\Install-ModulesSimple.ps1 -Profile power
# Full enterprise setup
.\Install-ModulesSimple.ps1 -Profile enterprise# Only authentication and identity
.\Install-ModulesSimple.ps1 -EnableServices "authentication,identity"
# Exchange and Teams only
.\Install-ModulesSimple.ps1 -EnableServices "authentication,exchange,teams"# Automated deployment - no user interaction
.\Install-ModulesSimple.ps1 -Silent
# Silent with specific profile
.\Install-ModulesSimple.ps1 -Silent -Profile basic
# Silent with force reinstall
.\Install-ModulesSimple.ps1 -Silent -ForceSilent Mode Features:
- Automatically upgrades to PowerShell 7 if available
- Uses enterprise profile by default (all modules)
- No interactive menus or prompts
- Suitable for Intune/automated deployment
- Returns proper exit codes for monitoring
| Parameter | Description | Example |
|---|---|---|
-ConfigFile |
Path to JSON configuration file | -ConfigFile "custom-config.json" |
-EnableServices |
Comma-separated services to install | -EnableServices "authentication,identity" |
-Profile |
Predefined profile to use | -Profile security |
-Force |
Force reinstall existing modules | -Force |
-Interactive |
Show confirmation before installation | -Interactive |
-FixGraphVersions |
Fix Microsoft Graph version conflicts | -FixGraphVersions |
-Silent |
Automated deployment mode (no prompts) | -Silent |
Essential for all Microsoft 365 operations
- Microsoft.Graph.Authentication (required)
- MSAL.PS (advanced authentication scenarios)
User, group, and directory administration
- Microsoft.Graph.Users (user management)
- Microsoft.Graph.Groups (group management)
- Microsoft.Graph.Identity.DirectoryManagement (directory roles)
- Microsoft.Graph.Applications (app registrations)
Email, calendar, and Exchange administration
- ExchangeOnlineManagement (complete Exchange management)
Teams administration and management
- MicrosoftTeams (Teams admin module)
- Microsoft.Graph.Teams (Graph API access)
SharePoint sites, lists, and content management
- PnP.PowerShell (modern, recommended)
- Microsoft.Graph.Sites (Graph API access)
- Microsoft.Online.SharePoint.PowerShell (legacy)
Security alerts, policies, and compliance features
- Microsoft.Graph.Security (security center)
- Microsoft.Graph.Identity.SignIns (conditional access)
- Microsoft.Graph.Identity.Governance (PIM, access reviews)
Usage reports, analytics, and data visualisation
- Microsoft.Graph.Reports (M365 usage reports)
- ImportExcel (Excel file manipulation)
- PSWriteWord (Word document generation)
- PSWriteHTML (HTML report generation)
Power Apps, Power Automate, Power BI administration
- Microsoft.PowerApps.Administration.PowerShell
- Microsoft.PowerApps.PowerShell
- Microsoft.Xrm.Data.PowerShell (Dataverse)
Azure services that integrate with Microsoft 365
- Az.Accounts (Azure authentication)
- Az.Resources (resource management)
- Az.Storage (storage services)
- Az.KeyVault (secret management)
Tools for PowerShell development and CI/CD
- PSScriptAnalyzer (code quality)
- Pester (testing framework)
- Posh-Git (Git integration)
The configuration uses a balanced approach that optimises for both stability and security:
Core Modules (Pinned for Stability):
"Microsoft.Graph.Authentication": {
"version": "2.0.0", // Core authentication - stability critical
"description": "Required for all Graph operations",
"enabled": true,
"required": true
},
"Microsoft.Graph.Users": {
"version": "2.0.0", // Essential identity management
"description": "User account management and properties",
"enabled": true
}Peripheral Modules (Latest for Updates):
"ExchangeOnlineManagement": {
"version": "latest", // Service-specific modules benefit from updates
"description": "Exchange Online administration",
"enabled": true
},
"Microsoft.Graph.Security": {
"version": "latest", // Security modules need the latest threat intelligence
"description": "Security alerts and incidents",
"enabled": true
}Utility Modules (Latest for Features):
"ImportExcel": {
"version": "latest", // Utility modules - new features rarely break
"description": "Excel file manipulation",
"enabled": true
}Balanced Approach Rationale:
- Pin core modules (Authentication, Users, Groups) for environment stability
- Use "latest" for service modules (Exchange, Teams, SharePoint) to get improvements
- Use "latest" for security modules to get threat intelligence updates
- Use "latest" for utility modules (Excel, Word) for new features and bug fixes
Version Update Behaviour:
- Pinned modules: Only update when you change the version number in JSON
- "Latest" modules: Automatically update when newer versions are available
- Mixed versions: Some modules update while core stability is maintained
"teams": {
"enabled": false, // Disable all Teams modules
"modules": { ... }
}"Microsoft.Graph.Teams": {
"enabled": false, // Keep Teams admin but disable Graph API
"version": "2.0.0"
}"profiles": {
"custom_team": {
"name": "My Team Setup",
"description": "Custom modules for our team",
"services": ["authentication", "exchange", "reporting"]
}
}"newservice": {
"name": "New Microsoft Service",
"description": "Newly released service modules",
"enabled": false,
"priority": 11,
"modules": {
"Microsoft.NewService.PowerShell": {
"version": "1.0.0",
"enabled": true
}
}
}- New Microsoft services → Add new service section
- Service updates → Update modules within existing services
- Version management → Update versions without structural changes
- Service-aligned → Modules grouped by actual Microsoft 365 services
- Dependency-aware → Priority-based installation order
- Role-based → Profiles match real administrative roles
- Clear ownership → Each service section has a clear purpose
- Future-proof → Structure adapts to new Microsoft services
- Documentation → Each module includes a purpose and description
The script includes a Silent mode specifically designed for automated deployment through Microsoft Intune or other enterprise management tools.
.\Install-ModulesSimple.ps1 -SilentFeatures:
- Zero user interaction - Fully automated execution
- Automatic PowerShell 7 upgrade - Detects and upgrades without prompts
- Enterprise profile default - Installs comprehensive module set (~21 modules)
- Proper exit codes - For deployment monitoring and reporting
- Error resilience - Continues on individual module failures
- Run using logged-on credentials: Yes
- Enforce script signature check: No
- Run in 64-bit PowerShell: Yes
Install-ModulesSimple.ps1(main script)modules-config.json(configuration file)
# Minimal installation
.\Install-ModulesSimple.ps1 -Silent -Profile basic
# Security-focused installation
.\Install-ModulesSimple.ps1 -Silent -Profile security
# Force reinstall for troubleshooting
.\Install-ModulesSimple.ps1 -Silent -ForceFor detailed Intune deployment instructions, see Intune-Deployment-Guide.md.
| Old Method | New Method |
|---|---|
-IncludeEnterprise |
-Profile enterprise |
-IncludePowerPlatform |
-EnableServices "powerplatform" |
-IncludeAll |
-Profile enterprise |
| Multiple parameters | Single profile parameter |
| Old Category | New Services |
|---|---|
core |
authentication, identity, exchange, teams, sharepoint |
enterprise |
security |
powerplatform |
powerplatform |
azure |
azure |
devops |
development |
- New to M365: Use
-Profile basic - Security focus: Use
-Profile security - Power Platform: Use
-Profile power - Custom needs: Create custom profile in JSON
- Version updates: Update version numbers in JSON
- New modules: Add to appropriate service section
- Deprecations: Set
"enabled": falseinstead of deleting
- Testing: Use
-Interactiveto preview changes - Automation: Use profiles in scripts and CI/CD
- Documentation: Leverage built-in descriptions
This service-based architecture makes the system much more maintainable and scales naturally with Microsoft's service evolution.
Additional restriction: Commons Clause (see COMMONS-CLAUSE.txt)
SPDX headers
- Each source file includes:
SPDX-License-Identifier: Apache-2.0 WITH Commons-Clause
Q: Can an MSP or consultant use this tool in a paid engagement?
A: It depends on how the tool is used:
- Allowed: If the tool is used internally by the end customer (e.g., installed in their tenant) and the consultant is simply assisting, this is generally acceptable.
- Not allowed without a commercial licence: If the MSP or consultant provides a managed service where the tool runs in their own environment (e.g., their tenant or infrastructure) or if the value of the service substantially derives from the tool’s functionality, this falls under the definition of “Sell” in the Commons Clause and requires a commercial licence.
Q: Why is this restricted?
The Commons Clause removes the right to “Sell,” which includes providing a service for a fee where the value derives from the software. This ensures fair use and prevents competitors from monetising the tool without contributing back.
Q: How do I get a commercial licence?
Contact Global Micro Solutions (Pty) Ltd at:
📧 licensing@globalmicro.co.za
Distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Please review the Apache-2.0 WITH Commons-Clause License for the specific language governing permissions and limitations under the License.
JJ Milner
Blog: https://jjrmilner.substack.com
Github: https://github.com/jjrmilner