未在文件服务器文件系统上创建Powershell HomeDirectory [英] Powershell HomeDirectory not created on fileserver filesystem
问题描述
我在使用Powershell和通过cmdlet设置HomeDirectory时遇到了一个奇怪的问题
Set-ADUser -Identity user -HomeDirectory \\fileserver\home $ \user
即使cmdlet是工作并在AD中设置值,将不会在文件服务器 \fileserver\home $ \user上创建必要的文件夹。
我也有初次创建失败尝试
New-ADUser-名称 user -HomeDirectory \\fileserver\ home $ \user
我已经通过UAC以域管理员身份在Exchange服务器上启动了Powershell并通过
导入模块ActiveDirectory
$ p $导入模块ActiveDirectory p>
我没有尝试使用带有NetBIOS主机名的UNC路径,而是尝试了FQDN \fileserver.domain.local\以及ip adrress \ip\
如果我使用cd命令输入通过Powershell的UNC路径,它也可以工作,我也可以创建目录。
cd \\fileserver\ home $
mkdir test_dir
仍然不会创建目录。
如果我使用的是AD GUI,并尝试更改HomeDirectory路径,则将创建该文件夹。
有任何提示吗?
非常感谢
PS:2008R2 x64,Exchange 2010、1x Exchange,1x AD控制器,1x文件服务器解决方案值得一提的是嘿,脚本专家!博客
记住,我们要做的就是编辑Active Directory中的字段。外部服务器上的
文件系统不了解Active Directory中提供的
信息。当您在
GUI中编辑这些字段时,将根据
在该GUI界面中的代码来配置用户文件夹和权限,而不是Active
目录的功能。
就像Paul所说的,我认为您只需要自己创建一个文件夹即可。该文章中链接的是有关设置文件共享权限的信息。我想您已经完成了。
NEW-ITEM –路径 \\fileserver\home $ \user -type目录-force
I am having a weird problem using Powershell and setting a HomeDirectory via the cmdlet
Set-ADUser -Identity "user" -HomeDirectory "\\fileserver\home$\user"
Even though the cmdlet is working and setting the values in the AD, the necessary folder on the fileserver "\fileserver\home$\user" will not be created.
I have also unsuccessfully tried the same with the initial creation
New-ADUser -Name "user" -HomeDirectory "\\fileserver\home$\user"
I have started the Powershell on the Exchange server as domain-admin via UAC and imported the module ActiveDirectory via
Import-Module ActiveDirectory
Instead of using the UNC-path with NetBIOS-hostnames I also tried the FQDN \fileserver.domain.local\ and also the ip adrress \ip\
If I am using the cd command to enter the UNC-path via Powershell, it does also work, I can also create directories.
cd \\fileserver\home$ mkdir test_dir
Still, the directory will not be created. If I am using the AD GUI, and try to alter the HomeDirectory-path, the folder will be created.
Any hints? Many thanks PS: 2008R2 x64, Exchange 2010, 1x Exchange, 1x AD controller, 1x fileserver
解决方案It is worth mentioning the following from Hey, Scripting Guy! Blog
Remember, all we have done is edit a field in Active Directory. The file system on the foreign server has no clue about the information presented within Active Directory. When you edit those fields in the GUI, the user folder and permissions are provisioned as a function of the code within that GUI interface—they are not a function of Active Directory.
Much like Paul suggested I think you just need to create the folder yourself. Linked in that article is information about setting permissions for the file share as well. I imagine you already have that done.
NEW-ITEM –path "\\fileserver\home$\user" -type directory -force
这篇关于未在文件服务器文件系统上创建Powershell HomeDirectory的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!