# Check if the Microsoft Graph PowerShell SDK is installed if (-not (Get-Module -ListAvailable -Name Microsoft.Graph)) { Install-Module -Name Microsoft.Graph -Scope CurrentUser -Force } # Check if the Microsoft Graph PowerShell SDK is installed if (-not (Get-Module -ListAvailable -Name Microsoft.Graph.Beta)) { Install-Module -Name Microsoft.Graph.Beta -Scope CurrentUser -Force } # Connect to Microsoft Graph Connect-MgGraph -Scopes "DeviceManagementConfiguration.ReadWrite.All", "Organization.Read.All", "Group.ReadWrite.All", "Directory.ReadWrite.All" -NoWelcome $params = @{ "@odata.type"= "#microsoft.graph.windowsUpdateForBusinessConfiguration" "displayName"= "Win - OIB - WUfB Drivers - Ring 1 - Pilot - v3.0" "description"= "" # Empty string if description is not needed "automaticUpdateMode"= "autoInstallAndRebootAtMaintenanceTime" # You can adjust based on requirements "qualityUpdatesDeferralPeriodInDays"= 7 # Example deferral value "featureUpdatesDeferralPeriodInDays"= 30 # Example deferral value "allowMicrosoftUpdate"= $true # Enables updates for Microsoft products "roleScopeTagIds"= @("0") # Example role scope tag ID "assignments"= @() # Empty array for assignments } # Use the display name from the parameters for identification $ring = $params.displayName # Create the driver update profile $null = New-MgDeviceManagementDeviceConfiguration -BodyParameter $params Write-Host "✅ Successfully created $ring" $null = Disconnect-Graph -ErrorAction SilentlyContinue