Changing Site Owners from the Command Line

Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

From the command line for Windows SharePoint Services, you canperform many of the same tasks that you can perform from the HTMLadministration pages. You can also change the site owner by usingthe siteowner operation with the stsadm.exe command.

Note: Additionally, youcan get a list of the command-line operations by typing stsadm.exe -help on the command line. Syntax help forspecific operations is available by typing stsadm.exe -help <operation name> .

Change the owner of a site by using Stsadm.exe

You need to know the URL for the site and the specific user namethat you want to change. You can use the siteowner operationto change the owner or secondary owner of a site.

Command Line Parameters for siteowner operation

Required parameters

Optional parameters

-url

 


Either ownerlogin orsecondownerlogin

 


Sample syntax:

stsadm.exe -o siteowner -url <url> [-ownerlogin <DOMAIN\username> | -secondownerlogin <DOMAIN\username>]