Questions tagged [powershell-extensions]

Anything related to the Sitecore PowerShell Extensions (SPE) module

Filter by
Sorted by
Tagged with
0 votes
2 answers
36 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
  • 31
1 vote
3 answers
35 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
0 answers
34 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
  • 85
0 votes
1 answer
43 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
26 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
40 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
0 votes
0 answers
30 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
30 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
100 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
91 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
  • 85
0 votes
1 answer
28 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
135 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
173 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
  • 85
1 vote
2 answers
172 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
  • 85
0 votes
1 answer
55 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
69 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
42 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
160 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.9k
0 votes
1 answer
113 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
793 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
143 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
  • 85
0 votes
1 answer
196 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
  • 85
1 vote
2 answers
260 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
38 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
261 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
197 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
105 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
227 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,033
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
664 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
182 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
147 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
663 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
  • 401
1 vote
2 answers
167 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
392 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
158 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
84 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
95 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
137 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
84 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,971
0 votes
2 answers
212 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
1k 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
30 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,310
1 vote
3 answers
1k 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
  • 385
0 votes
0 answers
69 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
1 vote
1 answer
304 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
  • 75
2 votes
1 answer
596 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
135 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
3 votes
1 answer
127 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
  • 31
3 votes
1 answer
266 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
  • 147

1
2 3 4 5
10