$Site = Get-SPSite http://wtcsps99:27841 $ServiceContext = Get-SPServiceContext($Site) $ProfileManager = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($ServiceContext) $Profiles = $ProfileManager.GetEnumerator()

$AccountName = $profile[[Microsoft.Office.Server.UserProfiles.PropertyConstants]::AccountName].Value  Foreach($oUser in $Profiles){

$ProfileManager.RemoveUserProfile($oUser.item("AccountName")); }

$UPA = Get-SPServiceApplication | ? {$_.typeName -like '*User Profile*'} $UPA.NetBIOSDomainNamesEnabled $UPA.NetBIOSDomainNamesEnabled = $true $UPA.Update() $UPA = Get-SPServiceApplication | ? {$_.typeName -like '*User Profile*'} $UPA.NetBIOSDomainNamesEnabled

or

you can remove the user profile application and delete the data ,readd the application

Cleare userprofile info的更多相关文章

  1. userprofile同步用户失败的原因和解决方案

    userprofile同步账号进行出现同步不到用户.有个时候同步成功了但是为0个用户.有个时候提示同步失败或拒绝等错误.如何查看同步服务同步的结果.其实明白sharepoint2010同步用户的原理都 ...

  2. sharepoint 2013 userprofile 用户信息

    Sharepoint2013获得当前用户userfrofile 基本介绍: 什么使用户配置文件. 用户属性和用户配置文件属性提供有关 SharePoint 用户的信息,如显示名称.电子邮件.标题以及其 ...

  3. XP下类似%windir% %userprofile% 的变量的说明(转)

    在一些批处理或者系统技巧操作教程文章中,我们常常会看到一些形如 %windir% 或者 %systemdrive% 的变量.这些变量都代表着什么含义呢?下面小技巧之家为大家整理了在Windows XP ...

  4. .NET MVC4 实训记录之二(扩展WebSecurity模型下的UserProfile表)

    使用VS2013创建MVC4项目后,自动生成的代码中默认使用WebSecurity模型创建用户管理,生成以下数据库:

  5. django(权限、认证)系统——自定义UserProfile储存User额外信息

    上篇文章我们引出了Django内置的权限控制系统,讲了安装,和最核心和基本的User模型的API和其Manager的API. 接下来我们继续深入下去,使用User对象做一些事情,首先当然就是创建一个U ...

  6. IntegrityError at /admin/users/userprofile/add/ (1452, 'Cannot add or update a child row: a foreign key constraint fails (`mxonline`.`django_admin_log`, CONSTRAINT `django_admin_log_user_id_c564eba6_

    报错现象 在执行 django 后台管理的时候添加数据导致 1452 错误 报错代码 IntegrityError at /admin/users/userprofile/add/ (1452, 'C ...

  7. 在views中引用UserProfile报错RuntimeError: Model class apps.users.models.UserProfile doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

    如图报错,在settings中,该加的也加了啊! 显然类似于网上最容易遇到的解决方案如下图,是没有任何意义的 只要在view中有 from .models import UserProfile,Ver ...

  8. 系统变量 %USERPROFILE%

    可以用CMD的SET命令来查看现有的系统变量,“="前的部分用%括起来就是.   常用: %USERPROFILE% =C:\Users\用户名 %SystemRoot% =C:\WINDO ...

  9. (fields.E304) Reverse accessor for 'UserProfile.groups' clashes with reverse accessor for 'User.groups'.

    创建数据库models.py,在进行数据迁移时抛出一下异常: E:\Project\GuoJia>python manage.py makemigrations SystemCheckError ...

随机推荐

  1. 【原】Coursera—Andrew Ng机器学习—课程笔记 Lecture 12—Support Vector Machines 支持向量机

    Lecture 12 支持向量机 Support Vector Machines 12.1 优化目标 Optimization Objective 支持向量机(Support Vector Machi ...

  2. Plugins in Unity

    [Plugins in Unity] In Unity, you normally use scripts to create functionality but you can also inclu ...

  3. Android开发实战之ViewPager的轮播

    在安卓开发的许多控件中,如果你没有使用过ViewPager,就不能算是一个安卓开发工程师,在本篇博文中,我会总结ViewPager的使用方法, 以及一些开发中的拓展.希望本篇博文对你的学习和工作有所帮 ...

  4. Ros学习——movebase源码解读之amcl

    1.amcl的cmakelists.txt文件 add_executable(amcl  src/amcl_node.cpp) target_link_libraries(amcl amcl_sens ...

  5. 待解决:2bootstrap-cerulean.css Failed to load resource: the server responded with a status of 404 ()

    2bootstrap-cerulean.css Failed to load resource: the server responded with a status of 404 ()

  6. 15-糗事百科(python+xpath)

    爬取糗事百科的段子: 1.用xpath分析首要爬去内容的表达式: 2.用发起请求,获得原码: 3.用xpath分析源码,提取有用信息: 4.由python格式转为json格式,写入文件 #_*_ co ...

  7. 10个android开发必备的开源项目

    You are here: Home » » Blog » 10 Open Source Android Apps which every Android developer must look in ...

  8. LoadRunner11学习记录七 -- 负载生成器、事务&集合点顺序、HTML&URL录制

    1.什么情况下用到负载生成器? 当需要使用多台测试机对同一服务器同时压力测试时,需要配置负载生成器. 2.LoadRunner中事务和集合点的放置顺序问题 1)事务放在集合点前面 这时事务的时间包含了 ...

  9. 爬虫 之 scrapy-redis组件

    scrapy-redis组件 scrapy-redis是一个基于redis的scrapy组件,通过它可以快速实现简单分布式爬虫程序,该组件本质上提供了三大功能: scheduler - 调度器 dup ...

  10. javascript -window与document 待整理

    window对象和document对象的区别一般来讲,一个window里就是一个document,但是,iframe里面也可以装个document,在iframe里面就有区别了 alert(docum ...