Questions tagged [powershell-extensions]

Anything related to the Sitecore PowerShell Extensions (SPE) module

Filter by
Sorted by
Tagged with
1 vote
3 answers
66 views

How can I check all internal link target values from the entire content tree using Sitecore PowerShell?

Im writing a powershell script which at the moment is checking an item ID, and if it contains an internal link that is set to anything other then "Active Browser" it will change the Target ...
user13705's user avatar
0 votes
2 answers
51 views

Get value of field with same name using Sitecore powershell

There are two fields with the same name Title in a Sitecore item, Is there a way to get the values of both fields using Sitecore PowerShell?
Vinesh's user avatar
  • 75
0 votes
1 answer
26 views

How to merge two roles into one, and delete the two old ones?

We have an old Sitecore installation, and I need to clean up and consolidate our own created roles. We have partial overlapping roles and too many to make them useful. I prefer to do it with spe or C# ...
Kurt Bilde's user avatar
1 vote
1 answer
73 views

How to download media item to SitecoreTempFolder?

I'm wanting to clean-up the media library, I have a script that outputs unused media library IDs. I then want to grab the media item associated with these IDs and download them to a temporary folder (...
Rick's user avatar
  • 13
0 votes
2 answers
91 views

Rebuild SOLR index of an item using sitecore powershell

I am trying to rebuild the SOLR indexes of a particular Sitecore item using Sitecore Powershell. I have a list of Sitecore items and I want to rebuild indexes for all items in the list. is there any ...
Vinesh's user avatar
  • 75
1 vote
2 answers
111 views

Get Only one language version per item by using Find-Item

I am using a PowerShell script given below $indexName = "sitecore_web_index" $criteria = @( @{Filter = "Contains"; Field = "industry_sm"; Value = ...
Vinesh's user avatar
  • 75
0 votes
1 answer
49 views

Find-Item and the _Source field

Trying use Find-Item to get all items where _Source has a value set. Normally the _Source is null, so I thought that this would be sufficient - check for $null with -Invert set: $FilterCriteria = @( ...
Kurt Bilde's user avatar
3 votes
1 answer
63 views

How to switch to another item from context item using SPE?

I have an SPE script which content team runs from the script context menu. The script deletes the current context item. Once the item is deleted, and I close the script pop-up. I get another pop-up ...
Shaurya's user avatar
  • 437
0 votes
0 answers
35 views

Scheduled task ran without Schedule

Scheduled task ran without Schedule when PowerShell module is being used. Any fix is available to avoid such triggers? Steps to Reproduce Create a dummy PowerShell script just to print a line under /...
Himanshu's user avatar
5 votes
1 answer
148 views

How do you add a custom context menu to run an SPE script not in the scripts section?

I would like to have a custom context menu like the following: Since this menu item does not follow the typical integration points for SPE, how would I go about making it work with a script?
Michael West's user avatar
  • 17.8k
0 votes
1 answer
87 views

Get Datasource Item from Rendering with Powershell [duplicate]

I am looking for powershell script to get datasource item of a rendering. Right now I am getting path of datasource item. But since I am using SXA, I expect few paths like, local:/Data/Hero Banner ...
Vikrant Punwatkar's user avatar
3 votes
3 answers
525 views

OKClick method through reflection is not allowed error with SPE

We are upgrading our Sitecore version from 8.2 to 10.2. At the moment we are having an issue with Sitecore PowerShell Extension (version 6.4) with the below snippet $uploadDirectory = Join-Path -Path $...
Yos's user avatar
  • 33
1 vote
1 answer
86 views

Exclude a column from Show-ListView in sitecore powershell

I have a list of object $Results which contains different columns every time we run the script according to user input but one column is fixed every time called ItemID I am trying to display all ...
Vinesh's user avatar
  • 75
0 votes
1 answer
131 views

Get all results using Find-Item in sitecore powershell

I am using Sitecore PowerShell Extension with the below script $indexName = "sitecore_web_index" $criteria = @( @{Filter = "Contains"; Field = "industry_sm&...
Vinesh's user avatar
  • 75
1 vote
2 answers
194 views

Not able to login into sitecore with invoke-restmethod

I need to fetch the data of item with API - https://doc.sitecore.com/xp/en/developers/90/sitecore-experience-manager/the-restful-api-for-the-itemservice.html I am trying this with PowerShell and tried ...
Jagmeet Kaur's user avatar
1 vote
2 answers
36 views

Error During SPE 6.2 Installation due to Wrong Path, How to Change the Path?

I am trying to install Sitecore Powershell Extension (SPE) 6.2 on my local development environment on Sitecore XP 9.2. As per the official Compatibility table from below link, SPE 6.2 is compatible ...
Pratik Wasnik's user avatar
3 votes
2 answers
178 views

PowerShell script to delete the orphaned (Child) components inside a deleted parent component

We have a problem with orphaned rendering in pages. Content editors are directly removing the parent Components instead of deleting both parent and child rendering in the Experience Editor. This ends ...
Sudheer Suggu's user avatar
2 votes
2 answers
113 views

Powershell - Remove recycle bin items older than 1 year

Running version Sitecore 9.3 - and the latest version of the Powershell package The Powershell documentation has an example of deleting an individual item. $database = Get-Database -Name "master&...
eKoz's user avatar
  • 45
1 vote
3 answers
93 views

How to filter items that have at least one child with an specific template using Sitecore query

It's easier to explain what I'm trying to do with an image, so let's go! I need a query to get all parent items that have at least one Promotion Content as a child. The same for the contrary, I need ...
André Andrade's user avatar
0 votes
1 answer
140 views

How to use PowerShell console in 10.3 [duplicate]

Using Sitecore 10.3 This is a local instance. I have opened the PowerShell console and it shows up like this. The yellow notification bar doesn't go. How do I get to the command prompt? Clicking on ...
sukesh's user avatar
  • 2,981
1 vote
0 answers
24 views

Error installing Sitecore PowerShell: "An entry with the same key already exists"

I am trying to install Sitecore PowerShell 6.4 version in our sitecore 9.0.2 from the GitHub repository (https://github.com/SitecorePowerShell/Console/discussions/categories/general), but I am ...
Biswajit Nayak's user avatar
1 vote
2 answers
507 views

How to update the link field properties in Sitecore Powershell Extensions?

I want to write a script to bulk update the link field title and text for all the components of a particular type to Read more but I struggle with figuring out how to update these properties. Here is ...
RobB's user avatar
  • 13
1 vote
2 answers
110 views

What is the correct syntax to update the value of a Tree-list field type on an item in Sitecore using Powershell?

I have a Treelist field type on an item which I am trying to update using a Powershell script which is reading data from a CSV file. I am using the following snippet in my script: #Create an array of ...
Rob Connolly's user avatar
0 votes
2 answers
115 views

How can I get all sitecore download event tracking list of item which is not clicked yet (like zero visit items)

I am using Sitecore 10.2 having Sitecore Analytics enabled. Download events tracking analytics is enabled for all media items like(.pdf, .docs, .xls). How to get all media items which have not been ...
md shahbaj's user avatar
1 vote
1 answer
498 views

How to check custom database exist or not in Powershell script

We have created a custom database Preview in Sitecore Sxa. We need to check this database is exist or not through Sitecore Powershell script. Could someone let me know how we can check database exist ...
Nisha's user avatar
  • 391
1 vote
2 answers
148 views

Hyperlink image in PowerShell [closed]

Is it possible to have an image in Sitecore PowerShell Extensions GUI that has an embedded hyperlink to open a web page? For instance, if I had an image of a car in a PowerShell GUI form and when a ...
Todd's user avatar
  • 11
2 votes
4 answers
269 views

Set value for a Sitecore Name Value Field using PowerShell

I have a Name Value List field in Sitecore called "PageSchema". I need to add another name, and value to this PageSchema field using PowerShell. How can I do it from PowerShell? What I want ...
Renuka's user avatar
  • 185
3 votes
2 answers
103 views

How to set Analytics Tracking Event as download using Sitecore Powershell script

I'm trying to set Analytics Tracking Event as Download using Sitecore PowerShell script for most media items which have pdf extension. like this: Below is the script, I have written but not working $...
md shahbaj's user avatar
1 vote
0 answers
71 views

How to inspect vars / persist value tooltip window in PowerShell ISE?

After running a script in Sitecore PowerShell Extensions version 6.4.0.16859, I can hover over a variable to inspect its contents. However, it contains values that overflow out of my screen. I would ...
Marcel Gruber's user avatar
0 votes
0 answers
84 views

does publish-item powershell command fire publish end event and can we get property like rootItem

$singleitem=get-childItem -path $RootItemPath -Language "en" -Recurse | Where {$_.TemplateName -eq "TEST"} | Select-Object -first 1 publish-item -Item $singleitem -publishmode ...
ajay shanbhag's user avatar
0 votes
0 answers
119 views

403 IP Forbidden error when running a Sitecore Powershell Extensions remoting script in Azure Pipelines

I am trying to install a Sitecore package through Azure Pipeline using Sitecore PowerShell Remoting. The reference article that I followed. https://jakubwajs.wordpress.com/2020/09/22/running-sitecore-...
Arif's user avatar
  • 1
0 votes
1 answer
62 views

Downloading a list of fields in SPE producing a separate file for each field

Goal: Download a CSV containing the fields on an item using SPE, including columns for name and type. Issue: When I try the code below, I get a separate file for each field, rather than a single CSV. $...
Dan Solovay's user avatar
  • 1,962
0 votes
2 answers
169 views

Export all Redirect Maps

Is there a way to export all redirect maps via a PowerShell script or a simple GUI in Sitecore that I am missing? I want a list of them all - don't care about the formatting as long as I can make ...
RooksStrife's user avatar
1 vote
1 answer
832 views

PowerShell special characters encoding

I've built a PS script to create and populate items from a CSV file. The issue is that chars like ä, ü, ö are replaced with � in the field values. I've changed the encoding from ConvertToDynamicObject(...
iusmar's user avatar
  • 239
0 votes
0 answers
29 views

Issue while downloading multiple files with Send-File command

Sitecore PowerShell Extensions 6.2.0.29687 Sitecore 10.1 Windows PowerShell 5.1 What I am trying to do: I have filtered out a few files based on certain conditions. So, I have filtered out the files ...
NutsAndBolts's user avatar
  • 1,300
1 vote
3 answers
915 views

Powershell script to get the list of items created/modified on particular day

We would like to pass the particular day and get the list of items changed on that day. Do we have any PowerShell script for that?
Astle's user avatar
  • 383
0 votes
0 answers
59 views

Invoke-RemoteScript : Server response: The specified script is invalid. SPE

while running below script I'm getting error saying in valid script, not sure what the issue is. Script: Clear-Host Import-Module -Name SPE -Force $session = New-ScriptSession -Username admin -...
Sitecore Dev's user avatar
0 votes
1 answer
214 views

How to execute sitecore command through powershell script

I have a requirement that I have a button on the Ribbon like "Generate". If the Content author clicks on this Generate button, through Sitecore Command we are making some API calls, and ...
Bharath's user avatar
  • 65
2 votes
1 answer
526 views

How do you get JSON data from an item stored in the media library?

master:\media library\item-name contains a JSON file. Get-Item gets the item itself but I am unable to extract the JSON content with ConvertFrom-Json. In PowerShell outside of Sitecore Powershell ...
Anthony's user avatar
  • 167
0 votes
0 answers
122 views

Error while creating SXA Site in Sitecore SXA

I have installed vanilla Sitecore instance 9.1 Initial release. After that installed Sitecore Powershell 5.0 was followed by SXA 1.9. I'm trying to create a tenant or site to set up a local site ...
Ramesh Kumar's user avatar
2 votes
1 answer
106 views

Sitecore PowerShell script issue when added script to reporting tool

I have an issue with my Sitecore PowerShell script. It runs without errors and returns the expected result when I test it in PowerShell ISE. But when I add exactly the same script to PSE reports and ...
alekh's user avatar
  • 21
0 votes
0 answers
46 views

Powershell Workflow Action Not Executing from Desktop

If I start in Launchpad and open Content Editor, and from there edit a page in Experience Editor, then I can promote the page through workflow and all actions execute fine. If I start in Desktop and ...
David Tristano's user avatar
2 votes
1 answer
242 views

How to Find the unique rendering ID for a placeholder

We are currently upgrading a site from 8X to 10.2. We are trying to change the dynamic placeholders as per 10.2. But 8.2 dynamic placeholders are of format- /a/b_1/c_1, /a/b_1/c_2, /a/b_2/c_3. We ...
Sylesh JL's user avatar
  • 127
3 votes
1 answer
145 views

Moving images to another folder Powershell

I am trying to move images from one folder to another. The images folder contains like 1000 images. i want to move the first 100 images to one folder the other 100 images to another folder and the ...
Mr Sumo's user avatar
  • 113
1 vote
3 answers
210 views

Unable to read Rendering Parameters template fields using powershell

There is a page template called X being used to create a number of pages. There are two renderings A and B being used on many pages that created from X page template. Now I want to set the one ...
Visva Kiruthika Muthuraj's user avatar
1 vote
1 answer
132 views

How to take item package of particular time period using Sitecore Powershell?

We are working on Sitecore Upgrade and would like to merge the item changes for the particular period. If we try to use item dynamic package, it is taking longer time and timed out somewhere. Is there ...
Astle's user avatar
  • 383
2 votes
2 answers
85 views

How to fetch items that have not completed workflow, using powershell script

Using sitecore 10.0.1 Currently, I want to move items under a path, to "Approve" workflow. So how to fetch items that are not in approved state and change them to "Approved" ...
coder's user avatar
  • 25
3 votes
3 answers
325 views

PowerShell Elevate Session State on XM Cloud

How can I perform an Elevate Session State in Sitecore PowerShell ISE on XM Cloud running in local container? On the Elevate Session State, I need to "Enter your credentials to validate access to ...
Jan Bluemink's user avatar
  • 1,165
1 vote
1 answer
75 views

Read-Variable inside listview?

I have a listview of various items and I would want there to be a dropdown box in the listview that lets the user change one of the items results. Is this possible? I am trying to set a property that ...
D L's user avatar
  • 13
0 votes
2 answers
271 views

How to read Item's media field properties using SPE

I have an item where we have a "Article Thumbnail" field(Media type) and an image is inserted from Media Library. Now I need to check for Alt text in Item's media properties. I am trying ...
Yeshwanth's user avatar

1
2 3 4 5
9