Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [powershell-extensions]

Anything related to the Sitecore PowerShell Extensions (SPE) module

Filter by
Sorted by
Tagged with
1 vote
1 answer
40 views

How to open up specific PowerShell script in PowerShell ISE via URL

I want to be able to share links that automatically open a script in the PowerShell ISE. For now, my workaround is to share a link directly to the saved script item in the Content Editor using the fo ...
Marcel Gruber's user avatar
1 vote
2 answers
45 views

SPE 6.4 Getting the Context Item

I'm working on a SPE script to execute when a workflow state is hit. I've been trying to get the context item in the script, using the command Get-Item . (as I understand it, this should get the ...
Tim's user avatar
  • 33
3 votes
1 answer
124 views

Can I get a list of items stored in items-as-resources using SPE?

I'm defining serialization, and I'd like a report of items loaded by Sitecore so I can make sure I'm avoiding those paths. Is it possible to get a CSV listing of all items in the stock items-as-...
Dan Solovay's user avatar
  • 2,101
0 votes
1 answer
21 views

Invoke Sitecore service provider from SPE console

Is it possible to interact with Sitecore's DI container from the SPE command line? I was able to do this: PS master:\>[Sitecore.DependencyInjection.ServiceLocator]::IsConfigured True But when I ...
Dan Solovay's user avatar
  • 2,101
1 vote
2 answers
48 views

Download media content using powershell [closed]

I have a csv file where in path C:\Usman\meetings_export.csv and has a column called media-ID. This column has media ids which are comma separated, for example: {5625AF3F-F69C-420A-AFE3-B19060F42A43},{...
Raunak Basnet's user avatar
2 votes
4 answers
59 views

How to return specific HTTP response code from script that called via Powershell Web API

There is some Power Shell script that returns content. and it is called using the Powershell Web API: Invoke-WebRequest -Headers $headers -Uri $CMHostname/-/script/v2/master/Get-TestContent?type=...
0 votes
2 answers
40 views

In Sitecore powershell how we can check that an item is publishable or not where by traversing all its parent

In our project we are creating static sitemap and need to exclude not publishable item from master sitemap. We need a way to find this detail at item level or do we need custom code to do that.
Rinku Jain's user avatar
2 votes
3 answers
65 views

Find items who content have 404 links

I'm running a script in which I'm trying to get the item whose content has broken links, (links that redirect the user to a page with 404 as response). But I always get the same result, no broken ...
Sergio Parissi Reyes's user avatar
0 votes
5 answers
110 views

Sitecore PowerShell script to convert Sitecore Date field data to other format

I am having Sitecore's Date field data coming as 20230804T000000Z, I also have time coming as 11 am. The Date is coming from Sitecore date field, and time from Single-Line Text field as below. I need ...
Raunak Basnet's user avatar
0 votes
3 answers
102 views

Powershell script to download media library content to my machine

I have Sitecore 8.2 where I got spe version 6.4 I have got a csv file, where sample of data i.e. one row looks as "Item ID","Title","Created","Changed","...
Raunak Basnet's user avatar
0 votes
2 answers
37 views

Using Find-Item to get equivalent result of Get-Item

I have got $eventsPath = "/sitecore/content/Global Content/Events" $templateId = "{EBE88C21-4035-4266-9647-B4C88F1BC000}" # Function to get data and print on the screen function ...
Raunak Basnet's user avatar
1 vote
4 answers
94 views

How to get all items and its field and value pair, based on specific template and the path of folder where its contained, using sitecore powershell

Question from .Sitecore PowerShell stater. I am using following script $eventsPath = "/sitecore/content/Global Content/Events" $templateId = "{EBE88C21-4035-4266-9647-B4C88F1BC000}"...
Raunak Basnet's user avatar
0 votes
1 answer
30 views

Which Sitecore PowerShell extension version to download in Sitecore version 8.2?

I am a absolute beginner for SPE, have Sitecore 8.2, how do I download SPE in this and according to https://doc.sitecorepowershell.com/appendix it says that 8.2 supports SPE version 4.1 and above. ...
Raunak Basnet's user avatar
1 vote
1 answer
57 views

Can't edit field directly in some cases using Sitecore PowerShell Extensions

I am trying to edit an item of template type /sitecore/templates/System/Forms/Fields/Input. This item has a field named Default Value. Why does this work: $DefaultValueFieldName = "Default Value&...
Marcel Gruber's user avatar
0 votes
1 answer
40 views

How to open a newly created item in Content Editor via SPE script via the Insert Item integration?

A item is created as part of a SPE script via the Insert Item integration, very similar to the current workflow in Sitecore -- the new item is added as a child of the item we inserted a new item on, ...
Marcel Gruber's user avatar
0 votes
1 answer
65 views

PowerShell commands not running in ISE

I am trying to run a simple command on my CM 10.2 instance running on an App Service: Write-Host "test" However, the script never seems to run, even if I set a breakpoint and debug. This ...
Marcel Gruber's user avatar
0 votes
0 answers
44 views

Sitecore PowerShell Extensions 6.4 fails to load due to XmlException Root element is missing

We are preparing to upgrade from Sitecore 9.3 PAAS. So, we are customizing Sitecore 10.3 PAAS. Our 10.3 Dev resource group is complete and works fine; but for some reason, the 10.3 QA resource group ...
Daniel R's user avatar
1 vote
1 answer
99 views

Unable to use SPE with Azure AD login

When I login into the Sitecore CMS using Azure AD, and open SPE, It prompts for the password. I tried entering the Azure AD password but it is not accepted. I have also enabled this \App_Config\...
sukesh's user avatar
  • 3,152
0 votes
2 answers
52 views

SXA Component creation: "Access to the path is denied error" [closed]

There is a local Sitecore 10.3 Docker setup with SXA and SPE (6.4). Component creation fails with access denied powershell error trying to create the view .cshtml file: New-Item : Access to the path '...
Serhii Shushliapin's user avatar
1 vote
0 answers
49 views

SPE is not working [closed]

When I run PowerShell, I am getting below error. What could be the reason? Please assist. SItecore 9.2 and SPE 5.0
Rashmi Ranjan's user avatar
1 vote
1 answer
49 views

Adding New Custom Insert Options

Is there anyways that I can create a custom insert options like this for JSS Site (Properties Sites)? We want to integrate some Powershell script along the creation process such as display the form ...
rayray's user avatar
  • 81
1 vote
1 answer
61 views

Find all the items and fields that have dropdown value not in selection list

I have duplicated the site to create new site. I am seeing on new site some values in drop down are coming from existing site. I want to find list of items and fields for which value are coming from ...
aman's user avatar
  • 11
5 votes
1 answer
346 views

How do you create a report of reports?

In SPE I need to create a report where each record has a link. When the link is clicked additional parameters are provided to the second report. How would I go about creating such a report?
Michael West's user avatar
  • 18.2k
0 votes
2 answers
118 views

Setup Scheduled Job and custom ribbon in XM Cloud to perform sync action

our team has recently acquired Sitecore XM Cloud, and I am completely new to the Sitecore. We need to implement a feature where a button in the Content Editor allows marketers or developers to ...
rayray's user avatar
  • 81
1 vote
3 answers
84 views

How to publish an item to multiple targets at a time, by using powershell script

I am working with Sitecore 10 and using powershell 6.2 version when trying to publish an item to multiple targets at a time, getting an error while using this SPE code: Publish-Item -Item $item -...
Farheen Fathima's user avatar
0 votes
1 answer
144 views

Get List of all template fields

I have to generate a list of all fields in a template with 3 columns, FieldName, Section of that field, and the name of the template that field is inherited from using Sitecore PowerShell
Vinesh's user avatar
  • 151
0 votes
1 answer
93 views

Iterating through a linklist in sitecore via a powershell script

ive currently got a powershell script in sitecore which goes through the Home directory and changes the target value for all general links to "Active browser" What i would now like to do is ...
user13705's user avatar
1 vote
1 answer
31 views

How to find unlinked fields on a clone?

I am writing a Sitecore PowerShell Extensions script to determine which fields on a cloned item are unlinked from its original item. The easiest check is to compare the field value of the original and ...
Marcel Gruber's user avatar
0 votes
1 answer
198 views

Remove Items Broken Links due to the item being unkown

Is it possible to removed broken links using sitecore powershell. I checked the items link in the Navigation > Links and some of them has "Not found: master {GUID}". Here is the sample ...
Elaidein's user avatar
1 vote
0 answers
100 views

Is there a way to install modules from PSGallery?

I have tried installing a script from PSGallery using multiple "tricks" to get around the Windows Security (that prevents accessing the default PS folder), as by default, it results in: ...
Eric Townsend's user avatar
1 vote
0 answers
41 views

Null exception been thrown when interacting with generated PowerShell report executed from context menu sitecore spe

When the report is generated by the PowerShell script that is executed from the context menu within content-editor, it typically provides interaction features like sorting, export choices, and item ...
Olivia's user avatar
  • 11
1 vote
3 answers
184 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
431 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
  • 151
0 votes
1 answer
31 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
272 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
1 vote
2 answers
405 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
  • 151
1 vote
2 answers
336 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
  • 151
0 votes
1 answer
83 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
4 votes
1 answer
93 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
  • 457
0 votes
0 answers
64 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
188 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
  • 18.2k
0 votes
1 answer
212 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
1k 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
264 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
  • 151
0 votes
1 answer
353 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
  • 151
1 vote
2 answers
399 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
39 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
4 votes
2 answers
442 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
436 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
222 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

1
2 3 4 5
10