I'm trying to create a way to script out creating file shares in AD rather than having to use mapped drives or GPOs.
The issue that I'm having is that the New-ADObject type does not seem to include an option for file share, but if I look at an existing share in AD it just has the objectClass as volume.
Basically the syntax is:
New-AdObject -Name 'WhatEverYouWantToCallIt" -type 'Volume' -Path "DistinguishedADPath" -OtherAttributes @{ 'uNCName' = '\servername\sharename\' }
This will eliminate your need for mapped drives by teaching users to go to Network > Search Active Directory > Find: Shared Folders > Find Now