【发布时间】:2021-11-28 15:06:05
【问题描述】:
所以我试图将我的 OU 上的显示名称设置为标题大小写。老板说很难读。
foreach( $item in $ORGOU ) { Set-ADOrganizationalUnit -Identity $item.DistinguishedName -Replace -DisplayName (Get-Culture).TextInfo.ToTitleCase($item.Name.ToLower()) }
Error:
Set-ADOrganizationalUnit : Missing an argument for parameter 'Replace'. Specify a parameter of type
'System.Collections.Hashtable' and try again.
At line:1 char:89
+ ... OrganizationalUnit -Identity $item.DistinguishedName -Replace -Displa ..
【问题讨论】:
-
那么,您的问题是什么?除了语法不好。
-
可以在 powershell 中更改 OU 名称吗?
标签: powershell active-directory