Jump to content

chief_67

Members
  • Posts

    3
  • Joined

  • Last visited

Reputation

0 Neutral

About chief_67

Personal Information

  • Occupation
    ICT Technician
  • Location
    Bradford
  1. The WIM is working fine for me as it's tried and tested, Steve21 so the script below should do the job for me with the added script you mentioned $profiles = $null $profiles = Get-WMIObject -class Win32_UserProfile | Where {((!$_.Special) -and ($_.LocalPath -ne "C:\Users\Administrator") -and ($_.LocalPath -ne "C:\Users\UpdatusUser"))} {$_.LastWriteTime -lt (Get-Date).AddDays(-5)} if ($profiles -ne $null) { $profiles | Remove-WmiObject } Exit
  2. 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
  3. I'm having this issue aswell with windows 10.
×
×
  • Create New...