The revisiting of Admin access is an important activity for the support team as most of the time we may provide temporary access for a certain time and forgot to roll back.
In this post, we will explore a great way of extracting Admin user data . This is the simplest way to extract using the Sitecore Powershell ISE.
Contents
Sample 1: Get All User mapped with specific domain
##################################################
#Project: Get a list of all users for Domain
#Developer: Thiyagu S (dotnet-helpers.com)
#Tools : PowerShell 5.1.15063.1155 & SiteCore 8.1
#E-Mail: mail2thiyaguji@gmail.com
##################################################
#Getting User list by filtering with domain "dotnet-helpers"
$allSitecoreUsers = Get-User -Filter “dotnet-helpers\*”
$allSitecoreUsers | ForEach-Object {
Write-Host $_.Name
}Sample 2: Get All Admin Users mapped with specific domain
#####################################################################################################
#Project: How to get Sitecore Admin users for the domain using Sitecore PowerShell Extensions.
#Developer: Thiyagu S (dotnet-helpers.com)
#Tools : PowerShell 5.1.15063.1155 & SiteCore 8.1
#E-Mail: mail2thiyaguji@gmail.com
#####################################################################################################
$adminSitecoreUsers = Get-User -Filter “dotnet-helpers\*”
$adminSitecoreUsers | Where{$_.IsAdministrator -eq $true } | ForEach-Object {
Write-Host $_.Name
}