Rename-AzStorageFile

Hiermee wijzigt u de naam van een bestand.

Syntax

Rename-AzStorageFile
      [-ShareName] <String>
      [-SourcePath] <String>
      [[-DestinationPath] <String>]
      [-ContentType <String>]
      [-Permission <String>]
      [-DisAllowSourceTrailingDot]
      [-DisAllowDestTrailingDot]
      [-Force]
      [-AsJob]
      [-Context <IStorageContext>]
      [-DefaultProfile <IAzureContextContainer>]
      [-IgnoreReadonly]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Rename-AzStorageFile
      [-ShareFileClient] <ShareFileClient>
      [[-DestinationPath] <String>]
      [-ContentType <String>]
      [-Permission <String>]
      [-Force]
      [-AsJob]
      [-Context <IStorageContext>]
      [-DefaultProfile <IAzureContextContainer>]
      [-IgnoreReadonly]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Rename-AzStorageFile
      [-ShareClient] <ShareClient>
      [-SourcePath] <String>
      [[-DestinationPath] <String>]
      [-ContentType <String>]
      [-Permission <String>]
      [-Force]
      [-AsJob]
      [-Context <IStorageContext>]
      [-DefaultProfile <IAzureContextContainer>]
      [-IgnoreReadonly]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Rename-AzStorageFile
      [-ShareDirectoryClient] <ShareDirectoryClient>
      [-SourcePath] <String>
      [[-DestinationPath] <String>]
      [-ContentType <String>]
      [-Permission <String>]
      [-Force]
      [-AsJob]
      [-Context <IStorageContext>]
      [-DefaultProfile <IAzureContextContainer>]
      [-IgnoreReadonly]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

De cmdlet Rename-AzStorageFile wijzigt de naam van een map uit een bestandsshare.

Voorbeelden

Voorbeeld 1: De naam van een bestand wijzigen vanuit een bestandsshare

Rename-AzStorageFile -SourcePath testfile1 -DestinationPath testfile2 -ShareName myshare

Directory: https://myaccount.file.core.windows.net/myshare

Type                Length Name
----                ------ ----
File                   512 testfile2

Met deze opdracht wordt de naam van een bestand van testfile1 gewijzigd in testfile2 onder bestandsshare myshare.

Voorbeeld 2: De naam van een bestand wijzigen vanuit een bestandsshare met behulp van een pijplijn

Get-AzStorageFile -ShareName myshare -Path testfile1 | Rename-AzStorageFile -DestinationPath testfile2

Directory: https://myaccount.file.core.windows.net/myshare

Type                Length Name
----                ------ ----
File                   512 testfile2

Met deze opdracht wordt eerst een bestandsclientobject opgehaald en wordt de naam van het bestand gewijzigd van testfile1 in testfile2 met behulp van de pijplijn.

Parameters

-AsJob

Cmdlet op de achtergrond uitvoeren

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

-Confirm

Hiermee wordt u gevraagd om bevestiging voordat u de cmdlet uitvoert.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ContentType

Hiermee stelt u het MIME-inhoudstype van het bestand in. Het standaardtype is 'application/octet-stream'.

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

-Context

Azure Storage-contextobject

Type:IStorageContext
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-DefaultProfile

De referenties, accounts, tenants en abonnementen die worden gebruikt voor communicatie met Azure.

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DestinationPath

Het doelpad om de naam van het bestand te wijzigen.

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

-DisAllowDestTrailingDot

Volg punt (.) niet toe om de doelmap en doelbestandsnamen achtervoegsel te achtervoegen.

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

-DisAllowSourceTrailingDot

Volg punt (.) niet toe om de bronmap en bronbestandsnamen achtervoegsel te achtervoegen.

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

-Force

Dwing het bestaande bestand te overschrijven.

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

-IgnoreReadonly

Optioneel. Hiermee geeft u op of het kenmerk ReadOnly op een reeds bestaande doelbestand moet worden gerespecteerd. Als waar is, slaagt de naam ervan, anders mislukt de naam van een eerder bestand op de bestemming met de set ReadOnly-kenmerken.

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

-Permission

Indien opgegeven moet de machtiging (beveiligingsdescriptor) worden ingesteld voor de map/het bestand. Standaardwaarde: Overnemen. Als SDDL is opgegeven als invoer, moet deze eigenaar, groep en dacl hebben.

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

-ShareClient

ShareClient heeft de share aangegeven waarin het bestand wordt vermeld.

Type:ShareClient
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ShareDirectoryClient

ShareDirectoryClient heeft de share aangegeven waarin het bestand wordt vermeld.

Type:ShareDirectoryClient
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ShareFileClient

Bronbestandexemplaren

Type:ShareFileClient
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ShareName

De naam van de bestandsshare waarin het bestand wordt vermeld.

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

-SourcePath

Pad naar een bestaand bestand.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Hiermee wordt weergegeven wat er zou gebeuren als u de cmdlet uitvoert. De cmdlet wordt niet uitgevoerd.

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

Invoerwaarden

ShareFileClient

ShareClient

ShareDirectoryClient

IStorageContext

Uitvoerwaarden

AzureStorageFile