chore: add multiple new policies.

This commit is contained in:
2025-03-16 22:39:48 +10:00
parent 104b34de50
commit dce88deb1b
51 changed files with 11136 additions and 26 deletions

35
UpdateRings.ps1 Normal file
View File

@ -0,0 +1,35 @@
# 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