Sitecore PowerShell Extensions
Slack
YouTube
Stack Exchange
Donate
Search…
Introduction
Disclaimer
Installation
Training
Community
Interfaces
Working with Items
Modules
Remoting
Security
Releases
Troubleshooting
Code Snippets
Appendix
Common
Add-BaseTemplate
Add-ItemVersion
Close-Window
ConvertFrom-CliXml
ConvertFrom-ItemClone
ConvertTo-CliXml
Expand-Token
Get-Archive
Get-ArchiveItem
Get-Cache
Get-Database
Get-ItemClone
Get-ItemCloneNotification
Get-ItemField
Get-ItemReference
Get-ItemReferrer
Get-ItemTemplate
Get-ItemWorkflowEvent
Get-SitecoreJob
Get-SpeModule
Get-SpeModuleFeatureRoot
Get-TaskSchedule
Get-UserAgent
Import-Function
Invoke-JavaScript
Invoke-Script
Invoke-ShellCommand
Invoke-Workflow
New-ItemClone
New-ItemWorkflowEvent
New-UsingBlock
Out-Download
Publish-Item
Read-Variable
Receive-File
Receive-ItemCloneNotification
Remove-BaseTemplate
Remove-ArchiveItem
Remove-ItemVersion
Reset-ItemField
Restart-Application
Restore-ArchiveItem
Send-File
Send-SheerMessage
Set-HostProperty
Set-ItemTemplate
Show-Alert
Show-Application
Show-Confirm
Show-FieldEditor
Show-Input
Show-ListView
Show-ModalDialog
Show-Result
Show-YesNoCancel
Start-TaskSchedule
Test-BaseTemplate
Test-Rule
Update-ItemReferrer
Update-ListView
Write-Log
Indexing
Packaging
Presentation
Provider
Security
Session
Powered By
GitBook
Remove-ArchiveItem
Removes items permanently from the specified archive.
Syntax
1
Remove-ArchiveItem
-
Archive <Archive>
[
-
ItemId <ID>
]
2
Remove-ArchiveItem
-
Archive <Archive>
[
-
Identity <AccountIdentity>
]
3
Remove-ArchiveItem
-
Archive <Archive>
[
-
ArchiveItem <ArchiveEntry
[]
>
]
Copied!
Detailed Description
The Remove-ArchiveItem command permanently removes entries from specified archive.
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
Parameters
-Archive <Archive>
Specifies the archive to use when determining which ArchiveEntry items to remove. Use Get-Archive to find the appropriate archive.
Aliases
Text
Required?
true
Position?
named
Default Value
​
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-ItemId <ID>
Specifies the ID for the original item that should be processed. This is NOT the ArchivalId.
Aliases
Text
Required?
false
Position?
named
Default Value
​
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Identity <AccountIdentity>
Specifies the user responsible for moving the item to the archive.
Aliases
Text
Required?
false
Position?
named
Default Value
​
Accept Pipeline Input?
true (ByValue)
Accept Wildcard Characters?
false
-ArchiveItem <ArchiveEntry[]>
Specific items from the archive may be deleted when using this parameter.
Aliases
Text
Required?
false
Position?
named
Default Value
​
Accept Pipeline Input?
true (ByValue)
Accept Wildcard Characters?
false
Inputs
AccountIdentity
Sitecore.Data.Archiving.ArchiveEntry
Outputs
The output type is the type of the objects that the cmdlet emits.
None.
Notes
Help Author: Adam Najmanowicz, Michael West
Examples
EXAMPLE 1
The following removes items matching the ItemId found in the specified archive.
1
$database
=
Get-Database
-
Name
"master"
2
$archiveName
=
"recyclebin"
3
$archive
=
Get-Archive
-
Database
$database
-
Name
$archiveName
4
Remove-ArchiveItem
-
Archive
$archive
-
ItemId
"{1BB32980-66B4-4ADA-9170-10A9D3336613}"
Copied!
EXAMPLE 2
The following removes items from the recycle bin by the user found in the specified archive.
1
$database
=
Get-Database
-
Name
"master"
2
$archiveName
=
"recyclebin"
3
$archive
=
Get-Archive
-
Database
$database
-
Name
$archiveName
4
Remove-ArchiveItem
-
Archive
$archive
-
Identity
"sitecore\admin"
Copied!
EXAMPLE 3
The following removes all items from the recycle bin found in the specified archive.
1
$database
=
Get-Database
-
Name
"master"
2
$archiveName
=
"recyclebin"
3
$archive
=
Get-Archive
-
Database
$database
-
Name
$archiveName
4
Get-ArchiveItem
-
Archive
$archive
|
Remove-ArchiveItem
Copied!
Related Topics
Get-ArchiveItem
Restore-ArchiveItem
Remove-Item
Remove-ItemVersion
​
https://github.com/SitecorePowerShell/Console/
​
Previous
Remove-BaseTemplate
Next
Remove-ItemVersion
Last modified
10d ago
Export as PDF
Copy link
Contents
Syntax
Detailed Description
Parameters
-Archive <Archive>
-ItemId <ID>
-Identity <AccountIdentity>
-ArchiveItem <ArchiveEntry[]>
Inputs
Outputs
Notes
Examples
EXAMPLE 1
EXAMPLE 2
EXAMPLE 3
Related Topics