< Back

Set-AadrmUsageLogStorageAccount

Fri Jan 10, 2020 6:31 pm

NAME Set-AadrmUsageLogStorageAccount



SYNOPSIS

Sets the location for Rights Management usage logs.





SYNTAX

Set-AadrmUsageLogStorageAccount -AccessKey <SecureString> -StorageAccount <String> [<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

(https://docs.microsoft.com/information- ... lyze-usage).





PARAMETERS

-AccessKey <SecureString>

Specifies your access key as a secure string.



To view your access key, connect to the Azure portal.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-StorageAccount <String>

Specifies a storage account.



To obtain the name of this account, use the Azure portal.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES









--------------- 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 (http://go.microsoft.com/fwlink/?LinkID=113291)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.



RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=400623

Get-AadrmUsageLogStorageAccount

ConvertTo-SecureString http://go.microsoft.com/fwlink/?LinkID=113291

Logging and analyzing usage of the Azure Rights Management service

https://docs.microsoft.com/information- ... lyze-usage