I don't have SP handy right now to test it, but is a calculated property
what you're after?
$webapp.Sites | Select-Object
*,@{Name="SiteStorage";Expression={$_.Usage.Storage}} | Sort-Object
SiteStorage -desc
On 13/08/2012 11:28 AM, Web Admin wrote:
Hi all,
I'm creating an HTML email report in PowerShell that returns the
following table.
Name Site URL Size(MB) #Webs
VS 2010 /sites/dev 1.57 2
Site Test / 6.13 6
Team Site /sites/team 4.29 1
Apps /sites/apps 5.84 6
I would like to sort these by Size descending but am having no luck.
I have a collection of sites from a specified webapp.
$sites = $webapp.Sites
I then iterate through them with a foreach loop. I tried adding the
sort property to the*$sites* var but the *usage *property does not
exist at this level. It's a site property.
foreach (*$site* in (*$sites* | Sort-Object -Descending -Property
*usage.storage*))
Do I need to store the above in another var and then sort it??
--
Regards,
Paul Noone
--
SharePoint Farm Admin/Developer
Infrastructure Team
CEO Sydney
p: (02) 9568 8461
f: (02) 9568 8483
e:paul.no...@syd.catholic.edu.au <mailto:paul.no...@syd.catholic.edu.au>
w:http://www.ceosyd.catholic.edu.au/
_______________________________________________
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
_______________________________________________
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss