Public/generated/Get-KriticalUtcmIntuneDeviceCleanupRuleV2.ps1
|
# Kritical.PS.UTCM | Microsoft Graph UTCM REST API toolkit # (c) 2026 Kritical Pty Ltd | https://kritical.net # Kritical brand banner is rendered at module load via Write-KriticalUtcmBanner. function Get-KriticalUtcmIntuneDeviceCleanupRuleV2 { <# .SYNOPSIS Kritical.UTCM shim for M365DSC resource IntuneDeviceCleanupRuleV2. .DESCRIPTION Search-replace safe: callers that today invoke Get-M365DSCIntuneDeviceCleanupRuleV2 -Credential $cred -TenantId $tid can rename to Get-KriticalUtcmIntuneDeviceCleanupRuleV2 -Credential $cred -TenantId $tid with ZERO other edits. Parameter shape matches the M365DSC .schema.mof exactly. By default -PreferM365DscBehavior is true. Actual Graph dispatch is delegated to Invoke-KriticalUtcmM365DscSchemaBridge. Bridge maps resource → Graph endpoint per per-resource wave; where mapping is not yet shipped, bridge returns an object with Verdict='UNMAPPED'. .NOTES Workload: Intune Param count: 14 #> [CmdletBinding()] param( # Indicates the description for the device clean up rule. [string]$Description, # Indicates the managed device platform for which the admin wants to create the device clean up rule. Possible values are: all, androidAOSP, androidDeviceAdministrator, androidDedicatedAndFullyManagedCorporateOwnedWorkProfile, chromeOS, androidPersonallyOwnedWorkProfile, ios, macOS, windows, windowsHolographic, unknownFutureValue, visionOS, tvOS. [ValidateSet('all','androidAOSP','androidDeviceAdministrator','androidDedicatedAndFullyManagedCorporateOwnedWorkProfile','chromeOS','androidPersonallyOwnedWorkProfile','ios','macOS','windows','windowsHolographic','visionOS','tvOS')] [string]$DeviceCleanupRulePlatformType, # Indicates the number of days when the device has not contacted Intune. Valid values 0 to 2147483647 [int]$DeviceInactivityBeforeRetirementInDays, # Indicates the display name of the device cleanup rule. [Parameter(Mandatory)] [string]$DisplayName, # The unique identifier for an entity. Read-only. [string]$Id, # Present ensures the policy exists, absent ensures it is removed. [ValidateSet('Present','Absent')] [string]$Ensure, # Credentials of the Admin [string]$Credential, # Id of the Azure Active Directory application to authenticate with. [string]$ApplicationId, # Id of the Azure Active Directory tenant used for authentication. [string]$TenantId, # Secret of the Azure Active Directory tenant used for authentication. [string]$ApplicationSecret, # Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. [string]$CertificateThumbprint, # Username can be made up to anything but password will be used for CertificatePassword [string]$CertificatePassword, # Path to certificate used in service principal usually a PFX file. [string]$CertificatePath, # Managed ID being used for authentication. [bool]$ManagedIdentity ) Invoke-KriticalUtcmM365DscSchemaBridge -ResourceName 'IntuneDeviceCleanupRuleV2' -Workload 'Intune' -Verb 'Get' -CallerParams $PSBoundParameters } |