$ReportsFolder = "\\zusscgrcprodwebhelp.file.core.windows.net\webhelp\dev\scripts\LinkChecker\Results"
$LatestFile = Get-ChildItem -Path $ReportsFolder -Attributes !Directory *Invalid-Links* | Sort-Object -Descending -Property LastWriteTime | select -First 1
Write-Output $LatestFile.Name
$LatestDate = $LatestFile.Name.substring(0,10)
Write-Output $LatestDate

# #Get-ChildItem $ReportsFolder\*.* -exclude -Pattern $LatestDate | Remove-Item -Force
# Get-ChildItem $ReportsFolder\*.* | Where-Object {
#    $_.name -notcontains $LatestDate } | `
#    Remove-Item -WhatIf

Get-ChildItem $ReportsFolder -Exclude *$LatestDate* $_.name | Remove-Item