My Azure SQL Server has been storing the audit logs for over a year, and storage size is in the TBs. I would like to keep the logs for 3 months max and delete the rest, how can I do this using PowerShell?
Would setting the RetentionInDays
parameter of Set-AzureRmSqlServerAuditingPolicy cmdlet
to 90 days achieve the same? Will it delete anything older than 90 days, or would I need to run a script to explicitly delete them?
Thanks, and really appreciate it.