Questions tagged [powershell-extensions]

Anything related to the Sitecore PowerShell Extensions (SPE) module

Filter by
Sorted by
Tagged with
0 votes
0 answers
36 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
29 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
48 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
29 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
94 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,089
0 votes
2 answers
44 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
41 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
44 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
  • 71
1 vote
1 answer
48 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
4 votes
1 answer
328 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.1k
0 votes
2 answers
85 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
  • 71
1 vote
3 answers
61 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
93 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
  • 117
0 votes
1 answer
66 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
29 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
108 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
79 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
39 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
141 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
266 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
  • 117
0 votes
1 answer
29 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
208 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
296 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
  • 117
1 vote
2 answers
250 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
  • 117
0 votes
1 answer
71 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
87 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
52 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
177 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.1k
0 votes
1 answer
155 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
209 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
  • 117
0 votes
1 answer
285 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
  • 117
1 vote
2 answers
335 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
356 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
334 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
154 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
342 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
  • 3,089
1 vote
0 answers
45 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
875 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
283 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
1 vote
2 answers
176 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
857 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
  • 411
1 vote
2 answers
171 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
519 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
207 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
109 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
110 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
1 answer
118 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
  • 2,001
0 votes
2 answers
269 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
2 3 4 5
10