Does anyone know how to remove the secondary owner of a site collection with the help of powershell?
I know how to set the SecondaryOwnerAlias with the help of powershell but so far I did not find any possibility to remove it.
You need to update the
$siteCollectionUrl = "http://sp2010:90" $site =new-object Microsoft.SharePoint.SPSite($siteCollectionUrl) $site.SecondaryContact = $null;
Just ran the updated code above on my SP 2010 VM and it works perfectly fine.
Try this command:
Get-SPSite "http://sitename/sites/teams/*" | Set-SPSite –SecondaryOwner $null