How to query User Information List using Powershell?

Hello SharePointers,

Below is the Powershell script to query User Information List for a particular sharepoint group.

$List = $web.Lists.GetByTitle(‘User Information List’)
$userItem = $List.GetItemById(‘GROUP NAME’);
$ctx.Load($userItem)
$ctx.ExecuteQuery()
$obj = New-Object PSObject
$obj | Add-Member -type NoteProperty -Name Title -Value $userItem[‘Title’]
$obj | Add-Member -type NoteProperty -Name UserName -Value $userItem[‘UserName’]
$obj | Add-Member -type NoteProperty -Name JobTitle -Value $userItem[‘JobTitle’]
$obj | Add-Member -type NoteProperty -Name Department -Value $userItem[‘Department’]

Happy SharePointing Folks 🙂

Leave a Reply

Your email address will not be published.