Get-Item
Gets Sitecore items from the specified drive.
Syntax
Detailed Description
The Get-Item command unlocks the item.
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
Parameters
-Path <String>
The path to the item. If the Database parameter is not provided, the path should include the database. For example, "master:\content\home"
.
Required?
true
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-ID <ID>
The unique identifier for the item.
Required?
false
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Query <String>
The Sitecore query or fast query to retrieve the item.
Required?
false
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Item <Item>
The item to be processed.
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 specify the language other than current session language.
Required?
true
Position?
1
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Id <String>
Id of the item to be processed.
Required?
true
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Database <String>
Database containing the item to be fetched with Id parameter.
Required?
false
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Language <Language[]>
Language(s) to use for filtering items.
Required?
false
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Version <String>
Version number to use for filtering items.
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. Should be the path to an item.
System.String
Outputs
The output type is the type of the objects that the cmdlet emits.
Sitecore.Data.Items.Item
Notes
Help Author: Adam Najmanowicz, Michael West
Examples
EXAMPLE 1
The following gets the item using the path.
EXAMPLE 2
The following gets all items in the master database, located under Content, which are based on the template Sample Item using a Sitecore query.
EXAMPLE 3
The following gets the item in the master database with the specified ID
.
EXAMPLE 4
The following gets the item in the master database using the Uri.
Related Topics
Get-ChildItem
Last updated