How to find the size of the largest doc lib - sharepoint-2010

Is there a way to find the document library of which total size (the sum of sizes of its contained documents) is the larges in the farm.
I checked web Analytics --> Inventory --> Storage Usage
But it didn't provide what I need

I posted the same question to SharePoint community and I got the below answer and it worked
if you have access to powershell then use this
#Get the Site collection
$Site = Get-SPsite "http://sharepoint.crescent.com"
#Returns a DataTable similar to "Storage Management Page" in Site settings
$DataTable = $Site.StorageManagementInformation(2,0x11,0,10)
$DataTable | Select Title, ItemCount, Size, Directory | Format-Table
Get SharePoint Library Size with PowerShell
Here it is

Related

Why am i getting different asset amount using algorand Indexer vs daemon?

So I created a new ASA (AKA: Algorand Standard Asset) and set the total amount of that asset to be maximum.
Here's a quick snippet of how I did it:
const UINT64_MAX: bigint = BigInt('18446744073709551615');
Now, When I check how many tokens asset creator has with Algorand's Daemon API
curl http://localhost:8980/v2/accounts/3IELQKOD...3C5IB3BP4V4A/assets
I get it exactly right as: 18446744073709551615
But when i check it with the indexer in the sdk its something different.
It shows total assets as "18446744073709552000" to be exact which is not true.
What am i doing wrong here or this is error in library?
you need to set your client to support big int or mixed.
as JS Only supports 2^^53
You can easily set it by setting IntDecoding method for all JSON requests created by client here.

Migrating from Microsoft.Azure.Storage.Blob to Azure.Storage.Blobs - directory concepts missing

These are great guides for migrating between the different versions of NuGet package:
https://github.com/Azure/azure-sdk-for-net/blob/Azure.Storage.Blobs_12.6.0/sdk/storage/Azure.Storage.Blobs/README.md
https://elcamino.cloud/articles/2020-03-30-azure-storage-blobs-net-sdk-v12-upgrade-guide-and-tips.html
However I am struggling to migrate the following concepts in my code:
// Return if a directory exists:
container.GetDirectoryReference(path).ListBlobs().Any();
where GetDirectoryReference is not understood and there appears to be no direct translation.
Also, the concept of a CloudBlobDirectory does not appear to have made it into Azure.Storage.Blobs e.g.
private static long GetDirectorySize(CloudBlobDirectory directoryBlob) {
long size = 0;
foreach (var blobItem in directoryBlob.ListBlobs()) {
if (blobItem is BlobClient)
size += ((BlobClient) blobItem).GetProperties().Value.ContentLength;
if (blobItem is CloudBlobDirectory)
size += GetDirectorySize((CloudBlobDirectory) blobItem);
}
return size;
}
where CloudBlobDirectory does not appear anywhere in the API.
There's no such thing as physical directories or folders in Azure Blob Storage. The directories you sometimes see are part of the blob (e.g. folder1/folder2/file1.txt). The List Blobs requests allows you to add a prefix and delimiter in a call, which are used by the Azure Portal and Azure Data Explorer to create a visualization of folders. As example prefix folder1/ and delimiter / would allow you to see the content as if folder1 was opened.
That's exactly what happens in your code. The GetDirectoryReference() adds a prefix. The ListBlobs() fires a request and Any() checks if any items return.
For V12 the command that'll allow you to do the same would be GetBlobsByHierarchy and its async version. In your particular case where you only want to know if any blobs exist in the directory a GetBlobs with prefix would also suffice.

Adding a TFS server group to access levels via command line

I am creating a group of users within TFS 2013 and I want to add them to the none default access level (ex. the full access group) but I noticed I am only able to do this through the web interface by adding a TFS Group under that certain level. I am wondering if there is a way to do this via the developer tool (command line) as everything I am doing is being done in a batch script.
Any input would be appreciated. Thanks!
Create 3 TFS server groups; add these groups to the different access levels (e.g. TFS_ACCESS_LEVEL_(NONE|STANDARD|FULL)). Now use the TFSSecurity commandline tool to add groups to these existing and mapped groups(tfssecurity /g+ TFS_ACCESS_LEVEL_NONE GroupYouWantToHaveThisAccessLevel). There is no other way to directly add people to the access levels, except probably through the Object Model using C#.
For the record, tfssecurity may require the URI, which can be obtained via API. This is easy to do in Powershell, here is how to create a TFS group
[psobject] $tfs = get-tfs -serverName $collection
$projectUri = ($tfs.CSS.ListAllProjects() | where { $_.Name -eq $project }).Uri
& $TFSSecurity /gc $projectUri $groupName $groupDescription /collection:$collection
Full script at TfsSecurity wrapper.

How to remove web part file (say abc.webpart) from Web Part Gallery using PowerShell

Even after disabling and uninstalling a SharePoint feature along with uninstalling and removing SharePoint solution, the .webpart files are still getting listed in "Web Part Gallery".
I issued the commands in the following sequence:
Disable-SPFeature
Uninstall-SPFeature
Uninstall-SPSolution
Remove-SPSolution
I could still see that .webpart files are hanging around. Imagine that I know the web part file names (say abc.webpart), how can I clean them up (totally remove) using SharePoint PowerShell.
This powershell should get you started (it's not production ready but will do the job)
$spQuery = New-Object Microsoft.SharePoint.SPQuery
$camlQuery = '<Where><Eq><FieldRef Name="FileLeafRef" /><Value Type="Text">abc.webpart</Value></Eq> </Where>'
$spQuery.Query = $camlQuery
$site = Get-SPSite -Identity "http://site-collection-url"
$webpartgallery = $site.GetCatalog( [Microsoft.SharePoint.SPListTemplateType]::WebPartCatalog)
$webparts = $webpartgallery.GetItems($spQuery)
$webparts[0].Recycle()

<adlcp:map> in scorm 2004 4th edition

We are building API for scorm 2004 4th edition , we start using the the official Test Suite but in the DMI test we get the following error :
"ERROR: Attempted to access an objective with the id "tarID1" but "tarID1" was not found."
when i looked in the manifest xml file i found that those elements are defined as "adlcp:map" , where shall i save this tag ? what this tag represent ?
Anything you would want to know about any element in a manifest (assuming it doesn't utilize third-party extensions) can be found in the official SCORM documentation.
Download the documentation suite. In the CAM book, look for section 3.4.1.19, titled "<map> Element".
Source: SCORM 2004 4th Edition Content Aggregation Model (CAM) Book, available from adlnet.gov (download the documentation suite).
This is used for shared buckets, or data which can be accessed and set across courses/SCO's. For example, you might have a pretest and need that score/user answers in another SCO for providing feedback.
For those looking for more info on implementation:
Add this to your item (organisation > item) in the manifest:
<adlcp:data>
<adlcp:map targetID="mybucketname" readSharedData="true" writeSharedData="true"/>
</adlcp:data>
JS part (Use your API calls in place of LMSGetValue and LMSSetValue)
var dataBucketsCount = LMSGetValue("adl.data._count");
dataBucketsCount = parseInt(dataBucketsCount);
for (var i=0; i < dataBucketsCount; i++){
if (LMSGetValue("adl.data." + i + ".id") == "mybucketname"){
//do your processing with the data
}
}
You can google for RTE Handbook SCORM 2004 4th edition, to get details on the manifest elements.
However this is a lovely way to save data from one course and get it in other, provided your LMS supports it. Also, the character limit is same as suspend data.