Skip to main content
Version: v0.4.3

Azure Storage for file shares

This module provides the following capabilities:

Installation

To 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 share

Creates a new folder within the Azure File Share resource.

ParameterMandatoryDescription
ResourceGroupNameyesThe resource group containing the Azure File Share.
StorageAccountNameyesThe Azure Storage Account name that hosting the Azure File Share.
FileShareNameyesThe name of the Azure File Share.
FolderNameyesThe 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 share

Upload a set of files from a given folder, optionally matching a specific file mask, to an Azure File Share.

ParameterMandatoryDescription
ResourceGroupNameyesThe resource group containing the Azure File Share.
StorageAccountNameyesThe name of the Azure Storage account that is hosting the Azure File Share.
FileShareNameyesThe name of the Azure File Share.
SourceFolderPathyesThe file directory where the targeted files are located.
DestinationFolderNameyesThe name of the destination folder on the Azure File Share where the targeted files will be uploaded.
FileMasknoThe 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