0
我想设置用户的PROFILEPATH这样的:扩大环境变量
$commonname = "Firstname lastname"
$samaccountname = "some-user-name"
$user = organizationalUnit.create("user", "CN=$commonname")
$user.invokeset("SamaccountName", $samaccountname)
$user.commitchanges()
$profilePath = "\\domain.local\profiles\%USERNAME%"
$user.invokeset("profilePath", $profilePath)
$user.commitchanges()
当我在新设置的属性看然而,%USERNAME%变量不被扩大到“一些用户名”。当我在windows服务器管理器gui中为active-directory键入相同的配置文件路径,然后单击“应用”时,它确实得到扩展。
如何使%USERNAME%变量扩大?
对不起,如果不清楚,但我需要插入(许多)不同于我的名字。 – XORcist
是不是用户名与samaccountname相同? – vonPryz
是的,这就是我现在所使用的方式。 – XORcist