Using the New-SmbShare cmdlet in Powershell 3.0, I would like to create a share and specify a Local Group as the ReadAccess group. Code looks basically like:
$serverName = "Server01" $groupName = "Share Readers" $secGroup = "$serverName\$groupName" $shareName = "TEMP" $sharePath = "C:\TEMP" New-SmbShare -Name $shareName -Path $sharePath -ContinuouslyAvailable $TRUE -ReadAccess $secGroup -CachingMode NONE
When I run this, I get the following output:
New-SmbShare : The request is not supported.
At line:1 char:1
+ New-SmbShare -Name "TEMP" -Path "C:\TEMP" -ContinuouslyAvailable $TRUE ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (MSFT_SMBShare:ROOT/Microsoft/Windows/SMB/MSFT_SMBShare) [New-SmbShare
], CimException
+ FullyQualifiedErrorId : Windows System Error 50,New-SmbShare
HELP!!!!