Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
New-AzStorageShare
- Module:
- Az.Storage Module
Creates a file share.
Syntax
Default (Default)
New-AzStorageShare
[-Name] <String>
[-Protocol <String>]
[-EnableSnapshotVirtualDirectoryAccess <Boolean>]
[-Context <IStorageContext>]
[-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-ConcurrentTaskCount <Int32>]
[<CommonParameters>]
Description
The New-AzStorageShare cmdlet creates a file share.
Examples
Example 1: Create a file share
New-AzStorageShare -Name "ContosoShare06"
This command creates a file share named ContosoShare06.
Example 2: Create a file share with NFS protocol and EnableSnapshotVirtualDirectoryAccess
New-AzStorageShare -Name "contososhare07" -Protocol Nfs -EnableSnapshotVirtualDirectoryAccess $true
This command creates a file share named contososhare07 with NFS protocol, and EnableSnapshotVirtualDirectoryAccess as true.
Parameters
-ClientTimeoutPerRequest
Specifies the client-side time-out interval, in seconds, for one service request. If the previous call fails in the specified interval, this cmdlet retries the request. If this cmdlet does not receive a successful response before the interval elapses, this cmdlet returns an error.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ClientTimeoutPerRequestInSeconds |
Parameter sets
-ConcurrentTaskCount
Specifies the maximum concurrent network calls. You can use this parameter to limit the concurrency to throttle local CPU and bandwidth usage by specifying the maximum number of concurrent network calls. The specified value is an absolute count and is not multiplied by the core count. This parameter can help reduce network connection problems in low bandwidth environments, such as 100 kilobits per second. The default value is 10.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Context
Specifies an Azure storage context. To obtain a storage context, use the New-AzStorageContext cmdlet.
Parameter properties
| Type: | IStorageContext |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzureRmContext, AzureCredential |
Parameter sets
-EnableSnapshotVirtualDirectoryAccess
Only applicable for premium file storage accounts. Specifies whether the snapshot virtual directory should be accessible at the root of share mount point when NFS is enabled. If not specified, the default is true.
Parameter properties
| Type: | Boolean |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Name
Specifies the name of a file share. This cmdlet creates a file share that has the name that this parameter specifies.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Protocol
The protocols to enable for the share.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ServerTimeoutPerRequest
Specifies the length of the time-out period for the server part of a request.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ServerTimeoutPerRequestInSeconds |
Parameter sets
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
String
IStorageContext
Outputs
AzureStorageFileShare
Related Links
Azure PowerShell
Feedback
Was this page helpful?
