$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. RocketMQ初探(四)之RocketMQ4.x版本可视化管理控制台rocketmq-console-ng搭建(Apache)

    之前有部署过3.2.6为AliBaba版本的Web监控平台(可参考之前博客 https://www.cnblogs.com/buyige/p/9395453.html),现用RocketMQ4.2.0 ...

  2. ros ddns

    ROS5X-6X脚本(10-15分钟执行一次) #DDNS本站帐号 :global ddnsuser "用户名" #DDNS本站密码 :global ddnspass " ...

  3. iOS开发基础控件--UISegmentedControl

    UISegmentedControl全局外观设置 分段控件是我们常用的控件之一,今天把具体用法总结了下: 1.初始化UISegmentedControl [plain] view plaincopy ...

  4. pip 18.1 官方文档翻译

    快速开始 从pypi上安装一个包 $ pip install SomePackage 查看安装的包里面包含什么文件 pip show --files SomePackage 查看已经安装的包里面哪些是 ...

  5. python's descriptor

    [python's descriptor] 1.实现了以下三个方法任意一个的,且作为成员变量存在的对象,就是descriptor. 1)object.__get__(self, instance, o ...

  6. Kafka存储机制(转)

    转自:https://www.cnblogs.com/jun1019/p/6256514.html Kafka存储机制 同一个topic下有多个不同的partition,每个partition为一个目 ...

  7. Android Studio 无法正确引入包内存在的类

    Android Studio 无法识别同一个 package 里的类,显示为红色,但是 compile 没有问题. 重启,rebuild,clean都没有用. 多半是因为 Android Studio ...

  8. C语言中static修饰符的意义

    在C语言中,static通常有2种含义:1)定义变量的生命周期:2)定义变量或者函数的作用域. 变量的生命周期是指,相对于程序运行的进程生命周期,变量存在的时间段.变量的生命周期由变量的存储类型(位置 ...

  9. [erlang 002]gen_server中何时会跑到terminate函数

    一.从start方法产出的独立gen_server进程 实验代码: %%%-------------------------------------- %%% @Module  : %%% @Auth ...

  10. kubernetes基础环境配置

    一.基础环境配置 环境详情 主机名(FQDN) IP地址(NAT) 描述 linux-node1.example.com eth0:192.168.56.11 1VCPU.2G内存.一块硬盘s da5 ...