Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Find Largest File in User Profile with PowerShell

$
0
0

Summary: Use Windows PowerShell to find the largest file in your user profile.

Hey, Scripting Guy! Question How can I use Windows PowerShell to find the largest file in my user profile?

Hey, Scripting Guy! Answer Use the Get-ChildItem cmdlet (dir is an alias for the Get-ChildItem), do a recursive search
          of your user profile directory, then sort the files by size and select the last file:

dir $env:USERPROFILE -Recurse -File | sort length | select -last 1


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>