将一个AD属性的一部分复制到另一个 [英] Copy A Portion of One AD Attribute to Another

查看:89
本文介绍了将一个AD属性的一部分复制到另一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我的雇主要求我填充AD属性"extensionName"。 (当前为空)具有已填写的"telephoneNumber"的最后4位数字。 AD中的属性。  他只想在我们的家庭办公室完成,这很容易
足够因为所有数字都以相同的区号和后缀开头。


这是我到目前为止......(显然区号和后缀是  < span style ="line-height:9px">虚构


get-adobject -filter {telephoneNumber -like" 555-555 - *"}  (如果我在末尾放置一个select-object cmdlet,它会输出我需要复制到extensionName字段的相关电话号码)


请帮助我找出下一步到仅复制"telephoneNumber"属性的最后4位数字并将其放在"extensionName"中。领域。  绞尽脑汁试图解决这个问题。

解决方案

这是学习PowerShell的好借口。


她是详细的说明:  https://technet.microsoft.com/en-我们/ scriptcenter / dd793613



So my employer has asked me to populate the AD attribute "extensionName" (currently empty) with the last 4 digits of the already filled in "telephoneNumber" attribute in AD.  He only wants it done in our home office which is easy enough because all the numbers start with the same area code and suffix.

This is what I have so far... (obviously the area code and suffix is fictional)

get-adobject -filter {telephoneNumber -like"555-555-*"}   (If I put a select-object cmdlet on the end it pipes out the relevant phone numbers I need to copy to the extensionName field)

Please help me  figure out the next step to copy just the last 4 digits of the "telephoneNumber"attribute and put it in the "extensionName" field.  Been racking my brain trying to figure this out.

解决方案

This is a good excuse to learn PowerShell.

Her are the detailed instructions: https://technet.microsoft.com/en-us/scriptcenter/dd793613


这篇关于将一个AD属性的一部分复制到另一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆