简体   繁体   English

azure 文件共享 map 到基于客户端的文件夹?

[英]azure file share map to folder based on clients?

Hello Every azure file share map to folder based on clients?您好,每个 azure 文件共享 map 到基于客户端的文件夹?

I have 300 clients and each have there own files to upload on ADFS.我有 300 个客户端,每个客户端都有自己的文件要上传到 ADFS。 I want to map drive but folder which is only associated with that client not root folder.我想要 map 驱动器,但文件夹只与该客户端相关联,而不是根文件夹。

so will this be possible with ADSF or any option?那么这可以通过 ADSF 或任何选项实现吗?

Azure file share map to folder based on clients. Azure 文件共享 map 到基于客户端的文件夹。

We can do this in two ways.我们可以通过两种方式做到这一点。

Approach 1方法一

One way is to map a drive for each client with their own files on ADFS by creating a folder for each client and has to use the ADFS drive mapping feature to map the client's folder as the root directory for their drive.一种方法是通过为每个客户端创建一个文件夹并将 map 客户端的文件夹作为其驱动器的根目录来使用 map 客户端的文件夹作为其驱动器的根目录,从而为每个客户端在 ADFS 上创建一个文件夹,并且必须使用 ADFS 驱动器映射功能。

And this can be done by using the net use command in Command Prompt by specifying the client's folder as the target directory.这可以通过在Command Prompt中使用net use命令将客户端的文件夹指定为目标目录来完成。

net use [drive letter:] [\server name\share name] [password] /user:[username] net use [盘符:] [\服务器名\共享名] [密码] /user:[用户名]

For example, To map the drive letter X to the folder "\adfs-server\client1files" for a user named "client1" with the password "client1password", you would use the following command:例如,要将名为“client1”且密码为“client1password”的用户的驱动器盘符 X 复制到文件夹“\adfs-server\client1files”,您可以使用以下命令:

net use X: \\adfs-server\client1files client1password /user:client1

在此处输入图像描述

Approach 2方法二

Another way is to use a script to automate the process, in this way you do not need to manually map the drive for each client.另一种方法是使用脚本来自动执行该过程,这样您就不需要手动为每个客户端驱动 map。

for this you need to create the script into a.bat file and have run based on requirement.为此,您需要将脚本创建到 a.bat 文件中并根据要求运行。

Script Example

net use P: "\\server\foldername\foldername"

@echo off
setlocal

rem Define variables for the server name, share name, and client information
set server=\\adfs-server
set share=clientfiles
set username=client
set password=clientpassword

rem Iterate through the clients and map their drive
for /l %%i in (1,1,300) do (
    set clientnum=%%i
    set driveletter=%%i

    rem Map the drive for the current client
    net use %driveletter%: %server%\%share%%clientnum% %password% /user:%username%%clientnum%

    rem Confirm the drive mapping
    echo Drive %driveletter%: has been mapped to %server%\%share%%clientnum% for %username%%clientnum%
)

References taken from参考资料取自

Net User 网络用户

Net Use Command网络使用命令

Thanks @ Ruud for the lazyadmin blog.感谢@Ruud 的 lazyadmin 博客。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何与组织内的利益相关者共享 Azure 文件共享数据? - How to share Azure File Share data with the stakeholder within the organization? 导航到 Terraform 在 Azure 创建的文件共享 - Navigate to file share created by Terraform in Azure 如何与多个客户端共享 quicksight 嵌入式仪表板 - how to share quicksight embeded dashboard with multiple clients 为 Azure 文件共享存储帐户部署模板时面临的问题 - Facing Issues on Deploying template for Azure File Share Storage Account 从 Azure 文件共享加载内容到 Azure Static Web App,管理用户访问权限 - Loading content onto Azure Static Web App from Azure File Share, managing user access permissions 无论如何要在 Azure VM(Windows)中的特定路径下载特定文件/文件夹 - Is there anyway to download a particular file/folder at a certain path in an Azure VM(Windows) Azure 存储 - 文件共享 - 在嵌套文件夹中移动 16m 文件 - Azure Storage - File Share - Move 16m files in nested folders 当应用程序托管在 windows VM 中的 IIS 上时,无法将文件复制到 Azure 文件共享安装的驱动器 - Not able to copy file to Azure file share mounted drive when application hosted on IIS in windows VM 文件资源管理器在尝试访问时挂起已安装 Azure Windows 10 桌面上的文件共享 - File Explorer hangs when trying access Mounted Azure File share on Windows 10 Desktop 在 web 应用程序中安装 azure 文件共享时,我得到一个 state 的 InvalidCredentials - When mounting an azure file share in a web app I get a state of InvalidCredentials
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM