Hi Guys,
Hope someone can help me I've used Warwick_Tech which works a treat when applied via group policy. But I need to edit the script for it to delete user profiles that are over 5 days old. Will anyone be able to help me, this is the script I'm using at the moment:
$profiles = $null
$profiles = Get-WMIObject -class Win32_UserProfile | Where {((!$_.Special) -and ($_.LocalPath -ne "C:\Users\Administrator") -and ($_.LocalPath -ne "C:\Users\UpdatusUser"))}
if ($profiles -ne $null) {
$profiles | Remove-WmiObject
}
Exit