A blog by Jose Barreto, a member of the File Server team at Microsoft.
All messages posted to this blog are provided "AS IS" with no warranties, and confer no rights.
Information on unreleased products are subject to change without notice.
Dates related to unreleased products are estimates and are subject to change without notice.
The content of this site are personal opinions and might not represent the Microsoft Corporation view.
The information contained in this blog represents my view on the issues discussed as of the date of publication.
You should not consider older, out-of-date posts to reflect my current thoughts and opinions.
© Copyright 2004-2012 by Jose Barreto. All rights reserved.
Follow @josebarreto on Twitter for updates on new blog posts.
I got a question the other day about one of the scripts I published as part of a step-by-step for Hyper-V over SMB, Here's the relevant line from that script:
New-SmbShare -Name VMS3 -Path C:\ClusterStorage\Volume1\VMS -FullAccess FST2.Test\Administrator, FST2.Test\FST2-HV1$, FST2.Test\FST2-HV2$, FST2.Test\FST2-HVC$
The question was related to how does New-SmbShare know to create the share on the cluster as a continuously available share. Nothing in the cmdlet or its parameters tells it that. So the puzzled reader was asking what did he miss. It worked, but he could not figure out how.
The answer is quite simple, although it's not obvious. This is done automatically based on where the folder (specified the -Path parameter) lives.
Here are the rules:
There is actually a -ScopeName parameter for New-SmbShare, which can be used to specify the cluster name (either the netname for a classic cluster or the DNN for a Scale-Out cluster), but in most cases this is entirely optional.
There is also a -ContinuoulyAvailable parameter, but it automatically defaults to $true if the share is on a cluster, so it also optional (unless you want to create a non-CA share on a cluster - not a good idea anyway).
You can read more about these automatic behaviors in SMB 3.0 at http://blogs.technet.com/b/josebda/archive/2012/10/08/windows-server-2012-file-servers-and-smb-3-0-simpler-and-easier-by-design.aspx
For more details about SMB PowerShell cmdlets, check out http://blogs.technet.com/b/josebda/archive/2012/06/27/the-basics-of-smb-powershell-a-feature-of-windows-server-2012-and-smb-3-0.aspx?Redirected=true
Nice way to do thanks .