Questions tagged [powershell]

Issues relating to the PowerShell scripting language. This can include the stand-alone PowerShell scripts run from the command-line, or PowerShell DSC install automations.

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

How would i change the values of a particular attribute inside of an XML string value in sitecore

im trying to change the value of target to "" inside of an XML string value. Heres what ive got so far: New-UsingBlock (New-Object Sitecore.Data.BulkUpdateContext) { # Get Home items $root =...
user13705's user avatar
1 vote
0 answers
24 views

Getting error while deploying SCS $name item via AzDo pipeline: "Unable to find item data for $name"

We're working with Sitecore 10.2 and utilizing the Sitecore Content Serialization CLI. During the deployment of serialized items in the Dev environment using the Powershell SCS package installation (...
Ravindra Mishra'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
0 votes
0 answers
29 views

Powershell console does not load [duplicate]

The PowerShell console isn't loading. I'm using Sitecore 10.1.3 on managed cloud. How can I troubleshoot this. Thank you
sukesh's user avatar
  • 3,053
0 votes
2 answers
141 views

Installation Failed - Cannot validate argument on parameter 'FilePath' [closed]

I am trying to install Sitecore 9.2 but at the end of the process, I am getting an error: SitecoreSolr_AddSchemaUniqueKeyField [1] : SetXml Install-sitecoreConfiguration: Cannot validate argument on ...
Daniel's user avatar
  • 3
1 vote
1 answer
131 views

What permissions needed to unlock items for a non-admin [duplicate]

We have a multi-lingual multisite instance with v10.1.3 And there are authoring roles for each site & role. A common occurrence is, items are locked by a person who is unavailable and the current ...
sukesh's user avatar
  • 3,053
3 votes
2 answers
134 views

Not able to Save data in physical file while using docker through Sitecore Powershell

I'm new to PowerShell scripts and want to create items in Sitecore's Shared Data folder in a Json file and save the uploaded Json file in the App_Data directory's location. I tried using fullpath and ...
Aditya Gautam's user avatar
2 votes
2 answers
86 views

DevOps build pipeline failing on SCS serialize/package step

My DevOps builds recently started failing on the step in which we use the Sitecore CLI and SCS to build an item package. To my knowledge, nothing has changed on our end, so it is unclear why the build ...
Marcel Gruber's user avatar
0 votes
2 answers
82 views

Sitecore poweshell to find list all rendering on page in specific language [closed]

Sitecore poweshell to find list of all rendering on page in specific language and extract in Excel.
Aditya's user avatar
  • 1
1 vote
1 answer
148 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
205 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
266 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
4 votes
2 answers
272 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
216 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
0 votes
1 answer
235 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,053
0 votes
0 answers
34 views

How to check latest published item? [duplicate]

We would like to check latest published items from master database to web database within some timeframe using powershell script. Tried : Statistics tab updated and created field values. However it ...
Nisha's user avatar
  • 401
0 votes
2 answers
149 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
2 answers
168 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
407 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
162 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 votes
1 answer
185 views

Is there a way to link a Powershell script to a custom button?

I'm trying to run a PS script I made via custom buttons. The scripts must be loaded from Sitecore Script Library (/sitecore/system/Modules/PowerShell/Script Library) The script runs perfectly if I run ...
iusmar's user avatar
  • 239
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
1 answer
167 views

Sitecore Razl Script connection error

I am starting the Sitecore Razl scripting and trying to get an item by using script as mentioned in the documentation. https://hedgehogdevelopment.github.io/razl/script.html So my script goes like ...
Yeshwanth's user avatar
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
1 answer
115 views

The term 'Write-SitecoreDockerWelcome' is not recognized as the name of a cmdlet, function

We're trying to init docker on a new dev machine however we're running into issues... it appears that sitecore docker tools is not installing? The error is Installing SitecoreDockerTools... Importing ...
Sean T's user avatar
  • 240
-1 votes
2 answers
470 views

Rename items with specific name in my Sitecore content tree using PowerShell script

I want to rename items with specific name in my Sitecore content tree using PowerShell script to a new name. I tried the following but no change- Set-Location -Path master:\content\HyperLocal\Arena\ $...
Rick's user avatar
  • 11
1 vote
3 answers
246 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
146 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
  • 385
2 votes
1 answer
133 views

Where is Production.ps1 script in Sitecore docker images?

This document https://www.sitecore.com/knowledge-center/getting-started/docker-entrypoints describes two PowerShell scripts used as ETRYPOINT, named Production.ps1 and Development.ps1. They should be ...
Massimo Della Calce's user avatar
2 votes
1 answer
119 views

Run PowerShell script using Gulp?

Is there any way to run a PowerShell script in Sitecore using Gulp? We are trying to integrate some content publishing to the build process automatically. All our JS/CSS is stored in the Media Library ...
Rob Connolly's user avatar
1 vote
1 answer
66 views

PropagationType in Sitecore powershell scirpt is not working

I was trying to deny write access to Everyone role for my Sitecore Content tree nodes. There are many nodes and lot of items have write access for Everyone user , which we want to restrict now. I ...
Kapil Naker's user avatar
1 vote
2 answers
76 views

Get Teaser component SXA style in Powershell script

I would like to get selected SXA style of the Teaser component in Powershell script. I have a teaser component where i have selected SXA style on Experience editor . I would like to get selected SXA ...
Nisha's user avatar
  • 401
1 vote
2 answers
286 views

Getting the datasource Location of all Renderings inside the page using SPE

I'm creating a script that would list down all the components in the a particular page then displays the RenderingItemName, RenderingItemID, RenderingItemPath, RenderingDatasource, etc., The script ...
Crown's user avatar
  • 11
1 vote
1 answer
234 views

Can't download any results from Show-ListView

I've written a script to generate a report that allows downloading a list of pages and relevant tags applied to them (within a section). In that script, I wrote the below code to download the output. ...
Kavindu Lakshan's user avatar
1 vote
1 answer
554 views

Docker service 'cm' failed to build

I am setting up the Sitecore project with docker and getting the following error : Service 'cm' failed to build: Build failed While running the docker-compose build in the Powershell script. The ...
MEENU CHAUHAN's user avatar
0 votes
1 answer
205 views

Installation Error : Sitecore 9.1.0

I am installing Install Sitecore 9.1.0 using PowerShell script and getting the following error: Unable to connect to target server. Please verify the connection information such as the server name, ...
MEENU CHAUHAN's user avatar
1 vote
1 answer
203 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 ...
Visva Kiruthika Muthuraj's user avatar
0 votes
0 answers
34 views

How do we update layout details in template's standard values without affecting existing pages?

I have a situation where I need to set correct controls in layout- presentation details for my template standard values, without affecting the existing pages which uses the template. We have manually ...
Visva Kiruthika Muthuraj's user avatar
1 vote
1 answer
334 views

Sitecore PowerShell Remoting: how to

Environment details: Sitecore 10 Azure PAAS hosting I am trying to automate a few things in an already running Sitecore set-up. For that, I wanted to utilize Sitecore Powershell remoting. I have gone ...
NutsAndBolts's user avatar
  • 1,310
0 votes
2 answers
1k views

How can I count all existing versions of an item in Sitecore Powershell Extensions?

When I go to the content editor I can see that the Home item has 81 versions, but when I'm counting its versions in Sitecore Powershell Extensions I'm getting 79 versions as a result. What am I doing ...
André Andrade's user avatar
0 votes
2 answers
201 views

How to take list of http:// or https:// link referenced in our Sitecore content tree using Sitecore Powershell?

I would like to take a list of external links (http:// or https://) referenced in our website from our Sitecore content tree. I need to compare with all Sitecore Fields(Rich text, general link, single ...
Astle's user avatar
  • 385
0 votes
2 answers
349 views

How to add new version before updating the field values using Sitecore Powershell?

I have to update field values to a particular item. Instead of changing the item's final version, I would like to create a new version and do my updates. For ex: if en(v2) is the latest, I need to ...
Astle's user avatar
  • 385
1 vote
2 answers
552 views

How to update the anchor link text in rich text field using Sitecore Powershell?

I would like to update the anchor link text, if the anchor link Href match with particular domain/url. Do we have any sitecore powershell script to update the same?
Astle's user avatar
  • 385
1 vote
1 answer
378 views

How to use Where-object in Show-ListView Expression

I have a list(list 1- $itemModes) which contains following fields, class Mode { [string]$WorkflowName [string]$WorkflowId [string]$ItemId [string]$ItemName [string]$InstallMode ...
Visva Kiruthika Muthuraj's user avatar
0 votes
1 answer
409 views

How to loop selected pages in PowerShell model Treelist

I am using Sitecore Powershell Module, to select list of pages that can be later on translated and created new item. I am using this block of code @{ Name = "listOfPages" ...
eratosten123's user avatar
2 votes
2 answers
181 views

Moving Item from a Bucket into another Bucket doesn't keep the item into Bucket structure

I have a requirement where I need to get items from a Bucket and move them into another Bucket. When I manually move the item using MoveTo from the menu, it works fine and shows a perfect tree ...
Sumit Bhatia's user avatar
  • 4,686
2 votes
1 answer
81 views

PowerShell Remoting not working with an Azure VM

I'm trying to connect to a VM hosted in Azure and for some reason the remoting connection never established like you would typically see while on a corporate network. Things I've checked: Enabled PS ...
Michael West's user avatar
0 votes
0 answers
16 views

Getting New-Item : AddFromTemplate - Add access required when trying to add new workflows [duplicate]

I have written a SPE which would create a workflow on button click. This is working fine with admin account. If content author is trying to create a workflow then its giving following error, and the ...
Visva Kiruthika Muthuraj's user avatar
1 vote
1 answer
133 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 ...
Visva Kiruthika Muthuraj's user avatar
1 vote
1 answer
196 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/...
Visva Kiruthika Muthuraj's user avatar