Resolve SID to User Name using PowerShell

You can convert a Windows Security Identifier (SID) to the relevant Windows Account using the PowerShell below.

$sid = New-Object System.Security.Principal.SecurityIdentifier("s-1-5-21-533821404-679435524-3136109084-15314")
$user = $sid.Translate([System.Security.Principal.NTAccount])

Populating Large Lists using PowerShell

Below is a PowerShell snippet that creates dummy data in a list for large data volume testing.

Add-PSSnapin Microsoft.SharePoint.Powershell

$site = Get-SPSite("http://site-url");
$web = $site.OpenWeb("web-url");
$list = $web.Lists.TryGetList("Large List");

if ($list) {
    $colours = "Red", "Green", "Blue";
    $brands = "Toyota", "Mazda", "Volkswagon", "Hyundai", "BMW", "Mercedes", "Suzuki";

    for($i = 0; $i -le 3000; $i++) {
        $item = $list.AddItem();
        $item["Title"] = (Get-Date).Ticks
        $item["Colour"] = $colours[(Get-Random -Maximum $colours.Count)];
        $item["Year"] = Get-Random -Minimum 2000 -Maximum 2017
        $item["Brand"] = $brands[(Get-Random -Maximum $brands.Count)];


SharePoint List View Threshold


Set to 5000 by default, and should not be increased, unless you like slow performing SharePoint sites.

Reducing the list view threshold provides very minimal performance gains, so don’t bother.


  • Accessing list views that contain too many items
    • Pagination does not help, as the backend query is getting all results, and pagination only breaks up the query results
  • Attempting to perform privileged operations (adding a column, creating an index, adding content types)
  • Custom code that accesses a large list

Mitigation Methods

Continue reading