Windows Server 2012 R2 introduced a new version of SMB. Technically it’s SMB version 3.02, but we continue to call it just SMB3. The main changes are described at http://technet.microsoft.com/en-us/library/hh831474.aspx.
With this new release, we made a few changes in SMB PowerShell to support the new scenarios and features. This includes a few new cmdlets and some changes to existing cmdlets, with extra care not break any of your existing scripts.
This blog post outlines one of the 7 set of changes related to SMB PowerShell in Windows Server 2012 R2.
Changes related to SMB Witness
While the overall functionality of the SMB Witness is largely unchanged in Windows Server 2012 R2 (aside from per-share redirection), we have put some effort in improving the SMB PowerShell cmdlets associated with it. Here are the changes:
1) The Move-SmbWitnessClient cmdlet can be referred to now simply as Move-SmbClient. This is simply a new alias that better describes what the cmdlet actually does.
2) The default view for Get-SmbWitnessClient was improved. Here’s the new list of items shown:
Client Computer Witness Node File Server Network Name Share Name Client State
Name Name Node Name
—————– ————- ————- ———— ———- ————
JOSE-V JOSE-A1 JOSE-A2 JOSE-F VMS4 RequestedNoti…
JOSE-V JOSE-A1 JOSE-A2 JOSE-F VMS3 RequestedNoti…
JOSE-V JOSE-A1 JOSE-A3 JOSE-F VMS1 RequestedNoti…
JOSE-V JOSE-A1 JOSE-A3 JOSE-F VMS2 RequestedNoti…
JOSE-V JOSE-A2 JOSE-A1 JOSE-F VMS6 RequestedNoti…
JOSE-V JOSE-A2 JOSE-A1 JOSE-F VMS5 RequestedNoti…
3) There is a new “NetworkName” parameter in Move-SmbClient. If a NetworkName is specified, then only those will be moved.
Windows Server 2012 syntax for Move-SmbWitnessClient:
Move-SmbWitnessClient -ClientName X -DestinationNode Y
Windows Server 2012 R2 syntax:
Move-SmbClient -ClientName X -DestinationNode Y [ -NetworkName Z ]
1) If the –NetworkName is omitted in the Move-SmbClient cmdlet, all client connections will be moved to the destination.
2) When using per-share redirection, the SMB client will always move to the file server node that owns the volume behind the file share. Using Move-SmbClient (or Move-SmbWitnessClient) in that situation has no effect.
3) This blog post is an updated version of the September 2013 post at http://blogs.technet.com/b/josebda/archive/2013/09/03/what-s-new-in-smb-powershell-in-windows-server-2012-r2.aspx focused on a single topic.