$usuarios = ls C:\Users | where {$_.LastAccessTime -lt (Get-Date).AddDays(-10)} | select -ExpandProperty name foreach ($usuario in $usuarios) { $usuario Get-WmiObject win32_userprofile | where {!$_.special -and $_.LocalPath.split('\')[2] -eq $usuario} | Remove-WmiObject -WhatIf }
Eliminar los perfiles de los usuarios cuyo último acceso sea inferior a 10 días (PowerShell)
Except where otherwise noted, Jesusninoc by Jesús N. is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.