Set-AzureStorageServiceLoggingProperty
Modifies logging for Azure Storage services.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Set-AzureStorageServiceLoggingProperty
[-ServiceType] <StorageServiceType>
[-Version <Double>]
[-RetentionDays <Int32>]
[-LoggingOperations <LoggingOperations[]>]
[-PassThru]
[-Context <IStorageContext>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Set-AzureStorageServiceLoggingProperty cmdlet modifies logging for Azure Storage services.
Examples
Example 1: Modify logging properties for the Blob service
C:\PS>Set-AzureStorageServiceLoggingProperty -ServiceType Blob -LoggingOperations Read,Write -PassThru -RetentionDays 10 -Version 1.0
This command modifies version 1.0 logging for blob storage to include read and write operations. Azure Storage service logging retains entries for 10 days. Because this command specifies the PassThru parameter, the command displays the modified logging properties.
Parameters
-Context
Specifies an Azure storage context. To obtain a storage context, use the New-AzureStorageContext cmdlet.
Type: | IStorageContext |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LoggingOperations
Specifies an array of Azure Storage service operations. Azure Storage services logs the operations that this parameter specifies. The acceptable values for this parameter are:
- None
- Read
- Write
- Delete
- All
Type: | LoggingOperations[] |
Accepted values: | None, Read, Write, Delete, All |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PassThru
Indicates that this cmdlet returns the updated logging properties. If you do not specify this parameter, this cmdlet does not return a value.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RetentionDays
Specifies the number of days that the Azure Storage service retains logged information.
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServiceType
Specifies the storage service type. This cmdlet modifies the logging properties for the service type that this parameter specifies. The acceptable values for this parameter are:
- Blob
- Table
- Queue
- File The value of File is not currently supported.
Type: | StorageServiceType |
Accepted values: | Blob, Table, Queue, File |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Version
Specifies the version of the Azure Storage service logging. The default value is 1.0.
Type: | Nullable<T>[Double] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |