external help file | Module Name | online version | schema |
---|---|---|---|
SPClientCore.dll-Help.xml |
SPClientCore |
2.0.0 |
Copies a file.
Copy-KshFile [-Identity] <File> [-NewUrl] <Uri> [-Overwrite] [-KeepBoth] [-ResetAuthorAndCreatedOnCopy]
[-RetainEditorAndModifiedOnMove] [-ShouldBypassSharedLocks] [<CommonParameters>]
Copy-KshFile [-Identity] <File> [-NewUrl] <Uri> [-Overwrite] [-Legacy] [-PassThru] [<CommonParameters>]
The Copy-KshFile cmdlet creates a copy from the file.
PS C:\> Copy-KshFile -Identity (Get-KshFile -FolderUrl '/sites/japan/hr/Shared%20Documents/README.txt') -NewUrl 'https://example.sharepoint.com/Shared%20Documents/README.txt'
Copies a file.
PS C:\> Copy-KshFile -Identity (Get-KshFile -FolderUrl '/sites/japan/hr/Shared%20Documents/README.txt') -NewUrl '/sites/japan/hr/Shared%20Documents/README_old.txt' -Legacy
Copies a file. (Use legacy API)
Specifies the file.
Type: File
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
If specified, both file should be kept if a file already exists at the specified destination.
Type: SwitchParameter
Parameter Sets: ParamSet1
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
If specified, uses legacy API.
Type: SwitchParameter
Parameter Sets: ParamSet2
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the URL.
Type: Uri
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
If specified, overwrites the existing file.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
If specified, returns the updated object.
Type: SwitchParameter
Parameter Sets: ParamSet2
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
If specified, resets author and created datetime on the copied file.
Type: SwitchParameter
Parameter Sets: ParamSet1
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
If specified, retains editor and modified datetime on the moved file.
Type: SwitchParameter
Parameter Sets: ParamSet1
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
If specified, the shared locks on the source file should be by passed.
Type: SwitchParameter
Parameter Sets: ParamSet1
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.