This command uploads a file that is named DataFile37 in the current folder as a file that is named CurrentDataFile in the folder named ContosoWorkingFolder.
Example 2: Upload all the files in the current folder
This example uses several common Windows PowerShell cmdlets and the current cmdlet to upload all files from the current folder to the root folder of container ContosoShare06.
The first command gets the name of the current folder and stores it in the $CurrentFolder variable.
The second command uses the Get-AzStorageShare cmdlet to get the file share named ContosoShare06, and then stores it in the $Container variable.
The final command gets the contents of the current folder and passes each one to the Where-Object cmdlet by using the pipeline operator.
That cmdlet filters out objects that are not files, and then passes the files to the ForEach-Object cmdlet.
That cmdlet runs a script block for each file that creates the appropriate path for it and then uses the current cmdlet to upload the file.
The result has the same name and same relative position with regard to the other files that this example uploads.
For more information about script blocks, type Get-Help about_Script_Blocks.
Example 3: Upload a local file to an Azure file, and perserve the local File SMB properties (File Attributtes, File Creation Time, File Last Write Time) in the Azure file.
This example uploads a local file to an Azure file, and perserves the local File SMB properties (File Attributtes, File Creation Time, File Last Write Time) in the Azure file.
Example 4: Upload a file with FileMode, Owner and Group to a NFS file share
Specifies the client-side time-out interval, in seconds, for one service request.
If the previous call fails in the specified interval, this cmdlet retries the request.
If this cmdlet does not receive a successful response before the interval elapses, this cmdlet returns an error.
Specifies the maximum concurrent network calls.
You can use this parameter to limit the concurrency to throttle local CPU and bandwidth usage by specifying the maximum number of concurrent network calls.
The specified value is an absolute count and is not multiplied by the core count.
This parameter can help reduce network connection problems in low bandwidth environments, such as 100 kilobits per second.
The default value is 10.
Specifies the path of a file or folder.
This cmdlet uploads contents to the file that this parameter specifies, or to a file in the folder that this parameter specifies.
If you specify a folder, this cmdlet creates a file that has the same name as the source file.
If you specify a path of a file that does not exist, this cmdlet creates that file and saves the contents to that file.
If you specify a file that already exists, and you specify the Force parameter, this cmdlet overwrites the contents of the file.
If you specify a file that already exists and you do not specify Force, this cmdlet makes no change, and returns an error.
If you specify a path of a folder that does not exist, this cmdlet makes no change, and returns an error.
Keep the source File SMB properties (File Attributtes, File Creation Time, File Last Write Time) in destination File. This parameter is only available on Windows.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.