Azure Storage for file shares
This module provides the following capabilities:
#
InstallationTo have access to the following features, you have to import the module:
PS> Install-Module -Name Arcus.Scripting.Storage.FileShare -RequiredVersion 0.4.3
#
Creating a folder on an Azure file shareCreates a new folder within the Azure File Share resource.
Parameter | Mandatory | Description |
---|---|---|
ResourceGroupName | yes | The resource group containing the Azure File Share. |
StorageAccountName | yes | The Azure Storage Account name that hosting the Azure File Share. |
FileShareName | yes | The name of the Azure File Share. |
FolderName | yes | The name of the folder to create in the Azure File Share. |
Example
PS> Create-AzFileShareStorageFolder -ResourceGroupName "shipping-resources" -StorageAccountName "tracking-account-storage" -FileShareName "returned" -FolderName "containers"# Creating 'containers' directory in file share..# Directory 'containers' has been created..
#
Copying files to a folder on an Azure file shareUpload a set of files from a given folder, optionally matching a specific file mask, to an Azure File Share.
Parameter | Mandatory | Description |
---|---|---|
ResourceGroupName | yes | The resource group containing the Azure File Share. |
StorageAccountName | yes | The name of the Azure Storage account that is hosting the Azure File Share. |
FileShareName | yes | The name of the Azure File Share. |
SourceFolderPath | yes | The file directory where the targeted files are located. |
DestinationFolderName | yes | The name of the destination folder on the Azure File Share where the targeted files will be uploaded. |
FileMask | no | The file mask that filters out the targeted files at the source folder that will be uploaded to the Azure File Share. |
Example
PS> Copy-AzFileShareStorageFiles -ResourceGroupName "shipping-resources" -StorageAccountName "tracking-account-storage" -FileShareName "returned" -SourceFolderPath "containers" -DestinationFolderName "containers"# Upload files to file share...# Uploaded the file to File Share: [fileName]# Uploaded the file to File Share: [fileName]# Files have been uploaded