Удалите пользователей из профилей пользователей после применения фильтра LDAP

sharepoint.stackexchange https://sharepoint.stackexchange.com//questions/97474

Вопрос

В нашей тестовой среде я проделал полный импорт объявления, забывая добавить фильтр, чтобы получить только один конкретный отдел.Так что теперь я получил все пользователь вместо одного отдела, которого я хотел.

Какие правильные шаги будут удалять все пользователи и Rerun The Sync UPA?Мне нужно только применить фильтр и запустить полную синхронизацию?И сбросить профиль пользователя ползти в поисках?

Любые определенные задания таймера, которые должны быть вынуждены?

Это было полезно?

Решение

If it's just a test environment you can run PowerShell to delete the User Profiles that you don't need.

$context = Get-SPServiceContext -Site http://mysite
$upm = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context)
#Create a filter if necessary, this will just list them
$upm.GetEnumerator() | Where {$_.DisplayName -eq 'john'} | ft DisplayName
#Finally you can use this to remove the profile
$upm.RemoveProfile($profile)

Note: This is NOT a script to run. I did that intentionally since it would be way too easy for someone to erase all their profiles and then blame me. Some assembly is required.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top