< Back

Get-AzureStorageFileContent

Tue Jan 29, 2019 9:26 pm

NAME Get-AzureStorageFileContent



SYNOPSIS

Downloads the contents of a file.





SYNTAX

Get-AzureStorageFileContent [-ShareName] <String> [-Path] <String> [[-Destination] <String>] [-CheckMd5] [-ClientTimeoutPerRequest <Int32>]

[-ConcurrentTaskCount <Int32>] [-Context <IStorageContext>] [-Force] [-PassThru] [-ServerTimeoutPerRequest <Int32>] [-Confirm] [-WhatIf]

[<CommonParameters>]



Get-AzureStorageFileContent [-Directory] <CloudFileDirectory> [-Path] <String> [[-Destination] <String>] [-CheckMd5] [-ClientTimeoutPerRequest

<Int32>] [-ConcurrentTaskCount <Int32>] [-Force] [-PassThru] [-ServerTimeoutPerRequest <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]



Get-AzureStorageFileContent [-File] <CloudFile> [[-Destination] <String>] [-CheckMd5] [-ClientTimeoutPerRequest <Int32>] [-ConcurrentTaskCount

<Int32>] [-Force] [-PassThru] [-ServerTimeoutPerRequest <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]



Get-AzureStorageFileContent [-Share] <CloudFileShare> [-Path] <String> [[-Destination] <String>] [-CheckMd5] [-ClientTimeoutPerRequest <Int32>]

[-ConcurrentTaskCount <Int32>] [-Force] [-PassThru] [-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.





PARAMETERS

-CheckMd5 [<SwitchParameter>]

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.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-ClientTimeoutPerRequest <Int32>

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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ConcurrentTaskCount <Int32>

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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Context <IStorageContext>

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.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-Destination <String>

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.



Required? false

Position? 2

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Directory <CloudFileDirectory>

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.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-File <CloudFile>

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.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-Force [<SwitchParameter>]

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.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-PassThru [<SwitchParameter>]

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.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Path <String>

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.



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ServerTimeoutPerRequest <Int32>

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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Share <CloudFileShare>

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.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-ShareName <String>

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



Required? true

Position? 0

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

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



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 (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

IStorageContext

Parameter 'Context' accepts value of type 'IStorageContext' from the pipeline



CloudFileDirectory

Parameter 'Directory' accepts value of type 'CloudFileDirectory' from the pipeline



CloudFile

Parameter 'File' accepts value of type 'CloudFile' from the pipeline



CloudFileShare

Parameter 'Share' accepts value of type 'CloudFileShare' from the pipeline





OUTPUTS



NOTES









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.





Example 2: Downloads the files under sample file share



PS C:\\>Get-AzureStorageFile -ShareName sample | ? {$_.GetType().Name -eq "CloudFile"} | Get-AzureStorageFileContent



This example downloads the files under sample file share







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... ilecontent

Get-AzureStorageFile

Set-AzureStorageFileContent