Answer the question
In order to leave comments, you need to log in
Powershaell how to delete user profiles?
Good day,
Tell me how to delete using powershell to delete user profiles whose size is more than 200m
Answer the question
In order to leave comments, you need to log in
$MaxSize = 200
$FolderSize = (Get-ChildItem C:\Users -recurse -Force | Measure-Object -Property Length -Sum).Sum / 1Mb
if ($FolderSize -gt $MaxSize) {
Remove-Item -path "C:\Users\*" -recurse -Force
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question