Warning: count(): Parameter must be an array or an object that implements Countable in /www/htdocs/w009da1c/collaboration-blog/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263

Warning: count(): Parameter must be an array or an object that implements Countable in /www/htdocs/w009da1c/collaboration-blog/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263

Warning: count(): Parameter must be an array or an object that implements Countable in /www/htdocs/w009da1c/collaboration-blog/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263

Warning: count(): Parameter must be an array or an object that implements Countable in /www/htdocs/w009da1c/collaboration-blog/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263

Warning: count(): Parameter must be an array or an object that implements Countable in /www/htdocs/w009da1c/collaboration-blog/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263

Warning: count(): Parameter must be an array or an object that implements Countable in /www/htdocs/w009da1c/collaboration-blog/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263

Warning: count(): Parameter must be an array or an object that implements Countable in /www/htdocs/w009da1c/collaboration-blog/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263

Warning: count(): Parameter must be an array or an object that implements Countable in /www/htdocs/w009da1c/collaboration-blog/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263

Warning: count(): Parameter must be an array or an object that implements Countable in /www/htdocs/w009da1c/collaboration-blog/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263

Warning: count(): Parameter must be an array or an object that implements Countable in /www/htdocs/w009da1c/collaboration-blog/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263

Warning: count(): Parameter must be an array or an object that implements Countable in /www/htdocs/w009da1c/collaboration-blog/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263

Warning: count(): Parameter must be an array or an object that implements Countable in /www/htdocs/w009da1c/collaboration-blog/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263

Warning: count(): Parameter must be an array or an object that implements Countable in /www/htdocs/w009da1c/collaboration-blog/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263

Warning: count(): Parameter must be an array or an object that implements Countable in /www/htdocs/w009da1c/collaboration-blog/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263

Warning: count(): Parameter must be an array or an object that implements Countable in /www/htdocs/w009da1c/collaboration-blog/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263

Warning: count(): Parameter must be an array or an object that implements Countable in /www/htdocs/w009da1c/collaboration-blog/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263

Warning: count(): Parameter must be an array or an object that implements Countable in /www/htdocs/w009da1c/collaboration-blog/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/package.module.fs.php on line 263
Move-SPUser | SharePoint Best Practice
Migrieren von Benutzern

Migrieren von Benutzern

Nachdem ein Domänen Benutzer im Active-Directory umbenannt oder dieser in eine andere Domäne migriert wurde, muss man als SharePoint Administrator das Kommando stsadm -o migrateuser oder Move-SPUser ausführen, damit das neue/migrierte Konto die SharePoint Berechtigungen erhält.

Hier ist die Snytax für das veraltete stsadm.exe Kommando

stsadm -o migrateuser -oldlogin -newlogin [-ignoresidhistory] stsadm -o migrateuser -oldlogin HSD\Bob1 -newlogin HS\Bob

Hier ist die entsprechende Syntax für den selben Vorgang, nur mit dem PowerShell Cmdlet und ensprechender Syntax

Move-SPUser [-Identity] -NewAlias [-AssignmentCollection ] [-Confirm []] [-IgnoreSID ] [-WhatIf []]
Move-SPUser -Identity “HSD\Bob1” -NewAlias “HS\Bob”

Wann immer die Fehlermeldung – DS_NAME_ERROR_DOMAIN_ONLY auftaucht, liegt es daran, das der SidHistory check fehlschlägt.

Das Kommando migrateuser/Move-SPUser sucht in der SIDHistory des neuen Accounts den alten Account (Neuer Account->Prüfe ob es einen Eintrag gibt->OLDName->NEWName)

In folgenden Fällen wird das Kommando Fehlschlagen, da kein Eintrag in der SID Historie des neuen Accounts gefunden werden kann.

  • Der Benutzeraccount wurde nicht umbenannt, sondern neu erstellt
  • Der Benutzeraacount wurde in eine andere Domain transferiert

Im ULS sieht die Meldung dann wie folgt aus:

stsadm: An error occurred while translating user name ‘HS\BOB1’ to a Windows account name – (DS_NAME_ERROR_DOMAIN_ONLY) Callstack: at Microsoft.Office.Server.Utilities.WindowsSecurity.TranslateUserName(String name, DS_NAME_FORMAT formatOffered, DS_NAME_FORMAT formatDesired) at Microsoft.Office.Server.UserProfiles.Helpers.GetSidHistory(String strAccountName) at Microsoft.Office.Server.UserProfiles.Helpers.IsSidInSidHistory(String strAccountName, Byte[] bOldSid) at Microsoft.Office.Server.Administration.AccountMigrationManager.MigrateAccount(Guid partitionId, UserProfileApplication userProfileApplication, String strOldAccountName, String strNewAccountName, Boolean bEnforceSidHistory)

Lösung

Glücklicherweise gibt es einen Schalter, der den SidHistory check umgeht.

  • stsadm -o migrateuser -oldlogin HSD\Bob1 -newlogin HS\Bob -ignoresidhistory
  • Move-SPUser -Identity “HSD\Bob1” -NewAlias “HS\Bob” -ignoresidhistory
%d bloggers like this: