1

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.

1

You need to update the SecondaryContact of SPSite object.

$siteCollectionUrl = "http://sp2010:90"
$site =new-object Microsoft.SharePoint.SPSite($siteCollectionUrl)
$site.SecondaryContact = $null;

EDIT

Just ran the updated code above on my SP 2010 VM and it works perfectly fine.

0

Try this command:

Get-SPSite "http://sitename/sites/teams/*" | Set-SPSite –SecondaryOwner $null

source

  • -SecondaryOwner is not listed as valid parameter on the source you give. And it doesn't seem to work. – Dribbel Oct 6 '14 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.