Gets Sitecore items from the specified drive.
Get-Item [-Path] <String[]> [-ID <ID>] [-Language <String[]>] [-Version <String>] [<CommonParameters>]
Get-Item [-Path] <String[]> [-Query <String>] [-Language <String[]>] [-Version <String>] [-AmbiguousPaths] [<CommonParameters>]
Get-Item [-Path] <String[]> [-Uri <String>] [-Language <String[]>] [-Version <String>] [<CommonParameters>]
Get-Item [-Path] <String[]> [-Database <String>] [-Language <String[]>] [-Version <String>] [<CommonParameters>]
The Get-Item command unlocks the item.
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
The path to the item. If the Database parameter is not provided, the path should include the database. For example, "master:\content\home"
.
Aliases | |
---|---|
Required? | true |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
The unique identifier for the item.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
The Sitecore query or fast query to retrieve the item.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
The item to be processed.
Aliases | |
---|---|
Required? | true |
Position? | 1 |
Default Value | |
Accept Pipeline Input? | true (ByValue, ByPropertyName) |
Accept Wildcard Characters? | false |
Path to the item to be processed - can work with Language parameter to specify the language other than current session language.
Aliases | |
---|---|
Required? | true |
Position? | 1 |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
Id of the item to be processed.
Aliases | |
---|---|
Required? | true |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
Database containing the item to be fetched with Id parameter.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
Language(s) to use for filtering items.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
Version number to use for filtering items.
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
The input type is the type of the objects that you can pipe to the cmdlet. Should be the path to an item.
- System.String
The output type is the type of the objects that the cmdlet emits.
- Sitecore.Data.Items.Item
Help Author: Adam Najmanowicz, Michael West
The following gets the item using the path.
Get-Item -Path "master:\content\home"
The following gets all items in the master database, located under Content, which are based on the template Sample Item using a Sitecore query.
Get-Item -Path "master:" -Query "/sitecore/content//*[@@templatename='Sample Item']"
The following gets the item in the master database with the specified ID
.
Get-Item -Path "master:" -ID "{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}"
The following gets the item in the master database using the Uri.
Get-Item -Path "master:" -Uri "sitecore://master/{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}?lang=en&ver=1"
- Get-ChildItem