Skip to content

E7H31234L/vmware-workspaceone-uem-airwatch

πŸ”’ VMware WorkspaceONE UEM Administration Toolkit

A comprehensive, enterprise-grade PowerShell toolkit for secure VMware WorkspaceONE UEM (Airwatch) administration. This toolkit provides secure credential management, audit logging, compliance reporting, and device lifecycle management for enterprise mobility environments.

Project Board: https://github.com/users/E7H31234L/projects/6

⚠️ ENTERPRISE SECURITY WARNING

FOR AUTHORIZED ENTERPRISE ADMINISTRATORS ONLY - REQUIRES PROPER UEM CONSOLE ACCESS

This toolkit contains:

  • πŸ” Enterprise-grade credential management with encryption
  • πŸ“Š Comprehensive audit logging for compliance
  • πŸ›‘οΈ Secure API communication with WorkspaceONE UEM
  • πŸ“‹ Batch operations with validation and error handling
  • πŸ” Compliance reporting and security monitoring

🚫 UNAUTHORIZED USE PROHIBITED

  • ❌ NEVER use without proper WorkspaceONE UEM authorization
  • ❌ NEVER deploy in unauthorized environments
  • ❌ NEVER use for personal device management

πŸ“ Repository Structure

VMware-WorkspaceONE-UEM-Airwatch/
β”œβ”€β”€ πŸ”§ Modules/
β”‚   β”œβ”€β”€ Airwatch-DeviceManagement.psm1  # Core device operations
β”‚   β”œβ”€β”€ Airwatch-Configuration.psm1     # Secure credential storage
β”‚   └── Airwatch-Logging.psm1          # Audit logging & compliance
β”œβ”€β”€ πŸ“š Scripts/
β”‚   β”œβ”€β”€ Initialize-Environment.ps1       # Environment setup
β”‚   β”œβ”€β”€ Batch-DeviceOperations.ps1    # Bulk device management
β”‚   └── Compliance-Reporting.ps1     # Automated reports
β”œβ”€β”€ πŸ“– Documentation/
β”‚   β”œβ”€β”€ SECURITY.md                   # Security guidelines
β”‚   β”œβ”€β”€ API-Reference.md             # Complete API documentation
β”‚   └── Deployment-Guide.md         # Enterprise deployment guide
β”œβ”€β”€ πŸ” CI/CD/
β”‚   β”œβ”€β”€ security-scans.yml           # Security scanning pipeline
β”‚   └── quality-checks.yml          # Code quality validation
└── βš™οΈ Configuration/
    β”œβ”€β”€ config-template.json         # Configuration template
    └── compliance-audit.json       # Compliance settings

πŸš€ Quick Start

Prerequisites

  • PowerShell 5.1+ (PowerShell Core 7+ recommended)
  • WorkspaceONE UEM Console access with admin privileges
  • API Credentials from UEM console settings
  • Windows 10/11 or Windows Server 2016+
  • Network access to WorkspaceONE UEM endpoints

Installation

# Clone repository
git clone https://github.com/E7H31234L/VMware-WorkspaceONE-UEM-Airwatch.git
cd VMware-WorkspaceONE-UEM-Airwatch

# Import all modules
Import-Module .\Airwatch-DeviceManagement.psm1 -Force
Import-Module .\Airwatch-Configuration.psm1 -Force
Import-Module .\Airwatch-Logging.psm1 -Force

# Initialize secure environment
Initialize-AirwatchEnvironment -ConfigPath ".\config\production.json"

# Test configuration
Test-AirwatchConfiguration -Environment production

First-Time Setup

# Step 1: Configure secure credential storage
Set-AirwatchCredentials `
    -Environment production `
    -Credential (Get-Credential -Message "WorkspaceONE UEM Production") `
    -ApiHost "https://cnXXXX.awmdm.com/api" `
    -TokenUrl "https://na.uemauth.vmwservices.com/connect/token" `
    -ApiKey "your-api-key" `
    -ClientId "your-client-id" `
    -ClientSecret "your-client-secret"

# Step 2: Validate configuration
Test-AirwatchConfiguration -Environment production

# Step 3: Enable logging
Initialize-AirwatchLogging -LogPath ".\logs\operations.log" -Level INFO

πŸ” Security Features

πŸ›‘οΈ Enterprise-Grade Security

Feature Implementation Security Level
Credential Encryption Windows Data Protection API πŸ”’ Enterprise
Input Validation Device ID format validation πŸ›‘οΈ Comprehensive
Secure Communication TLS 1.3+ with certificate validation πŸ”’ Encrypted
Audit Logging Tamper-evident structured logs πŸ“Š Complete
Access Control Role-based and MFA required πŸ”‘ Multi-factor
Compliance Tracking GDPR/CCPA compliant event logging βš–οΈ Regulatory

πŸ” Device Validation

# Comprehensive device ID validation
Test-AirwatchDeviceId -DeviceId "A1:B2:C3:D4:E5:F6" -SearchBy "MacAddress"
Test-AirwatchDeviceId -DeviceId "123456789012345" -SearchBy "SerialNumber"
Test-AirwatchDeviceId -DeviceId "4901542032375185" -SearchBy "ImeiNumber"
Test-AirwatchDeviceId -DeviceId "abcdef1234567890abcdef1234567890" -SearchBy "Udid"

πŸ“Š Audit Logging

# Structured logging with compliance tracking
Write-AirwatchLog -Message "Device deletion initiated" -Level INFO -Component "DeviceManagement"
Log-AirwatchComplianceEvent -Action "DEVICE_DELETION" -DeviceId "12345" -Success $true

πŸ” Credential Security

# Encrypted credential storage
$credential = Get-AirwatchSecureCredential -Environment production

# Automatic credential caching with 30-minute expiry
# Windows Data Protection API for encryption
# Secure memory cleanup after operations

πŸ“‹ Core Operations

πŸ—‘οΈ Device Management

Single Device Operations

# Remove a single device with validation
Remove-AirwatchDevice -DeviceId "12345" -SearchBy "SerialNumber" -Environment production

# Batch device removal with error handling
"serial1", "serial2", "serial3" | Remove-AirwatchDevice -SearchBy "SerialNumber" -BatchMode -Environment production

Bulk Operations

# Import device list from CSV
$devices = Import-Csv "device-list.csv"
foreach ($device in $devices) {
    Remove-AirwatchDevice -DeviceId $device.SerialNumber -SearchBy "SerialNumber" -BatchMode
}

πŸ” API Communication

# Direct API calls with full error handling
$response = Invoke-AirwatchApiRequest `
    -Endpoint "/devices" `
    -Method "DELETE" `
    -SearchBy "SerialNumber" `
    -DeviceId "123456789" `
    -Environment production

# Automatic token management and renewal
# Secure header construction with tenant code
# Request/response logging for audit trails

πŸ“Š Compliance & Reporting

# Generate compliance reports
New-AirwatchComplianceReport -Period WEEKLY -OutputPath ".\reports\compliance.json"

# Compliance event tracking
Log-AirwatchComplianceEvent -Action "POLICY_CHANGE" -Success $true -TargetUser "admin@company.com"

🌐 API Integration

WorkspaceONE UEM Endpoints

Environment API Host Auth Endpoint Region
Production https://cnXXXX.awmdm.com/api https://na.uemauth.vmwservices.com/connect/token North America
Staging https://cnXXXX.awmdm-staging.com/api https://na.uemauth.vmwservices.com/connect/token North America
EU Production https://cnXXXX.awmdm.com/api https://eu.uemauth.vmwservices.com/connect/token Europe
APAC Production https://cnXXXX.awmdm.com/api https://apac.uemauth.vmwservices.com/connect/token Asia Pacific

Supported Operations

Operation HTTP Method Endpoint Purpose
Device Search GET /devices Find devices by criteria
Device Details GET /devices/{id} Get device information
Device Delete DELETE /devices?searchby={type}&id={id} Remove device from UEM
Device Lock POST /devices/{id}/commands Lock device remotely
Device Wipe POST /devices/{id}/commands Full device wipe
Profile Assign POST /devices/{id}/profiles Assign compliance profiles
Apps Management GET/POST /apps Application deployment

πŸ”§ Configuration Management

Secure Configuration File

{
  "Version": "2.0",
  "Created": "2024-01-24T12:00:00Z",
  "Environments": {
    "production": {
      "ApiHost": "https://cnXXXX.awmdm.com/api",
      "TokenUrl": "https://na.uemauth.vmwservices.com/connect/token",
      "Username": "uem-admin@company.com",
      "IsEncrypted": true,
      "Description": "Production WorkspaceONE UEM Environment"
    },
    "staging": {
      "ApiHost": "https://cnXXXX.awmdm-staging.com/api",
      "TokenUrl": "https://na.uemauth.vmwservices.com/connect/token",
      "Username": "uem-admin@company.com",
      "IsEncrypted": true,
      "Description": "Staging WorkspaceONE UEM Environment"
    }
  },
  "Security": {
    "RequireMultiFactor": true,
    "SessionTimeout": 30,
    "AuditLogging": true,
    "RequireAdminApproval": true,
    "MaxConcurrentSessions": 5
  },
  "Logging": {
    "Level": "INFO",
    "File": "%USERPROFILE%\\.airwatch\\logs\\operations.log",
    "MaxSizeMB": 100,
    "RetentionDays": 90,
    "StructuredLogging": true
  }
}

Environment Variables

# Override configuration with environment variables
$env:AIRWATCH_CONFIG_PATH = "C:\\WorkspaceONE\\config\\production.json"
$env:AIRWATCH_LOG_LEVEL = "INFO"
$env:AIRWATCH_ENVIRONMENT = "production"
$env:AIRWATCH_COMPLIANCE_DB = "C:\\WorkspaceONE\\compliance\\audit.sqlite"

πŸ” Monitoring & Compliance

Real-time Monitoring

# Enable comprehensive logging
Initialize-AirwatchLogging -LogPath ".\\logs\\realtime.log" -Level DEBUG

# Monitor device operations
$successEvents = Get-EventLog -LogName Application -Source "WorkspaceONE-UEM" | Where-Object { $_.Message -match "successfully" }
$failureEvents = Get-EventLog -LogName Application -Source "WorkspaceONE-UEM" | Where-Object { $_.Message -match "failed|error" }

# Generate compliance metrics
$complianceReport = New-AirwatchComplianceReport -Period DAILY

Security Alerts

# Configure automated alerting
$securityThresholds = @{
    FailedLoginAttempts = 5
    BulkDeviceOperations = 50
    APIErrorsPerMinute = 10
    CredentialUseWithoutMFA = 1
}

# Monitor for security violations
# Automatic escalation to security team
# Integration with SIEM systems

πŸ“š Documentation & Training

Security Guidelines

Training Resources

  • WorkspaceONE UEM Administration - Official VMware training
  • PowerShell Security Best Practices - Microsoft security guidelines
  • Enterprise Mobility Management - Industry best practices
  • Compliance Frameworks - GDPR, CCPA, HIPAA guidelines

πŸ”§ Advanced Usage

Custom Operations

# Create custom device management workflows
function Remove-CorporateDevices {
    param([string[]]$SerialNumbers)
    
    foreach ($serial in $SerialNumbers) {
        try {
            # Validate corporate device ownership
            if (Test-CorporateDevice -SerialNumber $serial) {
                Remove-AirwatchDevice -DeviceId $serial -SearchBy "SerialNumber" -Environment production
                Log-AirwatchComplianceEvent -Action "CORPORATE_DEVICE_REMOVAL" -DeviceId $serial -Success $true
            } else {
                Write-AirwatchLog -Message "Non-corporate device rejected: $serial" -Level WARN -Component "CorporatePolicy"
            }
        }
        catch {
            Log-AirwatchComplianceEvent -Action "DEVICE_REMOVAL_ERROR" -DeviceId $serial -Success $false -ErrorDetails $_.Exception.Message
        }
    }
}

Integration Examples

# Integration with ServiceNow
Invoke-AirwatchApiRequest -Endpoint "/incidents" -Method POST -Body $incidentData | ConvertTo-Json

# Integration with Microsoft Endpoint Manager
$syncData = @{
    WorkspaceONEDevices = Get-AirwatchDeviceInventory
    EndpointManagerDevices = Get-EndpointManagerDevices
}
Sync-DeviceManagementSystems -Data $syncData

# Integration with SIEM (Splunk example)
$complianceEvents = Get-AirwatchComplianceEvents -StartDate (Get-Date).AddDays(-7)
Send-SplunkEvent -Data $complianceEvents -Index "uem_compliance"

πŸ› οΈ Troubleshooting

Common Issues

Issue Solution
Authentication failed Verify API credentials and check system clock sync
Device not found Validate device ID format and search method
Network timeout Check firewall rules and proxy settings
Permission denied Verify user has UEM admin rights and MFA
Configuration corrupt Use backup or reinitialize with Initialize-AirwatchEnvironment

Debug Mode

# Enable debug logging
$env:AIRWATCH_DEBUG = $true
$env:AIRWATCH_LOG_LEVEL = "DEBUG"

# Enable API request/response logging
$env:AIRWATCH_LOG_API_REQUESTS = $true

# Run with verbose output
Import-Module .\Airwatch-DeviceManagement.psm1 -Force -Verbose

Health Checks

# Comprehensive system health check
function Test-AirwatchSystemHealth {
    Write-Host "πŸ” Testing WorkspaceONE UEM system health..."
    
    # Test PowerShell version
    if ($PSVersionTable.PSVersion.Major -lt 5) {
        Write-Host "❌ PowerShell version too old: $($PSVersionTable.PSVersion)" -ForegroundColor Red
        return $false
    }
    
    # Test network connectivity
    try {
        $response = Invoke-WebRequest -Uri "https://cnXXXX.awmdm.com/api/system/health" -TimeoutSec 10
        if ($response.StatusCode -eq 200) {
            Write-Host "βœ… API connectivity test passed" -ForegroundColor Green
        }
    }
    catch {
        Write-Host "❌ API connectivity test failed" -ForegroundColor Red
        return $false
    }
    
    # Test credential encryption
    try {
        $testCredential = Get-AirwatchSecureCredential -Environment production
        if ($testCredential) {
            Write-Host "βœ… Credential encryption test passed" -ForegroundColor Green
        }
    }
    catch {
        Write-Host "❌ Credential encryption test failed" -ForegroundColor Red
        return $false
    }
    
    Write-Host "βœ… All health checks passed" -ForegroundColor Green
    return $true
}

# Run health check
Test-AirwatchSystemHealth

βš–οΈ Legal & Compliance

Enterprise Compliance

This toolkit is designed for:

  • βœ… Authorized enterprise administrators with proper WorkspaceONE UEM access
  • βœ… Corporate device management in compliance with company policies
  • βœ… Regulatory compliance (GDPR, CCPA, HIPAA, SOX)
  • βœ… Audit trail maintenance for internal and external audits
  • βœ… Security incident response with proper documentation

Data Privacy

  • πŸ”’ All credentials encrypted using Windows Data Protection API
  • πŸ“Š Comprehensive audit logging for all operations
  • πŸ” Device data handling with privacy-by-design principles
  • βš–οΈ Compliance reporting for regulatory requirements
  • πŸ—‘οΈ Secure data retention and deletion policies

Usage Restrictions

PROHIBITED ACTIVITIES:

  • ❌ Unauthorized device management
  • ❌ Personal device administration without consent
  • ❌ Bypass of corporate security policies
  • ❌ Data extraction from managed devices
  • ❌ Use without proper enterprise authorization

🀝 Contributing

We welcome contributions from enterprise mobility administrators!

Development Setup

# Clone development environment
git clone https://github.com/E7H31234L/VMware-WorkspaceONE-UEM-Airwatch.git
cd VMware-WorkspaceONE-UEM-Airwatch

# Set up development configuration
Initialize-AirwatchEnvironment -ConfigPath ".\config\development.json"

# Run tests
.\tests\Run-All-Tests.ps1

Contribution Guidelines

  • πŸ”’ Security-first development with comprehensive testing
  • βœ… Enterprise-grade documentation with examples and best practices
  • πŸ§ͺ Automated testing for all functions and edge cases
  • πŸ“‹ Compliance validation for all regulatory requirements
  • πŸ” Code review process with security focus

πŸ“ž Support & Community

Enterprise Support

Community Resources

  • PowerShell Gallery: Enterprise scripts and modules
  • VMware {code}: Community contributions and examples
  • Tech Community: WorkspaceONE user community and forums
  • GitHub Issues: Bug reports and feature requests

πŸ“ˆ Version History

v2.0.0 (2024-01-24) - Enterprise Security Release

  • πŸ” Complete credential encryption using Windows Data Protection API
  • πŸ›‘οΈ Comprehensive input validation and sanitization
  • πŸ“Š Structured audit logging with SIEM integration
  • πŸ” Multi-environment configuration management
  • πŸ“‹ Automated compliance reporting and monitoring
  • πŸ”§ Modular PowerShell module architecture
  • πŸš€ Batch operations with error handling and validation
  • 🌐 Secure API communication with token management
  • βš–οΈ Complete compliance framework (GDPR/CCPA/HIPAA)

v1.0.0 (2022-10-06) - Initial Release

  • πŸ“ Basic device deletion script
  • πŸ”§ Hardcoded credential management
  • πŸ“ Minimal documentation
  • ⚠️ Security limitations and input validation gaps

πŸ“„ License

This project is licensed under the MIT License - see LICENSE file for details.


πŸ™ Acknowledgments

  • VMware Inc. - WorkspaceONE UEM platform and API
  • Microsoft - PowerShell security best practices and Data Protection API
  • Enterprise Community - Security frameworks and compliance guidelines
  • UEM Administrators - Real-world requirements and feedback

πŸ”₯ Ready for Enterprise Deployment

Repository URL: https://github.com/E7H31234L/VMware-WorkspaceONE-UEM-Airwatch

Version: v2.0.0 - Enterprise Security Toolkit πŸ”

Perfect For:

  • 🏒 Enterprise IT departments managing large device fleets
  • πŸ”’ Security teams requiring audit trails and compliance
  • πŸ“‹ Compliance officers needing regulatory reporting
  • πŸ› οΈ Managed Service Providers (MSP) serving multiple clients
  • πŸŽ“ Training organizations teaching UEM administration

🚨 Final Enterprise Reminder

FOR AUTHORIZED ENTERPRISE ADMINISTRATORS ONLY - This toolkit manages sensitive corporate mobility infrastructure and requires proper WorkspaceONE UEM console access with multi-factor authentication.

Enterprise-grade security, compliance, and audit capabilities ready for production deployment! πŸ’πŸ”πŸ“Š

About

Tools for the Administration of VMware WorkspaceONE UEM Console

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors