Skip to content

Tool for autmating offboarding of users in AD on prem and O365 x86 and ARM

License

Notifications You must be signed in to change notification settings

CreativeAcer/OffboardingManager

Repository files navigation

AD User Offboarding Tool

CodeFactor License Version PowerShell

Platform Support Architecture

AD User Offboarding Tool

About

A PowerShell-based GUI tool for managing user offboarding in both Active Directory and Office 365 environments. Designed to work across multiple Windows architectures including x86, x64, and ARM. Features a demo mode for testing and training purposes.

This script is actively being developed, with frequent updates and new features. And offcourse - sometimes some features might not be fully tested yet, if you find something don't hesitate to create an issue.

Architecture Support

The tool automatically adapts to your system architecture:

  • βœ… x64 (64-bit): Full AD PowerShell module support
  • βœ… x86 (32-bit): Full AD PowerShell module support
  • βœ… ARM64: LDAP-based access (Windows 11 ARM)

Features

  • πŸ–₯️ Modern WPF interface with sleek styling
  • πŸ”’ Secure authentication for both AD and O365
  • πŸ”„ Automatic architecture detection and adaptation
  • πŸ“Š Comprehensive reporting system with CSV export
  • ⚑ Support for both AD Module and LDAP approaches
  • 🎯 Demo mode for testing and training
  • πŸ“ Activity logging and audit trails
  • πŸ”„ Real-time task execution feedback
  • βš™οΈ Settings Page: easy configuration

On-Premises Features

  • Disable AD accounts
  • Remove group memberships
  • Move to disabled OU
  • Set Expiration date
  • Automatic logging of all actions

O365 Features

  • Microsoft Graph integration
  • Mailbox Management
    • Convert to shared mailbox
    • Mail forwarding
    • Configure auto reply
  • License management reporting
  • User status verification
  • Secure connection handling

Reporting Capabilities

  • Offboarding activity reports
  • License usage reports
  • Date range filtering
  • Export to CSV
  • Detailed user activity tracking

Demo Mode

Test the application's functionality without affecting your AD environment:

  • Simulated AD operations
  • Mock user data
  • Safe testing environment
  • Training purposes
  • No actual AD modifications

Screenshots

Screenshots may be outdated due to continuous development!

Login Screen

Login Screen

onprem Screen

On Premise options

O365 Screen

O365 Options

Report Screen

Reporting

Settings Screen

Settings

Settings Workflow Screen

Settings Workflow crud

Prerequisites

  • Windows PowerShell 5.1 or later
  • One of the following:
    • Windows 10/11 (x64/x86) with AD PowerShell module
    • Windows 11 ARM with RSAT tools
  • Microsoft Graph PowerShell module (auto-installed if needed)
  • Appropriate AD and O365 permissions
  • Internet connection for O365 features

Installation

# Clone the repository
git clone https://github.com/CreativeAcer/OffboardingManager.git

# Navigate to the directory
cd ADUserOffboarding

# Optional: Create desktop shortcut
.\Create-Shortcut.bat
- runs Create-OffboardingShortcut.ps1

Development Status

  • Basic UI Implementation
  • AD Integration
  • O365 Basic Integration
  • Cross-Architecture Support
  • Demo Mode Implementation
  • Reporting System
  • Activity Logging
  • Advanced O365 Features (In Development)
  • Bulk Operations (Planned)
  • Enhanced Reporting Features (Comming Soon)

Backlog

These items might change the scope of this project

General functionality

  • (bulk)Creation of user
  • Settings page

Teams & SharePoint

  • Remove from Teams groups
  • Transfer Teams ownership
  • Archive Teams channels
  • Remove SharePoint permissions
  • Transfer OneDrive ownership
  • Back up OneDrive content

License Management

  • License reassignment
  • License cost analysis
  • License usage optimization
  • Product-specific disabling
  • Bulk license management

Security & Compliance

  • Set Expiration date
  • Revoke app permissions
  • Remove MFA devices
  • Clear mobile device list
  • Export mailbox audit logs
  • Set litigation hold
  • Generate security reports

Device Management

  • Remove from Intune
  • Wipe enrolled devices
  • Revoke certificates
  • Remove Azure AD devices
  • Clear cached credentials
  • Device compliance report

Automation Features

  • Scheduled offboarding
  • Conditional task execution
  • Custom workflow builder
  • Email notifications
  • Manager approvals
  • Integration with ticketing systems

Contributing

Feel free to submit issues, fork the repository and create pull requests for any improvements.

Usage

  1. Launch the application using Start-Offboarding.ps1 or the desktop shortcut
  2. Login with AD credentials or select Demo Mode
  3. Select a user from the list
  4. Choose operations from available tabs:
  • On-Premises Tasks
    • Disable AD account
    • Remove group memberships
    • Move to disabled OU
    • Set expiration date
  • O365 Management
    • Connect to Microsoft Graph
    • Mailbox Management
    • Teams and SharePoint Management
    • License Management
    • View license status
  • Report Generation
    • Generate activity reports
    • Export license reports
  1. Execute selected tasks
  2. Review real-time feedback
  3. Export reports as needed

Reporting System

Available Reports

  • Offboarding Activity Report

  • Track all offboarding actions

  • Filter by date range

  • View success/failure status

  • Export to CSV

  • License Usage Report

  • Current license assignments

  • License distribution overview

  • User license details

  • Export capabilities

Report Features

  • Date range filtering
  • Multiple export formats
  • Detailed audit trails
  • Real-time generation
  • Searchable results
  • Error tracking
  • Activity summaries

Export Options

  • CSV format support
  • Structured data output
  • Timestamp inclusion
  • Detailed metadata
  • Audit compatibility

Project Structure

/ADUserOffboarding/
β”œβ”€β”€ Start-Offboarding.ps1
β”œβ”€β”€ Launch-Offboarding.ps1
β”œβ”€β”€ Create-OffboardingShortcut.ps1
β”œβ”€β”€ Create-Shortcut.bat
β”œβ”€β”€ Config/
β”‚   β”œβ”€β”€ Colors.ps1
β”‚   β”œβ”€β”€ Fonts.ps1
β”‚   └── Settings.ps1
β”œβ”€β”€ Functions/
β”‚   β”œβ”€β”€ Environment.ps1
β”‚   β”œβ”€β”€ LDAP/
β”‚   β”‚   β”œβ”€β”€ LDAPConnection.ps1
β”‚   β”‚   └── LDAPUsers.ps1
β”‚   β”œβ”€β”€ Utilities/
β”‚   β”‚   β”œβ”€β”€ Mockdata.ps1
β”‚   β”‚   └── PathUtils.ps1
β”‚   β”œβ”€β”€ UI/
β”‚   β”‚   β”œβ”€β”€ LoginDialog.ps1
β”‚   β”‚   β”œβ”€β”€ MainWindow.ps1
β”‚   β”‚   β”œβ”€β”€ O365/              # O365 specific functions
β”‚   β”‚   β”‚   β”œβ”€β”€ Initialize-O365Tab.ps1        # Contains initialization code
β”‚   β”‚   β”‚   β”œβ”€β”€ Start-O365Tasks.ps1          # Main task execution logic
β”‚   β”‚   β”‚   β”œβ”€β”€ MailboxManagement.ps1
β”‚   β”‚   β”‚   β”œβ”€β”€ TeamsManagement.ps1
β”‚   β”‚   β”‚   β”œβ”€β”€ LicenseManagement.ps1
β”‚   β”‚   β”‚   β”œβ”€β”€ Connect-O365.ps1
β”‚   β”‚   β”‚   β”œβ”€β”€ Tasks/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Get-O365Status.ps1       # O365 status check functionality
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Set-MailboxTasks.ps1     # Mailbox-related tasks
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Set-TeamsTasks.ps1       # Teams and SharePoint tasks
β”‚   β”‚   β”‚   β”‚   └── Set-LicenseTasks.ps1     # License management tasks
β”‚   β”‚   β”‚   └── UI/
β”‚   β”‚   β”‚       β”œβ”€β”€ Update-ForwardingList.ps1 # UI update functions
β”‚   β”‚   β”‚       β”œβ”€β”€ Update-TeamsOwnerList.ps1
β”‚   β”‚   β”‚       β”œβ”€β”€ Update-LicenseList.ps1
β”‚   β”‚   β”œβ”€β”€ MainWindow/
β”‚   β”‚   β”‚   β”œβ”€β”€ Initialize-MainWindow.ps1
β”‚   β”‚   β”‚   β”œβ”€β”€ Update-UserList.ps1
β”‚   β”‚   β”‚   β”œβ”€β”€ Update-SelectedUser.ps1
β”‚   β”‚   β”‚   └── Show-UserDetails.ps1
β”‚   β”‚   β”œβ”€β”€ OnPremHandlers.ps1
β”‚   β”‚   β”œβ”€β”€ O365Handlers.ps1
β”‚   β”‚   β”œβ”€β”€ ReportHandlers.ps1
β”‚   β”‚   β”œβ”€β”€ XAMLHelper.ps1
β”‚   β”‚   β”œβ”€β”€ Show-SettingsWindow.ps1
β”‚   β”‚   β”œβ”€β”€ SettingsHandler.ps1
β”‚   β”‚   └── EasterEgg.ps1
β”‚   └── Logging/
β”‚       └── Write-ActivityLog.ps1
β”œβ”€β”€ XAML/
β”‚   β”œβ”€β”€ LoadingWindow.xaml
β”‚   β”œβ”€β”€ LoginWindow.xaml
β”‚   β”œβ”€β”€ SettingsWindow.xaml
β”‚   └── MainWindow.xaml
β”œβ”€β”€ Logs/
β”‚   └── error_log.txt
β”œβ”€β”€ Reports/
β”‚   └── date.csv
└── docs/
    └── images/
        β”œβ”€β”€ MainWindow2.png    # Main banner
        β”œβ”€β”€ Login.png          # Login screen
        └── MainWindow.png     # Main interface

Acknowledgments

  • PowerShell Community for inspiration and examples
  • Microsoft Graph API Documentation
  • Active Directory PowerShell Module Documentation
  • Contributors and testers providing valuable feedback

About

Tool for autmating offboarding of users in AD on prem and O365 x86 and ARM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published