Skip to main content

Questions tagged [powershell-extensions]

Anything related to the Sitecore PowerShell Extensions (SPE) module

Filter by
Sorted by
Tagged with
0 votes
2 answers
171 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. $...
1 vote
1 answer
71 views

Editing SXA Searchbox rendering parameters thru powershell

I am trying to update the 'Search results signature' and Suggestion mode of SXA Search box rendering of items thru below powershell script but it is adding new parameter at the bottom instead of ...
2 votes
3 answers
76 views

How to update the checkbox field value in Sitecore Powershell Extensions?

I'm using the PowerShell script to update a specific field of the item in the content tree. It works for singleline, richtext, link fields but the update is not applied to the checkbox field. How to ...
2 votes
1 answer
377 views

Event handler PowerShell/Services/RemoteScriptCall.ashx call giving 503 error

I have a local Sitecore instance with name sc90.local and I am trying to publish files on local instance using gulp. Response error: Upload failed: styles.css Status code:503 URL: POST http://sc90....
0 votes
1 answer
86 views

How to enable data source item versions, when user click on Lock and edit options

I'm implementing the workflow setup in sitecore 10.2 version and the page has datasource items present. If the user clicks on Lock and edit options, then a new version will be created for page and ...
1 vote
2 answers
56 views

How to perform rebuild link database from outside of sitecore server on a remote desktop

There is a way to rebuild the link database in Sitecore using the Control Panel available on Content Management. We are trying to automate this process of rebuilding the link database. Now, I want to ...
2 votes
1 answer
342 views

Powershell script to update personalization rule

I want to update the personalization rule for all the pages which have one common rendering. Is it possible to identify the rendering using Powershell and update the personalization rule to the target ...
1 vote
3 answers
91 views

How to get Sitecore item fields from item using powershell?

I am trying to get all the fields on the available item. seems like the following line is not fetching all the fields. Am i missing something ? $fields = $item.Fields
3 votes
1 answer
419 views

How to remove duplicate dynamic placeholders from Final Layout using SPE?

We got duplicate dynamic placeholders assigned in Final Layout. How can I remove the duplicates from the Final Layouts in all the languages? This is how we are filtering out the placeholders ...
0 votes
1 answer
41 views

Why is SPE Remote not using the credentials provided?

I am trying to use Sitecore Remote Powershell following the guide here. No errors are immediately returned, however, looking in the SPE logs I can see the following logs: 8132 10:43:17 INFO A request ...
1 vote
3 answers
189 views

How to tell if the item language is the fallback language or the regular language version

How to tell if the item language is the fallback language or the regular language version using a PowerShell script
0 votes
2 answers
91 views

Acess Sitecore content editor ribbon item via sitecore powershell extension

How do I access Sitecore content editor's ribbon button using Sitecore PowerShell extension? I need to use this validation button for all the items created and have a look at the errors (if any). Is ...
1 vote
1 answer
124 views

SPE report fails to run in Reporting Tools; runs successfully in the ISE

I've created multiple custom reports for content managers. They all run as expected in the Sitecore Powershell ISE. When I save them in Reporting Tools and attempt to run, I get errors. The first ...
8 votes
1 answer
961 views

Sitecore Powershell SPE 5.1 "Could not validate access using the provided credentials" error

I have written the SPE powershell script in my local Sitecore 9.1.1 sandbox environment and trying to execute, it is asking session elevate privilege to enter credentials. Even though I am entering ...
3 votes
2 answers
5k views

Why is Get-ChildItem not working

I am trying to write a script to loop through child items using the Get-ChildItem cmdlet but it does not seem to be recognised. $path = "master:/sitecore/content" $x = Get-ChildItem $path Write-Host $...
1 vote
2 answers
63 views

Is there a way to look at versions tied to an item in recycle bin or archive?

Doing a lot of cleanup of versions and generating several reports. We are cleaning up versions on tons of items and I wanted to generate a report of the completed activity. I can get the item ...
1 vote
2 answers
379 views

SPE Remoting script throws null-valued expression exception

On a fresh Windows VM I installed powershell extensions module: Install-Module SPE Then I am trying to invoke a remote script on my sitecore instance: $url = "https://my-sitecore.azurewebsites.net" ...
1 vote
1 answer
177 views

Import-Item now working on other directory files

I have exported items using Export-Item command to a specific path in Data folder say, "websitepath/data/batch/userGivenName", please refer my previous question How to copy selected items to ...
1 vote
1 answer
227 views

How to copy selected items to a Data folder using powershell script?

We have a requirement for bulk workflow approval. Where we need to add items(with or without children) similar to this image, Following this article, https://www.sitecorenutsbolts.net/2015/12/14/...
0 votes
1 answer
253 views

Looking for powershell script that looks through Template files and updates them

So we have added multiple publishing DBs on our system that have an error deploying template files on deployments. I have a feeling its because the "Publishing Targets" are blank. When I ...
0 votes
2 answers
2k views

Setting a new items' DropLink field value using PowerShell

I have set a value in a General link field in a Sitecore item using PowerShell. Here is the PowerShell script. $item.Editing.BeginEdit() [Sitecore.Data.Fields.LinkField]$...
3 votes
3 answers
975 views

Archive Sitecore items using Sitecore PowerShell Extention

I need to archive Sitecore items using Sitecore PowerShell. Any commnand that can be used to achieve this.?
3 votes
4 answers
705 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 ...
1 vote
1 answer
290 views

Copying Renderings , Final renderings for multiple items using powershell fails randomnly on few items

We have set Presentation Details on template's Standard Values. I dont want these standard value renderings in my existing page, as we have correct renderings in existing pages and I want this ...
1 vote
1 answer
72 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 ...
10 votes
3 answers
3k views

Updating Workflow for all the Items in Sitecore Instance

I would like to update a workflow (any Standard Field) for all existing items. new items. What is the best way to do this? Can I use Sitecore Rocks or Sitecore Powershell Extensions? Any other ...
0 votes
1 answer
2k views

Copy data from en language version to other language version

I need to copy item field data from en language to all other available languagesin all versions. Any powershell script of achieving this.
1 vote
2 answers
211 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 ...
1 vote
1 answer
51 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 ...
0 votes
1 answer
208 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
2 votes
1 answer
741 views

Find Pages That Match Template Id and add a Value

Using Sitecore PowerShell Extension (SPE). New to SPE and I am trying to do this: If the template id matches && the item is expired && the content type of "video" is missing =...
0 votes
2 answers
150 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 ...
1 vote
2 answers
281 views

Sitecore PowerShell session issue: a script needs to be executed in the session

I am running a script and I am using loop concept to get certain data. But a session timeout error was encountered during the script execution and the script stopped running. Issue: A script needs to ...
1 vote
3 answers
366 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 ...
2 votes
3 answers
73 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 ...
3 votes
1 answer
363 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 ...
7 votes
1 answer
547 views

Good workflow for SXA PowerShell scripts

I am trying to find a good way to work with PowerShell scripts that we use for SXA such as for scaffolding. I have tried the PowerShell ISE client that was built into Sitecore but sometimes the UI was ...
0 votes
1 answer
81 views

Scheduled LinkDB rebuid | Success completion

I have used Sitecore scheduler to schedule a Powershell task. The task rebuilds the Link databases of Master and Core. As the tasks are long-running, I am running them as Async. So in the logs, we ...
1 vote
1 answer
375 views

Attempting to Export Creative Exchange through script web api

I'm attempting to follow the documentation for SXA in a CI/CD process. Configuration Details: Sitecore 9.1 (Standalone Config - My Local Dev) SXA 1.8 initial release PowerShell 5 Running on Windows ...
1 vote
2 answers
58 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 ...
3 votes
1 answer
132 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-...
0 votes
1 answer
24 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 ...
0 votes
1 answer
121 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 ...
1 vote
4 answers
220 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}"...
0 votes
2 answers
42 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 ...
1 vote
2 answers
60 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},{...
2 votes
4 answers
165 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
71 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.
2 votes
3 answers
213 views

Dynamic list of property names for SPE report

I need to run a script to extract Sitecore item data. As of now if I use the below script: Get-ChildItem -Path master:/Sitecore/content/Data -Recurse |Show-ListView -Property DisplayName, ItemPath,...
1 vote
1 answer
62 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&...

1
2 3 4 5
10