I know there's a way to do this from a GUI (Setting up an anonymous Windows Server 2008 network share?), but I am writing a script so I want to see if you can do it without the GUI.

In other words, I want to create a share from the command line, and then be able to access that share from another box on the same network without the share prompting me for a username and password. I just want to be able to access it by doing net use \\<boxhostingshare>\<sharename>.


If you have access to PowerShell V4/WMF4 you can use new-smbshare. Information about new-smbshare found here: New-SMBShare

New-SmbShare -Name "VMSFiles" -Path "C:\ClusterStorage\Volume1\VMFiles" -FullAccess "Everyone","Guests","Anonymous Logon"

If you need to create the folder first,

new-item "c:\clusterstorage\Volume1\VMfiles" -itemtype directory

New-Item documentation.

Change folder names to the ones you require.

Thanks, Tim.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.