Get-​Azure​Storage​File​Content

Downloads the contents of a file.

Syntax

Get-AzureStorageFileContent
   [-ShareName] <String>
   [-Path] <String>
   [[-Destination] <String>]
   [-CheckMd5]
   [-ClientTimeoutPerRequest <Int32>]
   [-ConcurrentTaskCount <Int32>]
   [-Context <AzureStorageContext>]
   [-Force]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-PassThru]
   [-PipelineVariable <String>]
   [-ServerTimeoutPerRequest <Int32>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
Get-AzureStorageFileContent
   [-Directory] <CloudFileDirectory>
   [-Path] <String>
   [[-Destination] <String>]
   [-CheckMd5]
   [-ClientTimeoutPerRequest <Int32>]
   [-ConcurrentTaskCount <Int32>]
   [-Force]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-PassThru]
   [-PipelineVariable <String>]
   [-ServerTimeoutPerRequest <Int32>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
Get-AzureStorageFileContent
   [-File] <CloudFile>
   [[-Destination] <String>]
   [-CheckMd5]
   [-ClientTimeoutPerRequest <Int32>]
   [-ConcurrentTaskCount <Int32>]
   [-Force]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-PassThru]
   [-PipelineVariable <String>]
   [-ServerTimeoutPerRequest <Int32>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
Get-AzureStorageFileContent
   [-Share] <CloudFileShare>
   [-Path] <String>
   [[-Destination] <String>]
   [-CheckMd5]
   [-ClientTimeoutPerRequest <Int32>]
   [-ConcurrentTaskCount <Int32>]
   [-Force]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-PassThru]
   [-PipelineVariable <String>]
   [-ServerTimeoutPerRequest <Int32>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The Get-AzureStorageFileContent cmdlet downloads the contents of a file, and then saves it to a destination that you specify. This cmdlet does not return the contents of the file.

Examples

Example 1: Download a file from a folder

PS C:\>Get-AzureStorageFileContent -ShareName "ContosoShare06" -Path "ContosoWorkingFolder/CurrentDataFile"

This command downloads a file that is named CurrentDataFile in the folder ContosoWorkingFolder from the file share ContosoShare06 to current folder.

Required Parameters

-Directory

Specifies a folder as a CloudFileDirectory object. This cmdlet gets content for a file in the folder that this parameter specifies. To obtain a directory, use the New-AzureStorageDirectory cmdlet. You can also use the Get-AzureStorageFile cmdlet to obtain a directory.

Type:CloudFileDirectory
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-File

Specifies a file as a CloudFile object. This cmdlet gets the file that this parameter specifies. To obtain a CloudFile object, use the Get-AzureStorageFile cmdlet.

Type:CloudFile
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Path

Specifies the path of a file. This cmdlet gets the contents the file that this parameter specifies. If the file does not exist, this cmdlet returns an error.

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Share

Specifies a CloudFileShare object. This cmdlet downloads the contents of the file in the share this parameter specifies. To obtain a CloudFileShare object, use the Get-AzureStorageShare cmdlet. This object contains the storage context. If you specify this parameter, do not specify the Context parameter.

Type:CloudFileShare
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-ShareName

Specifies the name of the file share. This cmdlet downloads the contents of the file in the share this parameter specifies.

Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-CheckMd5

If you specify the path of a file that does not exist, this cmdlet creates that file, and saves the contents in the new file. If you specify a path of a file that already exists and you specify the Force parameter, the cmdlet overwrites the file. If you specify a path of an existing file and you do not specify Force, the cmdlet prompts you before it continues.If you specify the path of a folder, this cmdlet attempts to create a file that has the name of the Azure storage file.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ClientTimeoutPerRequest

If you specify the path of a file that does not exist, this cmdlet creates that file, and saves the contents in the new file. If you specify a path of a file that already exists and you specify the Force parameter, the cmdlet overwrites the file. If you specify a path of an existing file and you do not specify Force, the cmdlet prompts you before it continues.If you specify the path of a folder, this cmdlet attempts to create a file that has the name of the Azure storage file.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ConcurrentTaskCount

If you specify the path of a file that does not exist, this cmdlet creates that file, and saves the contents in the new file. If you specify a path of a file that already exists and you specify the Force parameter, the cmdlet overwrites the file. If you specify a path of an existing file and you do not specify Force, the cmdlet prompts you before it continues.If you specify the path of a folder, this cmdlet attempts to create a file that has the name of the Azure storage file.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Context

If you specify the path of a file that does not exist, this cmdlet creates that file, and saves the contents in the new file. If you specify a path of a file that already exists and you specify the Force parameter, the cmdlet overwrites the file. If you specify a path of an existing file and you do not specify Force, the cmdlet prompts you before it continues.If you specify the path of a folder, this cmdlet attempts to create a file that has the name of the Azure storage file.

Type:AzureStorageContext
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-Destination

Specifies the destination path. This cmdlet downloads the file contents to the location that this parameter specifies.If you specify the path of a file that does not exist, this cmdlet creates that file, and saves the contents in the new file. If you specify a path of a file that already exists and you specify the Force parameter, the cmdlet overwrites the file. If you specify a path of an existing file and you do not specify Force, the cmdlet prompts you before it continues.

If you specify the path of a folder, this cmdlet attempts to create a file that has the name of the Azure storage file.

Type:String
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

If you specify the path of a file that does not exist, this cmdlet creates that file, and saves the contents in the new file. If you specify a path of a file that already exists and you specify the Force parameter, the cmdlet overwrites the file. If you specify a path of an existing file and you do not specify Force, the cmdlet prompts you before it continues.If you specify the path of a folder, this cmdlet attempts to create a file that has the name of the Azure storage file.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationAction

Specifies how this cmdlet responds to an information event.The acceptable values for this parameter are:- Continue

  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PassThru

If you specify the path of a file that does not exist, this cmdlet creates that file, and saves the contents in the new file. If you specify a path of a file that already exists and you specify the Force parameter, the cmdlet overwrites the file. If you specify a path of an existing file and you do not specify Force, the cmdlet prompts you before it continues.If you specify the path of a folder, this cmdlet attempts to create a file that has the name of the Azure storage file.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PipelineVariable

Stores the value of the current pipeline element as a variable, for any named command as it flows through the pipeline.

Type:String
Aliases:pv
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ServerTimeoutPerRequest

If you specify the path of a file that does not exist, this cmdlet creates that file, and saves the contents in the new file. If you specify a path of a file that already exists and you specify the Force parameter, the cmdlet overwrites the file. If you specify a path of an existing file and you do not specify Force, the cmdlet prompts you before it continues.If you specify the path of a folder, this cmdlet attempts to create a file that has the name of the Azure storage file.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False