Set-AadrmUsageLogStorageAccount
Sets the location for Rights Management usage logs.
Syntax
Set-AadrmUsageLogStorageAccount
-StorageAccount <String>
-AccessKey <SecureString>
[<CommonParameters>]
Description
The Set-AadrmUsageLogStorageAccount cmdlet sets the Azure storage location for usage logs for Azure Rights Management.
You must use PowerShell to set this information; you cannot do this action by using a management portal.
This cmdlet should be used only if you have usage logs prior to the usage logging change in February 2016. After this date, the only Windows PowerShell cmdlet that you need for Azure RMS usage logging is Get-AadrmUserLog.
For more information about usage logging, see Logging and analyzing usage of the Azure Rights Management service.
Examples
Example 1: Set the log location
PS C:\>$AccessKey = ConvertTo-SecureString "aeDpsMswiYNGNwOaCkOrfPiDtIpjRREosiXNLKrG" -AsPlainText -Force
PS C:\> Set-AadrmUsageLogStorageAccount -AccessKey $AccessKey -StorageAccount "RmsStorageAccount"
The first command uses the ConvertTo-SecureString cmdlet to convert your access key to a secure string, and then stores it in the $AccessKey variable.
For more information, type Get-Help ConvertTo-SecureString
.
The second command specifies the location for your usage logs.
Parameters
-AccessKey
Specifies your access key as a secure string.
To view your access key, connect to the Azure portal.
Type: | SecureString |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-StorageAccount
Specifies a storage account.
To obtain the name of this account, use the Azure portal.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |