SiteCollection Administration Information using Powershell

To Get the site Collection Admininstration information, we can use the below powershell commands to achieve this funtionality.
 
$siteUrl = Read-Host "Enter Site URL to get the information"
$rootSite = New-Object Microsoft.SharePoint.SPSite($siteUrl)
$WebApp = $rootSite.WebApplication
foreach($site in $WebApp.Sites)
{
foreach($Admin in $site.RootWeb.SiteAdministrators)
{
Write-Host "$($Admin.ParentWeb.Url)"
Write-Host "$($Admin.DisplayName) "
}
$site.Dispose()
}
 
 
Happy SharePointing :-)