Hello!
I have a little problem with my tiny ps script. I would like sum userprofile directory without Local Settings. I tried 2 way, but still i failed.
$profile_dir = $env:USERPROFILE
$profile_dir_localsettings = $profile_dir + "\Local Settings"
1, Get-ChildItem $profile_dir -Exclude "Local Settings" -Force -Recurse | Measure-Object -Property length -sum
2, Get-ChildItem $profile_dir -Exclude $profile_dir_localsettings -Force -Recurse | Measure-Object -Property length -sum
What's the problem?