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.

3 Answers 3

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

1
  • -SecondaryOwner is not listed as valid parameter on the source you give. And it doesn't seem to work. Commented Oct 6, 2014 at 15:00
0

Try -SecondaryContact instead of -SecondaryOwner.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.