Skip to content

Latest commit

 

History

History
137 lines (102 loc) · 2.85 KB

Remove-KshAttachmentFile.md

File metadata and controls

137 lines (102 loc) · 2.85 KB
external help file Module Name online version schema
SPClientCore.dll-Help.xml
SPClientCore
2.0.0

Remove-KshAttachmentFile

SYNOPSIS

Removes an attachment file.

SYNTAX

ParamSet1

Remove-KshAttachmentFile [-Identity] <AttachmentFile> [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
 [<CommonParameters>]

ParamSet2

Remove-KshAttachmentFile [-Identity] <AttachmentFile> [-RecycleBin] [-ProgressAction <ActionPreference>]
 [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

The Remove-KshAttachmentFile cmdlet removes an attachment file from the list item.

EXAMPLES

Example 1

PS C:\> Remove-KshAttachmentFile -Identity (Get-KshAttachmentFile -ListItem (Get-KshListItem -List (Get-KshList -ListTitle 'Announcements') -ItemId 1) -FileName 'README.txt')

Removes an attachment file.

Example 2

PS C:\> Remove-KshAttachmentFile -Identity (Get-KshAttachmentFile -ListItem (Get-KshListItem -List (Get-KshList -ListTitle 'Announcements') -ItemId 1) -FileName 'README.txt') -RecycleBin

Moves an attachment file to the recycle bin.

PARAMETERS

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

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

-Identity

Specifies the attachment file.

Type: AttachmentFile
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RecycleBin

If specified, moves the item to the recycle bin.

Type: SwitchParameter
Parameter Sets: ParamSet2
Aliases:

Required: True
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
Parameter Sets: (All)
Aliases: wi

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

-ProgressAction

Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider.

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

Karamem0.SharePoint.PowerShell.Models.V1.AttachmentFile

OUTPUTS

None

NOTES

RELATED LINKS