Skip to main content
Version: v0.5

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.5.0

Creating a folder on an Azure file share

Creates a new folder within the Azure File Share resource. When a folder already exists with the provided name, it will be skipped. No exception will be thrown.

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 Azure FileShare storage folder 'containers' in file share 'returned'..
# Created Azure FileShare storage folder 'containers' in file share 'returned'

Uploading 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> Upload-AzFileShareStorageFiles -ResourceGroupName "shipping-resources" -StorageAccountName "tracking-account-storage" -FileShareName "returned" -SourceFolderPath "containers" -DestinationFolderName "containers"
# Upload files to Azure FileShare storage 'returned'...
# Uploaded the '[fileName]' file to Azure FileShare 'returned'
# Uploaded the '[fileName]' file to Azure FileShare 'returned'
# Files have been uploaded to Azure FileShare storage 'returned'