function funline($strin="hello")ide
{get
$num=$strin.lengthit
for($i=1;$i -le $num;$i++){$funline = $funline + "="}io
Write-Host -ForegroundColor Yellow $strinast
Write-Host -ForegroundColor DarkRed $funlinefunction
}class
$folder="C:\Users\qliangliang.BOOK\Documents"date
$date=get-datefile
$limit=3im
$xfiles=$Null
Get-ChildItem -Path $folder -Force | ForEach-Object {
$newdate=($_.LastAccessTime).AddDays($limit)
$limitDate=New-TimeSpan -Start $date -End $newdate
if($limitDate -le 0)
{
$xfiles+=@{$_.Name=$_.LastAccessTime}
}
}
funline("the expired files art listed below")
$xfiles