How to Map Network Drives without GPOs: Logon Script - Active Directory (AD) | Windows Server 2022
HTML-код
- Опубликовано: 11 сен 2024
- You can map multiple network drives using Active Directory (AD) Users Profiles tab by assigning a script. This demonstration is done using Windows Server 2022 (same steps apply for Windows Server 2019). This method use the "net use" commands to assign drive letters to specific shared folder locations in the Domain Controller. This is a very light weight script and can run in the background within seconds of a user logging in and any delays are often caused by network latencies.
Windows Server default scripts location: {YOUR_SERVER_LOCATION}
etlogon
The end user will not have the permission to edit any scripts saved in netlogon network folder by default. The script can be saved as a .ps1, .cmd, .bat file, etc. You can only map one network location (network drive) to one drive letter per user per logon session. More information will be published on sanuja.com in the future.
Microsoft documentations on net use commands:
learn.microsof...
learn.microsof...
-Share Folders based on Group Permissions: • How to share folders b...
-Create Home Folders for multiple users: • How to create Home Fol...
-Create Active Directory OUs and Users: • Create Active Director...
-Install AD DS on Windows Server 2022 Core: • Install Active Directo...
-Initial configs: • Windows Server 2022 Co...
-Windows Server Admin playlist:
• Windows Server Adminis...
-Microsoft Windows playlist:
• Microsoft Windows
Track: WhileART Sessions Episode 02 | Waramathi (වරමාතී) Fusion
Watch: • WhileART Sessions Epis...
sanuja.com
Co-producer:
Manuja Senanayake
#windowsserver2022 #activedirectory #adds #sharefolders #networking
Hey man, GREAT VIDEO! Clear, concise, and it got me through my problem. Thanks!!!
You're welcome!
This is useful for school labs. Thank you. :)
You're welcome!
Спасибо! Очень полезное видео!
Tight video
Great video, ty!
Glad it was helpful!
Thanks for guidance
You're welcome 😊
I am a bit confuse, what if you have 200 users and they are in different departments and you want to to have there own H: Drive
In that situation, you can either create one H drive at a time for 200+ users, which is not ideal or you can write a Windows PowerShell script to create home directories and grant permissions. I am in the process of creating PS tutorials but right now. I will be going over useful scripts sometimes later. If you are a looking to learn PS, try: ruclips.net/p/PLLJXhnhyaJU_R6xVkDtvfk-fgZGOGG8l0&si=pyDzwTMuqI_4YZcc
@@NetITGeeks Amazing because at my place of work we all have our own H: drives but I want to know how this is done. Wouldn't they have access to each H drive??
Your Sys Admin or IT Analysts most likely have used a PowerShell script to create those folders and grant correct permissions to each user when the company first started. Then when new users comes it, if it is in large batches, a PowerShell script is most likely used at that point as well. But even in very large organizations, such as the org I work for, we just manually create home directories if it is just for handful of new users. I will create a video tutorial on one of those PS scripts sometimes in the future. If you Subscribe, you will get a notification :)
where i find out netlogon script in end user. if I need to manual run
If you want to allow your user the option to manually run it, you will have to place your script or scripts in either their home drive or a shared drive in which both the user and admin have access to. Most orgs would place it under individual home drives or H drives because it can be customized for each individual.
How come when i try and add the cmd file to netlogon i get access denied?
Are you logged into the server with the default Administrator account? If you are using any other secondary admin accounts, make sure your permissions are same as the default one or use the default domain admin account. Also check other GPOs and see if there is a one that you added that may be conflicting with this GPO.
Can you use gpo to map to a server that is not domain joined? The ability to map like that and use a particular username and password does not seem to be allowed any longer.
I believe this can be done using a PowerShell script. But I have not gone over intermediate and advanced PS scripting on YT channel as of now. You may try Googling it or I will look into this at a later time and post a video.
@@NetITGeeks thanks! After I posted that here I found another of your videos combine with a different video I think i got the answer. I think I understand how to script it and have a gpo apply that script based on a security group.
Ok i rewatched the video will all the user be affected by this script?
If your question is if this script going to map this network drive for everyone in that OU or Security Group, the answer is no. You have to edit the "Logon script:" path on each user. Each users also must have permission to Read or higher level of access granted in the permissions as well. I have covered the folder permission in a different video. If you are interested, please check my channel.
can you add more than one script
There is a workaround I use when I need to pull multiple scripts at logon, which is to call-in other script files within the main script. The main logon script can reference scripts elsewhere and with PowerShell, you can do this very easily.