PowerShellMicrosoft GraphPHP Intune

Advanced Driver & BIOS Management

Driver and BIOS management strategies using Intune for HP, Dell & Lenovo devices.

📖 Read Full Engineering Guide → 🐙 GitHub Repo
### FILE: index.php
<?php 

// Import necessary dependencies and initialize Microsoft Graph service

// Function to call Microsoft Graph using the M365 SaaS Engine
function graphCall($endpoint, $accessToken, $method = 'GET', $body = null) {
    global $ms; // Ensure $ms is globally accessible
    return $ms->graphCall($endpoint, $accessToken, $method, $body);
}

// Sample use case to fetch device configuration policies and render UI cards
$accessToken = $_SESSION['ms_access_token'];
$endpoint = '/deviceManagement/deviceConfigurations';
$deviceConfigs = graphCall($endpoint, $accessToken);

foreach ($deviceConfigs as $config) {
    render_premium_card(
        $config['name'], 
        $config['description'],
        null, 
        'up', 
        '📊'
    );
}

?>

### FILE: scripts/DellUpdateAutomation.ps1
<#
.SYNOPSIS
Automates the Dell Command Update process on devices using Dell tools.

.DESCRIPTION
This script utilizes Dell's 'Command | Update' utility to check for and apply pending updates. Designed for environments using Microsoft Intune.

.EXAMPLE
DellUpdateAutomation.ps1 -DellCmdExePath "C:\Program Files\Dell\CommandUpdate\dellcommandupdate.exe"

.NOTES
    Author:      Souhaiel Morhag
    Company:     MSEndpoint.com
    Blog:        https://msendpoint.com
    Academy:     https://app.msendpoint.com/academy
    LinkedIn:    https://linkedin.com/in/souhaiel-morhag
    GitHub:      https://github.com/Msendpoint
    License:     MIT
#>
param (
    [string]$DellCmdExePath = "C:\Program Files\Dell\CommandUpdate\dellcommandupdate.exe"
)

try {
    # Check if Dell Command Update executable exists
    if (Test-Path $DellCmdExePath) {
        # Run scan for pending updates
        & $DellCmdExePath --scan
        if ($LASTEXITCODE -eq 0) {
            Write-Host "Dell scan successful - no updates needed." -ForegroundColor Green
            exit 0
        } else {
            # Run update in silent mode if updates are pending
            Write-Host "Dell scan indicated updates pending." -ForegroundColor Yellow
            & $DellCmdExePath --update --silent
            exit $LASTEXITCODE
        }
    } else {
        Write-Host "Dell Command | Update not found, check installation." -ForegroundColor Red
        exit 1
    }
} catch {
    Write-Host "An error occurred: $_" -ForegroundColor Red
    exit 1
}

# End of Script

⚠️ Always review and validate PowerShell scripts in a non-production pilot group before tenant-wide deployment.

🎓 Preparing for MD-102, SC-300, AZ-104 or AB-650?

Practice 1,060+ Microsoft Learn-verified exam questions in Pearson VUE simulator mode.

Free MD-102 Exam → vs MeasureUp