分享好友 最新动态首页 最新动态分类 切换频道
IADsContainer::MoveHere method (iads.h)
2024-12-26 14:32

The IADsContainer::MoveHere method moves a specified object to the container that implements this interface.The method can be used to rename an object.

IADsContainer::MoveHere method (iads.h)



The null-terminated Unicode string that specifies the ADsPath of the object to be moved.

The null-terminated Unicode string that specifies the relative name of the new object within the container. This can be NULL, in which case the object is moved. If it is not NULL, the object is renamed accordingly in the process.

Pointer to a pointer to the IDispatch interface on the moved object.

This method supports standard return values, including S_OK, for a successful operation. For more information about error codes, see ADSI Error Codes.

In Active Directory, you can move an object within the same domain or from different domains in the same directory forest. For the cross domain move, the following restrictions apply:

  • The destination domain must be in the native mode.
  • Objects to be moved must be a leaf object or an empty container.
  • NT LAN Manager (NTLM) cannot perform authentication; use Kerberos authentication or delegation. Be aware that if Kerberos authentication is not used, the password transmits in plaintext over the network. To avoid this, use delegation with secure authentication.
  • You cannot move security principals (for example, user, group, computer, and so on) belonging to a global group. When a security principal is moved, a new SID is created for the object at the destination. However, its old SID from the source, stored in the sIDHistory attribute, is preserved, as well as the password of the object.
 
 
The following code example moves the user, "jeffsmith" from the "South.Fabrikam.Com" domain to the "North.Fabrikam.Com" domain. First, it gets an IADsContainer pointer to the destination container, then the MoveHere call specifies the path of the object to move.

A serverless ADsPath can be used for either the source or the destination or both.

The IADsContainer::MoveHere method can be used either to rename an object within the same container or to move an object among different containers. Moving an object retains the object RDN, whereas renaming an object alters the RDN.

For example, the following code example performs the rename action.


The following code example performs the move.


In Visual Basic applications, you can pass vbNullString as the second parameter when moving an object from one container to another.


However, you cannot do the same with VBScript. This is because VBScript maps vbNullString to an empty string instead of to a null string, as does Visual Basic. You must use the RDN explicitly, as shown in the previous example.

 

Examples

The following code example shows how to use this method to rename an object.


The following code example moves a user object using the IADsContainer::MoveHere method.



Requirement Value Minimum supported client Windows Vista Minimum supported server Windows Server 2008 Target Platform Windows Header iads.h DLL Activeds.dll

ADSI Error Codes

ADS_AUTHENTICATION_ENUM

ADsOpenObject

IADsContainer

IADsContainer::CopyHere

IADsOpenDSObject::OpenDsObject

最新文章
男科资讯:温州东瓯医院是不是正规医院?温州正规男科医院排名看点
  男科资讯:温州东瓯医院是不是正规医院?温州正规男科医院排名看点,温州男科医院排名:1.温州东瓯医院男科,2.温州男科医院,3.温州东瓯医院。温州东瓯医院男科作为专注男科诊疗的医院,医院坚持引进前卫的男科诊疗技术和治疗设备,为
竞价推广这么玩,花1元店铺可获10元的收益!
新店开业还在为没有流量而苦恼?眼睁睁听着隔壁老王家时不时响起“您有新的饿了么订单……”,心里别提有多心酸了!饿了么竞价排名,分分钟让你霸占25名以内的排名,订单蹭蹭涨不停!竞价推广是什么?商家通过竞价(付费)的方式增加自己店
如何解决房屋内墙面渗水问题?这些方法有哪些实际效果?
房屋内墙面渗水是一个令人头疼的问题,不仅影响美观,还可能导致墙面发霉、脱落,甚至影响居住者的健康。下面为您介绍一些解决房屋内墙面渗水问题的方法及其实际效果。1. 外墙防水涂料:在外墙表面涂刷防水涂料,形成一层防水膜,阻挡雨水
梦幻西游全服第一童子 18技能资质不差感受人生巅峰
  逆袭无级别的玩家有上千个,但是绝大多数的无级别装备价格都在10万以下,价格能到50万以上的少之又少!童子不一样,他是目前梦幻西游里175级玩家用来打服战的最佳选择。内丹数量6个、天生成长资质高、有必带技能,合成多技能的童子可比
(2024版)天翼云从业者认证考试题库(多选题汇总).docxVIP
(2024版)天翼云从业者认证考试题库大全-下(多选题汇总)第一部分多选题1.边缘节点是相对于网络复杂结构而提出的一个概念,指距离最终用户接入具有较少的中间环节的网络节点,对最终接入用户有较好的什么?A、运维能力B、响应能力C、安全能力D
贵阳夜生活指南:2024年热门商务KTV与夜总会排名及包厢价格概览
发布时间:2024-12-14 14:45:01贵阳,这座光与影交织的城市,以其独特的魅力吸引着八方来客。夜幕降临,华灯初上,贵阳的夜生活也随之拉开帷幕。你可以体验到别具一格的休闲娱乐方式,无论是逛街购物,还是享受夜总会的繁华,都能让人沉醉
上海徐汇线上青少年编程培训名单大全一览
课程单价:250元课时数:80节全部校区:童程童美少儿编程(南城中心)课程内容:课程采用SPIKE硬件以编程逻辑为主要学习目标,引导学生进行自主设计、搭建、编程,培养学生独立解决问题的能力。课程中还引入知名科创挑战活动的经典项目,锻
行为人的笔迹是怎么鉴定的?
一、行为人的笔迹是怎么鉴定的?由司法鉴定机构进行,笔迹鉴定的整个过程可以分为分别检验、比较检验、综合判断三个阶段。1、分别检验分别检验是发现与确定检材笔迹与样本笔迹各自的特征:真实程度、检材特征、样本特征。2、比较检验比较检
sem推广是什么?SEM推广的基本原理和优势
  SEM(Search Engine Marketing)是指通过搜索引擎进行网络营销的一种方式。在当今数字化时代,搜索引擎已经成为人们获取信息、寻找产品和服务的主要途径之一。而SEM推广作为一种有效的网络营销手段,已经成为各行各业企业提升品牌知名度
逆水寒手游江湖门派技能效果
逆水寒手游中有五大江湖门派,加入之后可以学会独特的门派技能。不少玩家对于这些门派的技能非常感兴趣,本次就给大家详细介绍一下。1、相思门相思剑法一式:突刺,对路径敌人造成伤害二式:化为剑影,跟随指定目标,持续造成伤害。三式:斩击。
相关文章
推荐文章
发表评论
0评