Set-QADGroup, setting properties

别来无恙 提交于 2019-12-13 18:31:41

问题


I can't get the following properties to work :/

mail 
mailNickname 
name 
cn 
dn 

The reason behind this is because we are going to be renaming every object in our AD (thousands of groups), and i need all properties to be changed.

been reading Quest everywhere however they only take up displayName as an example and nothing more advanced.

I've gotten the following to work though:

get-QADGroup -SearchRoot 'ex.local/' -LdapFilter '(samaccountname=test_group*)' -GroupType 'Distribution' -IncludedProperties "displayName", "mailNickname", "name", "mail" | foreach-object {
    Set-QADGroup $_ –displayName ("new_displayname")
}

回答1:


You can try:

Set-QADGroup $_ -ObjectAttributes @{mail = "New_Mail"; mailNickname = "New_mailNickname"; name = "New_Name" }

DN and CN will be update when you move the group from an OU to another one.




回答2:


One thing though, you cannot rename the group by setting the Name property, you'll get an error. To rename the object use the Rename-QADObject cmdlet



来源:https://stackoverflow.com/questions/11190501/set-qadgroup-setting-properties

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!