clear-host $Date = (Get-Date).AddDays(-1) $varCheminRepertoireScript = [System.IO.Path]::GetDirectoryName($MyInvocation.MyCommand.Definition) #On récupère le chemin du répertoire contenant ce script Get-ChildItem -Path $varCheminRepertoireScript -File | Where-Object {$_.Name -match '^ssl.*log$' -and $_.CreationTime -ge $Date} | Sort-Object -property CreationTime -Descending | Select-Object -first 1 | ForEach-Object {Get-Content -Path $($_.FullName) -Tail 30 -Wait}