Az.ChangeAnalysis
Provides cmdlets for managing Azure Change Analysis.
About this module
The Az.ChangeAnalysis module contains cmdlets for interacting with the Azure Change Analysis service. This service helps you detect and understand changes made to your Azure resources, providing insights into who made the change, when, and what was changed.
Cmdlets
- Get-AzChangeAnalysisAlert: Gets Azure Change Analysis alerts.
- Get-AzChangeAnalysisHistory: Gets the history of changes for an Azure resource.
Get-AzChangeAnalysisAlert
Description
Retrieves information about Azure Change Analysis alerts. These alerts can notify you of significant changes made to your resources.
Syntax
Get-AzChangeAnalysisAlert -ResourceGroupName <String> [-SubscriptionId <String>] [<CommonParameters>]Parameters
| Name | Type | Description | Required | 
|---|---|---|---|
| -ResourceGroupName | String | The name of the resource group. | Yes | 
| -SubscriptionId | String | The Azure subscription ID. | No | 
Examples
Example 1: Get alerts for a resource group
            Get-AzChangeAnalysisAlert -ResourceGroupName "MyResourceGroup"Get-AzChangeAnalysisHistory
Description
Retrieves the change history for a specified Azure resource. This cmdlet allows you to see a detailed log of modifications made to a resource over time.
Syntax
Get-AzChangeAnalysisHistory -ResourceProvider <String> -ResourceType <String> -ResourceName <String> [-SubscriptionId <String>] [-StartTime <DateTime>] [-EndTime <DateTime>] [<CommonParameters>]Parameters
| Name | Type | Description | Required | 
|---|---|---|---|
| -ResourceProvider | String | The resource provider of the resource (e.g., 'Microsoft.Compute'). | Yes | 
| -ResourceType | String | The type of the resource (e.g., 'virtualMachines'). | Yes | 
| -ResourceName | String | The name of the resource. | Yes | 
| -SubscriptionId | String | The Azure subscription ID. | No | 
| -StartTime | DateTime | The start time for the change history query. | No | 
| -EndTime | DateTime | The end time for the change history query. | No | 
Examples
Example 1: Get change history for a virtual machine
            Get-AzChangeAnalysisHistory -ResourceProvider "Microsoft.Compute" -ResourceType "virtualMachines" -ResourceName "MyVM" -StartTime "2023-01-01" -EndTime "2023-12-31"Example 2: Get all change history for a storage account
            Get-AzChangeAnalysisHistory -ResourceProvider "Microsoft.Storage" -ResourceType "storageAccounts" -ResourceName "mystorageaccount"