Basic objective, we’ve got a ton of shares which we need to move to a new server. The data has already been replicated but we need to re-share.
There are methods of doing this by exporting the registry but being a little scared of messing up the current shares and requiring a reboot I decided to do this manually…
Export list of shares on source server:
get-WmiObject -class Win32_Share -computer servername.fqdn.com | Export-Csv -Path "C:\Shares.csv"
Create shares on destination server:
Need the powershell command here
CMD Net Share
net share "ShareName"="D:\Path\FolderName" /grant:everyone,FULL