Hi there! I'm a newbie in powershell. As you can see, maybe my problem is kinda easy but i'm getting nuts over here.
I got this object, that is an array
PS C:\scripts\CleanScan> $gotFiles.GetType()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True Object[] System.Array
It came from an query gci
$gotFiles = Get-ChildItem -Path $path -Recurse | Where-Object {$_.CreationTime -lt $limit}
It gets the files in a directory older than $limit
Then my problem: Need to get the size in KB of each item in the array.
Any help would be appreciated.