Scenario: The boss calls and says: “Vitaliy, make it so that all IT department employees automatically get a network drive Z: with documents when they log in”. As a programmer, you’ll appreciate this: we write a “rule” once, and it applies to all objects of the “IT-User” class.
Step 1: Create a shared folder on the Server
First we need to create what we’ll be connecting.
- On the Server (
SRV-DC01), open Explorer, go to driveC:. - Create a folder
CompanyData. - Right-click → Properties → Sharing tab.
- Click Advanced Sharing → check Share this folder.
- Click Permissions.
- Make sure
Everyonehas the Read checkbox checked (or Change, if you want to allow writing).
- Make sure
- Click OK, OK, Close.
- Important: Remember the network path. Usually it’s
\\SRV-DC01\CompanyData.
Step 2: Create a Policy (GPO)
- In Server Manager → Tools → Group Policy Management.
- Expand the tree on the left:
Forest→Domains→vbo.local. - Find your folder (OU)
IT-Dept(where your user Hans is). - Right-click → Create a GPO in this domain, and Link it here…
- Name the policy:
GPO_Map_Drive_Z. - Now the policy is created but empty. Right-click → Edit.
Step 3: Configure the drive (The Config)
The policy editor opens. There are thousands of settings. We need a specific one.
- Navigate to: User Configuration → Preferences → Windows Settings → Drive Maps.
- Right-click in the empty area on the right → New → Mapped Drive.
- Settings:
- Action:
Update(the safest option). - Location:
\\SRV-DC01\CompanyData(path to the folder from Step 1). - Reconnect: Check the box (so the drive doesn’t disappear after restart).
- Label: Write
Company Data(this is how the drive will appear to the user). - Drive Letter: Select
Z:.
- Action:
- Click OK. Close all editor windows.
Step 4: Test (Deployment)
Policies don’t update instantly (usually every 90 minutes). But we can force this.
- Go to Windows 11 (client).
- Log in as your user.
- Open command prompt (CMD) or PowerShell.
- Enter the jedi admin command:
gpupdate /force(It forces the computer to immediately fetch new rules from the server). - When it says “Successfully completed”, open This PC. Result: If you see drive Z: (Company Data) under “Network locations” — congratulations! You’ve just automated a routine task.