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.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
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