Public/UpdateData.ps1
|
function Get-MgWindowsUpdateDeviceProfileBeta { <# .SYNOPSIS Gets Windows Autopatch device profiles using the beta reporting API. .DESCRIPTION Gets Windows Autopatch device profiles using the beta reporting API. This command uses the Microsoft Graph beta endpoint; beta behavior and schemas can change without notice. Requires WindowsUpdates.Read.All or WindowsUpdates.ReadWrite.All in the active Microsoft Graph context. .PARAMETER All Follows Microsoft Graph pagination links until all result pages are returned. .PARAMETER DeviceProfileId Specifies the Microsoft Graph identifier of the device profile. .PARAMETER Filter Specifies an OData $filter expression. .PARAMETER OrderBy Specifies an OData $orderby expression. .PARAMETER Query Specifies additional OData query parameters as key-value pairs. .PARAMETER Select Specifies properties to include through OData $select. .PARAMETER Top Specifies the maximum number of items requested from Microsoft Graph. .EXAMPLE PS> Get-MgWindowsUpdateDeviceProfileBeta ` -Select id ` -All Gets Windows Autopatch device profiles using the beta reporting API. The example requests useful identity fields and follows all pages when the endpoint supports pagination. #> [CmdletBinding()] param( [string] $DeviceProfileId, [string] $Filter, [string[]] $Select, [string[]] $OrderBy, [ValidateRange(1, 999)] [int] $Top, [switch] $All, [hashtable] $Query ) $path = if ($DeviceProfileId) { "data/deviceProfiles/$DeviceProfileId" } else { 'data/deviceProfiles' } $odata = Get-MgWindowsUpdatesQuery -BoundParameters $PSBoundParameters Invoke-MgWindowsUpdatesRequest -Method GET -Path $path -Query $odata -All:$All } function Get-MgWindowsUpdatePolicyAssignmentBeta { <# .SYNOPSIS Gets Windows Autopatch policy assignments using the beta reporting API. .DESCRIPTION Gets Windows Autopatch policy assignments using the beta reporting API. This command uses the Microsoft Graph beta endpoint; beta behavior and schemas can change without notice. Requires WindowsUpdates.Read.All or WindowsUpdates.ReadWrite.All in the active Microsoft Graph context. .PARAMETER All Follows Microsoft Graph pagination links until all result pages are returned. .PARAMETER Filter Specifies an OData $filter expression. .PARAMETER OrderBy Specifies an OData $orderby expression. .PARAMETER PolicyAssignmentId Specifies the Microsoft Graph identifier of the policy assignment. .PARAMETER Query Specifies additional OData query parameters as key-value pairs. .PARAMETER Select Specifies properties to include through OData $select. .PARAMETER Top Specifies the maximum number of items requested from Microsoft Graph. .EXAMPLE PS> Get-MgWindowsUpdatePolicyAssignmentBeta ` -Select id ` -All Gets Windows Autopatch policy assignments using the beta reporting API. The example requests useful identity fields and follows all pages when the endpoint supports pagination. #> [CmdletBinding()] param( [string] $PolicyAssignmentId, [string] $Filter, [string[]] $Select, [string[]] $OrderBy, [ValidateRange(1, 999)] [int] $Top, [switch] $All, [hashtable] $Query ) $path = if ($PolicyAssignmentId) { "data/policyAssignments/$PolicyAssignmentId" } else { 'data/policyAssignments' } $odata = Get-MgWindowsUpdatesQuery -BoundParameters $PSBoundParameters Invoke-MgWindowsUpdatesRequest -Method GET -Path $path -Query $odata -All:$All } function Get-MgWindowsUpdateApplicableCatalogSummaryBeta { <# .SYNOPSIS Gets catalog applicability summaries using the beta reporting API. .DESCRIPTION Gets catalog applicability summaries using the beta reporting API. This command uses the Microsoft Graph beta endpoint; beta behavior and schemas can change without notice. Requires WindowsUpdates.Read.All or WindowsUpdates.ReadWrite.All in the active Microsoft Graph context. .PARAMETER All Follows Microsoft Graph pagination links until all result pages are returned. .PARAMETER ApplicableCatalogSummaryId Specifies the Microsoft Graph identifier of the applicable catalog summary. .PARAMETER Filter Specifies an OData $filter expression. .PARAMETER OrderBy Specifies an OData $orderby expression. .PARAMETER Query Specifies additional OData query parameters as key-value pairs. .PARAMETER Select Specifies properties to include through OData $select. .PARAMETER Top Specifies the maximum number of items requested from Microsoft Graph. .EXAMPLE PS> Get-MgWindowsUpdateApplicableCatalogSummaryBeta ` -Select id ` -All Gets catalog applicability summaries using the beta reporting API. The example requests useful identity fields and follows all pages when the endpoint supports pagination. #> [CmdletBinding()] param( [string] $ApplicableCatalogSummaryId, [string] $Filter, [string[]] $Select, [string[]] $OrderBy, [ValidateRange(1, 999)] [int] $Top, [switch] $All, [hashtable] $Query ) $path = if ($ApplicableCatalogSummaryId) { "data/applicableCatalogSummaries/$ApplicableCatalogSummaryId" } else { 'data/applicableCatalogSummaries' } $odata = Get-MgWindowsUpdatesQuery -BoundParameters $PSBoundParameters Invoke-MgWindowsUpdatesRequest -Method GET -Path $path -Query $odata -All:$All } function Get-MgWindowsUpdateAggregatedDeviceBeta { <# .SYNOPSIS Gets aggregated device applicability for a catalog summary using the beta API. .DESCRIPTION Gets aggregated device applicability for a catalog summary using the beta API. This command uses the Microsoft Graph beta endpoint; beta behavior and schemas can change without notice. Requires WindowsUpdates.Read.All or WindowsUpdates.ReadWrite.All in the active Microsoft Graph context. .PARAMETER All Follows Microsoft Graph pagination links until all result pages are returned. .PARAMETER ApplicableCatalogSummaryId Specifies the Microsoft Graph identifier of the applicable catalog summary. .PARAMETER Filter Specifies an OData $filter expression. .PARAMETER OrderBy Specifies an OData $orderby expression. .PARAMETER Query Specifies additional OData query parameters as key-value pairs. .PARAMETER Select Specifies properties to include through OData $select. .PARAMETER Top Specifies the maximum number of items requested from Microsoft Graph. .EXAMPLE PS> $applicableCatalogSummaryId = '<applicable-catalog-summary-id>' Get-MgWindowsUpdateAggregatedDeviceBeta ` -ApplicableCatalogSummaryId $applicableCatalogSummaryId ` -Select id ` -All Gets aggregated device applicability for a catalog summary using the beta API. The example requests useful identity fields and follows all pages when the endpoint supports pagination. #> [CmdletBinding()] param( [Parameter(Mandatory)] [string] $ApplicableCatalogSummaryId, [string] $Filter, [string[]] $Select, [string[]] $OrderBy, [ValidateRange(1, 999)] [int] $Top, [switch] $All, [hashtable] $Query ) $odata = Get-MgWindowsUpdatesQuery -BoundParameters $PSBoundParameters Invoke-MgWindowsUpdatesRequest -Method GET ` -Path "data/applicableCatalogSummaries/$ApplicableCatalogSummaryId/aggregatedDevices" ` -Query $odata ` -All:$All } function Get-MgWindowsUpdateDriverReportBeta { <# .SYNOPSIS Gets driver update reports using the beta reporting API. .DESCRIPTION Gets driver update reports using the beta reporting API. This command uses the Microsoft Graph beta endpoint; beta behavior and schemas can change without notice. Requires WindowsUpdates.Read.All or WindowsUpdates.ReadWrite.All in the active Microsoft Graph context. .PARAMETER All Follows Microsoft Graph pagination links until all result pages are returned. .PARAMETER DriverUpdateReportId Specifies the Microsoft Graph identifier of the driver update report. .PARAMETER Filter Specifies an OData $filter expression. .PARAMETER OrderBy Specifies an OData $orderby expression. .PARAMETER Query Specifies additional OData query parameters as key-value pairs. .PARAMETER Select Specifies properties to include through OData $select. .PARAMETER Top Specifies the maximum number of items requested from Microsoft Graph. .EXAMPLE PS> Get-MgWindowsUpdateDriverReportBeta ` -Select id ` -All Gets driver update reports using the beta reporting API. The example requests useful identity fields and follows all pages when the endpoint supports pagination. #> [CmdletBinding()] param( [string] $DriverUpdateReportId, [string] $Filter, [string[]] $Select, [string[]] $OrderBy, [ValidateRange(1, 999)] [int] $Top, [switch] $All, [hashtable] $Query ) $path = if ($DriverUpdateReportId) { "data/drivers/$DriverUpdateReportId" } else { 'data/drivers' } $odata = Get-MgWindowsUpdatesQuery -BoundParameters $PSBoundParameters Invoke-MgWindowsUpdatesRequest -Method GET -Path $path -Query $odata -All:$All } function Get-MgWindowsUpdateDriverDeviceStatusBeta { <# .SYNOPSIS Gets per-device driver update status using the beta reporting API. .DESCRIPTION Gets per-device driver update status using the beta reporting API. This command uses the Microsoft Graph beta endpoint; beta behavior and schemas can change without notice. Requires WindowsUpdates.Read.All or WindowsUpdates.ReadWrite.All in the active Microsoft Graph context. .PARAMETER All Follows Microsoft Graph pagination links until all result pages are returned. .PARAMETER DriverUpdateDeviceStatusId Specifies the Microsoft Graph identifier of the driver update device status. .PARAMETER DriverUpdateReportId Specifies the Microsoft Graph identifier of the driver update report. .PARAMETER Filter Specifies an OData $filter expression. .PARAMETER OrderBy Specifies an OData $orderby expression. .PARAMETER Query Specifies additional OData query parameters as key-value pairs. .PARAMETER Select Specifies properties to include through OData $select. .PARAMETER Top Specifies the maximum number of items requested from Microsoft Graph. .EXAMPLE PS> $driverUpdateReportId = '<driver-update-report-id>' Get-MgWindowsUpdateDriverDeviceStatusBeta ` -DriverUpdateReportId $driverUpdateReportId ` -Select id ` -All Gets per-device driver update status using the beta reporting API. The example requests useful identity fields and follows all pages when the endpoint supports pagination. #> [CmdletBinding()] param( [Parameter(Mandatory)] [string] $DriverUpdateReportId, [string] $DriverUpdateDeviceStatusId, [string] $Filter, [string[]] $Select, [string[]] $OrderBy, [ValidateRange(1, 999)] [int] $Top, [switch] $All, [hashtable] $Query ) $path = "data/drivers/$DriverUpdateReportId/deviceStatuses" if ($DriverUpdateDeviceStatusId) { $path += "/$DriverUpdateDeviceStatusId" } $odata = Get-MgWindowsUpdatesQuery -BoundParameters $PSBoundParameters Invoke-MgWindowsUpdatesRequest -Method GET -Path $path -Query $odata -All:$All } |