SharePoint user permission migration

Source: Internet
Author: User
Tags to domain

When a Sharepoint site set is migrated from Domain A to Domain B, user permissions must also be migrated along with the site set (only domain names change ).

Because the website set user permissions are complex, you need to change the domain user for Migration (you do not need to reconfigure permissions ).

Both powershell and stsadm provide corresponding methods. to process data in batches, I use stsadm to migrate users.CodeUsage

Idea: traverse and read the username in the TXT file to migrate each username.

@ Echo offsetlocal enabledelayedexpansionSetF = % ~Dp0cd c: \ Program Files \ common files \ microsoft shared \ Web Server Extensions \14\ BinFor/F % IIn(% F % \ test.txt)Do(SetL = contoso \ %ISetN = HSH \ %Istsadm-O migrateuser-oldlogin! L! -Newlogin! N! -Ignoresidhistoryecho! L!) Pause

One user name is stored in each line in the test.txt text.

Setlocal enabledelayedexpansion is used to use variables in the for statement. For more information, see Google.

CDC: \ Program Files \ common files \ microsoft shared \ Web Server Extensions \14\ BinDirectory (SharePoint directory)

Stsadm-O migrateuser-oldlogin! L! -Newlogin! N! -Ignoresidhistory is the key migration statement.

Save as a bat file and double-click it to complete user migration

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.