< Back

copy-azureBlobItem

Sat Jan 11, 2020 10:13 am

NAME copy-azureBlobItem



SYNOPSIS

Copies one or more files from the mounted Azure Blob account to the local

file system.





SYNTAX

copy-azureBlobItem [-pspath] <String> [-localFilePath] <String> [-force] [<CommonParameters>]





DESCRIPTION

Copies one or more files from the mounted Azure Blob account to the local

file system. The PSPath parameter specifies the path to the Azure Blob

item, and the LocalFilePath parameter identifies where to save the file

locally.





PARAMETERS

-pspath <String>

the path to the item; this must point to an Azure Blob provider path



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-localFilePath <String>

the path to the local file; this must point to a Filesystem provider path



Required? true

Position? 2

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-force [<SwitchParameter>]

overwrites the local file if it already exists



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

The Azure Blob item to copy, either as a provider object with a PSPath property,

or a String containing the PSPath to the Azure Blob object.





OUTPUTS

The local file system object copied from Azure Blob.





-------------------------- EXAMPLE 1 --------------------------



C:\\PS>copy-AzureBlobItem dp:/transcripts/audit.txt -localFilePath ./audit.txt



This example copies the audit.txt file from the transcripts hive on Azure Blob

to a file named audit.txt in the current file system provider location.









-------------------------- EXAMPLE 2 --------------------------



DP:\\transcripts>dir | copy-AzureBlobItem -localFilePath {$_.name} -force



This example copies all items from the current location in the Azure Blob

provider to the local file system. The force parameter is specified, so the

command will overwrite any existing files.











RELATED LINKS

about_AzureBlobProvider

about_AzureBlobProvider_Version