get quota of a collection using poowershell
Is there a way to retrieve the max and warning storage level from sharepoint 2007? I tried the following but I get "object does not match target type."
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$quota_max = [Microsoft.SharePoint.Administration.SPQuota].GetProperty("StorageMaximumLevel")
$CurrentQuotaMax = ($quota_max.GetValue('spcontent', $null))
I'm getting Exception calling "GetValue" with "2" argument(s): "Object does not match target type."
June 30th, 2011 5:58pm
Hi Master,
Here is a demo about this issue:
http://sharepoint.microsoft.com/Blogs/zach/Lists/Posts/Post.aspx?ID=27
1.
Download the
fucntions.ps1 file and run it in the server at first;
2.
Use the “PS> Get-SPSite http://localhost | Get-SPQuota” command to query the property.
Thanks,
Wayne Fan
TechNet Subscriber Support
in forum
If you have any feedback on our support, please contact
tnmff@microsoft.com.
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2011 10:55pm
Hi Master,
Would you please let us know how is your problem going? Is the suggestion helpful for your issue?
If you need further assistance, please feel free to let us know.
Thanks,
Wayne Fan
TechNet Subscriber Support
in forum
If you have any feedback on our support, please contact
tnmff@microsoft.com.
July 7th, 2011 11:17pm


