0

We have a SharePoint 2007 server and we're looking to automate the process of adding a Secondary Site Collection Owner via PowerShell script. From what I've seen we would need to access the Cmdlets within the SharePoint Server module to do this.

My question is, would this be possible with SharePoint 2007 or would this require upgrading to a higher version?

Thank you!

Edit: I forgot to ask if it would be possible to configure this setting using the SharePoint Online Management Shell? I've browsed the cmdlets, but couldn't find anything related to setting Secondary Collection owners.

1 Answer 1

0

There are no cmdlets for 2007 but you can still use the server object model:

[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$site = New-Object Microsoft.SharePoint.SPSite("http://sharepoint.site.com")
$web = $site.OpenWeb()
$user = $web.Ensureuser("Domain\User")
$user.IsAdmin = $true
$user.Update()

I'd recommend you upgrade anyway.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.