How To Access User Information List In SharePoint 2013 Using Power Shell Scripts

UserInfo List

When we grant any user permissions they are added automatically to the hidden user information list; a new item will be created in the user information list, which stores some information about the user.

SharePoint user Information list stores information about a user by having some metadata set up for the user.
Some examples are User Picture, Email, DisplayName, LoginName etc.

For a complete list of fields, see further in this blog under User Information List Fields.

When a user add/create or edit an item, documents or pages SharePoint will display the created by or last modified by the details for the users and these all comes from the SharePoint user information list

URL for User Information List

http://siteurl/_catalogs/users/detail.aspx
http://siteurl/_catalogs/users/simple.aspx
http://siteurl/_catalogs/users/allgroups.aspx
http://siteurl/_layouts/15/people.aspx?MembershipGroupId=0
 
URL for Office 365

http://siteurl/_layouts/15/people.aspx?MembershipGroupId=0 
  1. $webUrl = Read-Host "Enter the web url"  
  2.   
  3. $web = Get-SPWeb $webUrl  
  4.   
  5. $list = $web.Lists["User Information List"]  
  6.   
  7. $query = New-Object Microsoft.SharePoint.SPQuery  
  8.   
  9. $queryCamlString = '<Query><OrderBy><FieldRef Name="Title" Ascending="True" /></OrderBy></Query>'  
  10.   
  11. $query.Query = $queryCamlString  
  12.   
  13. $userInformationListItems = $list.GetItems($query)  
  14.   
  15. foreach($userInformationListItem in $userInformationListItems)  
  16.   
  17. {  
  18.   
  19.     Write-Host $userInformationListItem.Title  
  20.   
  21. }  
Was my blog helpful?

If so, please let me know at the bottom of this page. If not, let me know what was confusing or missing and I’ll use your feedback to double-check the facts, add info and update this blog.