Remove-ItemVersion
Removes Language/Version from a single item or a branch of items
Syntax
Detailed Description
Removes Language/Version from a an Item either sent from pipeline or defined with Path or ID. A single language or a list of languages can be defined using the Language parameter. Language parameter supports globbing so you can delete whole language groups using wildcards.
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
Aliases
The following abbreviations are aliases for this cmdlet:
Remove-ItemLanguage
Parameters
-Recurse <SwitchParameter>
Deleted language versions from the item and all of its children.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-Language <String[]>
Language(s) that should be deleted form the provided item(s). A single language or a list of languages can be defined using the parameter. Language parameter supports globbing so you can delete whole language groups using wildcards.
Aliases | |
---|---|
Required? | true |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-Version <String[]>
Version(s) that should be deleted form the provided item(s). A single version or a list of versions can be defined using the parameter. Version parameter supports globbing so you can delete whole version groups using wildcards.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-ExcludeLanguage <String[]>
Language(s) that should NOT be deleted form the provided item(s). A single language or a list of languages can be defined using the parameter. Language parameter supports globbing so you can delete whole language groups using wildcards.
If Language parameter is not is not specified but ExcludeLanguage is provided, the default value of "*" is assumed for Language parameter.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-MaxRecentVersions <Int32>
If provided - trims the selected language to value specified by this parameter.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-Item <Item>
The item/version to be processed. You can pipe a specific version of the item for it to be removed.
Aliases | |
---|---|
Required? | true |
Position? | 1 |
Default Value | |
Accept Pipeline Input? | true (ByValue, ByPropertyName) |
Accept Wildcard Characters? | false |
-Path <String>
Path to the item to be processed - can work with Language parameter to narrow the publication scope.
Aliases | |
---|---|
Required? | true |
Position? | 1 |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-Id <String>
Id of the item to be processed - can work with Language parameter to narrow the publication scope.
Aliases | |
---|---|
Required? | true |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-Database <String>
Database containing the item to be processed - can work with Language parameter to narrow the publication scope.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-Archive <SwitchParameter>
Specifying this switch will move the items to the archive rather than recycle bin.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Sitecore.Data.Items.Item
Notes
Help Author: Adam Najmanowicz, Michael West
Examples
EXAMPLE 1
Remove Polish and Spanish language from /sitecore/content/home item in the master database
EXAMPLE 2
Remove all english based languages defined in /sitecore/content/home item and all of its children in the master database
EXAMPLE 3
Remove all languages except those that are "en" based defined in /sitecore/content/home item and all of its children in the master database
EXAMPLE 4
Trim all languages to 3 latest versions for /sitecore/content/home item and all of its children in the master database
EXAMPLE 5
The following moves the specified item version to the archive.
Related Topics
Remove-Item
Last updated