Cleare userprofile info
$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的更多相关文章
- userprofile同步用户失败的原因和解决方案
userprofile同步账号进行出现同步不到用户.有个时候同步成功了但是为0个用户.有个时候提示同步失败或拒绝等错误.如何查看同步服务同步的结果.其实明白sharepoint2010同步用户的原理都 ...
- sharepoint 2013 userprofile 用户信息
Sharepoint2013获得当前用户userfrofile 基本介绍: 什么使用户配置文件. 用户属性和用户配置文件属性提供有关 SharePoint 用户的信息,如显示名称.电子邮件.标题以及其 ...
- XP下类似%windir% %userprofile% 的变量的说明(转)
在一些批处理或者系统技巧操作教程文章中,我们常常会看到一些形如 %windir% 或者 %systemdrive% 的变量.这些变量都代表着什么含义呢?下面小技巧之家为大家整理了在Windows XP ...
- .NET MVC4 实训记录之二(扩展WebSecurity模型下的UserProfile表)
使用VS2013创建MVC4项目后,自动生成的代码中默认使用WebSecurity模型创建用户管理,生成以下数据库:
- django(权限、认证)系统——自定义UserProfile储存User额外信息
上篇文章我们引出了Django内置的权限控制系统,讲了安装,和最核心和基本的User模型的API和其Manager的API. 接下来我们继续深入下去,使用User对象做一些事情,首先当然就是创建一个U ...
- 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 ...
- 在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 ...
- 系统变量 %USERPROFILE%
可以用CMD的SET命令来查看现有的系统变量,“="前的部分用%括起来就是. 常用: %USERPROFILE% =C:\Users\用户名 %SystemRoot% =C:\WINDO ...
- (fields.E304) Reverse accessor for 'UserProfile.groups' clashes with reverse accessor for 'User.groups'.
创建数据库models.py,在进行数据迁移时抛出一下异常: E:\Project\GuoJia>python manage.py makemigrations SystemCheckError ...
随机推荐
- apt 查询软件
apt-cache search percona-server apt list percona-server-server-5.6
- Struts2常量详解
-----------------siwuxie095 Struts2 常量详解 Struts2 的常量大多在默认的配置文件中已经配置好,但根据 用户需求和开发要求的不同,可能需要修改这些常量值,修改 ...
- Java方法重写与super关键字
----------siwuxie095 方法的重写: (1)在继承中也存在着重写的概念,其实就是子类定义了和父类同名的方法 (2)定义:方法名 ...
- 78. Subsets 求所有子集(有重复就continue)
[抄题]: Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The ...
- CSS中的元素分类
CSS中的元素分类 元素是文档结构的基础,在CSS中,每个元素生成了一个包含了元素内容的框(box,也译为"盒子").但是不同的元素显示的方式会有所不同,例如<div> ...
- sqlserver分区表索引
对于提高查询性能非常有效,因此,一般应该考虑应该考虑为分区表建立索引,为分区表建立索引与为普通表建立索引的语法一直,但是,其行为与普通索引有所差异. 默认情况下,分区表中创建的索引使用与分区表相同分区 ...
- Springboot-读取核心配置文件及自定义配置文件
读取核心配置文件 核心配置文件是指在resources根目录下的application.properties或application.yml配置文件,读取这两个配置文件的方法有两种,都比较简单. 核心 ...
- [C++] Virtual Destructor(虚析构函数)
Without Virtual Destructor(虚析构函数) class A{ public: ; A() { cout <<"A()..."<< e ...
- python 类变量 在多线程下的共享与释放问题-乾颐堂
最近被多线程给坑了下,没意识到类变量在多线程下是共享的,还有一个就是没意识到 内存释放问题,导致越累越大 1.python 类变量 在多线程情况 下的 是共享的 2.python 类变量 在多线程情况 ...
- cakephp跳转到指定的错误页面
第一步:修改core.php 第二步:创建AppExceptionRender.php文件 参考:https://blog.jordanhopfner.com/2012/09/11/custom-40 ...