get folder size powershell
"{0} MB" -f ((Get-ChildItem C:\users\ -Recurse | Measure-Object -Property Length -Sum -ErrorAction Stop).Sum / 1MB)
get folder size powershell
"{0} MB" -f ((Get-ChildItem C:\users\ -Recurse | Measure-Object -Property Length -Sum -ErrorAction Stop).Sum / 1MB)
get size of file powershell
To get the file sizes in KB:
Get-ChildItem | % {[int]($_.length / 1kb)}
Or to round up to the nearest KB:
Get-ChildItem | % {[math]::ceiling($_.length / 1kb)}
To get the number characters:
Get-ChildItem | % {(Get-Content $_.FullName).length}
credit to Dave Sexton from Stack Overflow
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us