Sitecore Powershell Example

Running Sitecore query in Sitecore PS

Get-Item -Path master:// -Query “/sitecore/content/Home/Site_Name/Local Content/Dataitems/Blogs//*[@@Name = ‘Whats New For Summer’]”

Traversing within a path –

$everythingPath = Get-Item master: -Query “/sitecore/content/Home//*”

$everythingPath | ForEach-Object {

Write-Host “Item name: ” + $_.Name

How to remove all users from a specific Domain in Sitecore

Get-User -Filter Domain_Name\* | ? { $_.LocalName -ne 'Anonymous' } | Remove-User

This will remove all the user except Anonymous.

8360cookie-checkSitecore Powershell Example

Add a Comment

Your email address will not be published. Required fields are marked *