分享好友 最新动态首页 最新动态分类 切换频道
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

最新文章
kafka 创建topic_雅虎开源!可视化的Kafka监控管理工具
Kafka作为一个分布式的消息系统,由于可靠性高、吞吐量大、持久性强以及多样化的消费处理模型等特点,目前已经被很多公司应用在实际的业务中,在科技领域收获的一致好评!不想进(tou)步(lan)的程序员不是好开发&#x
AI写头条:揭秘算法、速度与个性化
1.揭秘AI写头条的神奇技术 您是否好奇过热门头条新闻的诞生过程呢?今天就让我为您揭示AI写作的奥妙吧! 2. AI算法背后的秘密武器 AI在撰写今日头条时,依赖于其先进的算法。这项技术结合了深度学习和自然语言处理功能&#
AI端侧应用井喷!相关概念股大梳理
来源:雪球App,作者: win产业链长,(https://xueqiu.com/7445668579/316911456)一、导火索:美股映射(1)美国AI广告营销头部公司24Q3营收12亿美元,同比+39%,调整后EBITDA利润率60%。其中,包括AI推荐引擎AXON驱动的AppDiscovery广告
2024年最新手机天梯图:全面评测旗舰机型性能排行
2024年,手机市场竞争愈加激烈,各大品牌纷纷推出新一代旗舰机型,性能和体验再次提升。本文将通过全面评测的方式,对当前主流旗舰手机进行性能排名,为您选购新机提供参考。工具原料:系统版本:Android 13、iOS 16品牌型号:三星Galaxy S
2024年房产销售个人年度工作总结(5篇)
一、营销总结1、20__年10月3日:本公司进驻新安?邻里中心注:进场之前已完成售楼部物料准备、人员及车辆配备等工作2、20__年10月6日:新安?邻里中心售楼部盛情开放注:活动当天来客14组,并在10月6日前完成各媒体、媒介推广工作。通过此次
2024年秋季新人教版历史七年级上册全册教案.docx
新人教版历史七年级上册全册教案(2024年秋季新教材)第一单元史前时期:原始社会与中华文明的起源第1课远古时期的人类活动1教学分析【教学目标】知识与能力了解我国境内的最早人类元谋人;了解北京人的发现、北京人的特征等基础知识,思考
2024年关于公司财务自查报告
2024年关于公司财务自查报告(通用8篇)  一、会计核算基础工作规范性情况  1、会计凭证编制及管理情况  自查中发现记账凭证所附原始凭证单据齐全,会计凭证单独按月装订,采购业务记账凭证后附付款申请单,合同,发票,收料单,银行
ColorOS 15又拿奖!荣获年度最流畅系统,丝滑如德芙超多AI新功能
OPPO Find X8系列发布上市近一个月便卖了超百万台,OPPO Reno13系列上市后同样热销,还有一加 13也是近期市面上最火的手机之一。上述的这些新品之所以能成为爆款,除了处理器、屏幕、相机、电池等硬件都很出色之外,它们无一例外出厂预装了
2024年广西北部湾大学招聘教职人员控制数工作人员66人公告
北部湾大学2024年公开招聘教职人员控制数工作人员公告根据《广西壮族自治区事业单位公开招聘人员实施办法》(桂人社发〔2011〕155号)及有关文件精神,结合本单位实际工作需要,现将北部湾大学2024年公开招聘教职人员控制数工作人员有关事项
DNF魔皇TB7版本闪电风暴9加点攻略:实战经验与技能分配分享
当谈及魔皇TB7版本的闪电风暴9加点攻略时,你是否已经跃跃欲试,渴望将这个角色推向极致呢?接下来的文章将为你揭晓,在这个新版本下如何正确地分配技能点,获得实战中的优势。结合实战经验分享,助你更好地掌握游戏技巧,成为真正的强者。
相关文章
推荐文章
发表评论
0评