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
2 answers
42 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 ...
  • 327
0 votes
0 answers
13 views

Sitecore + Powershell (SPE) Migrate content data between two sites with different structures [closed]

I've been working on a migration of data between two separate sites being held in Sitecore. The Original site has an existing structure and a variety of particular pages and resources that I want to ...
1 vote
2 answers
31 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 ...
  • 11
1 vote
1 answer
36 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. ...
0 votes
1 answer
57 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 ...
0 votes
1 answer
64 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, ...
1 vote
1 answer
41 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 ...
0 votes
0 answers
30 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 ...
1 vote
1 answer
52 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 ...
  • 1,168
0 votes
0 answers
16 views

Powershell to read WFFM droplist

I am using Sitecore 8.2 and trying to read the WFFM droplist field items and selected values using powershell. The droplist field has Localized Parameter where the items and selected values are stored....
0 votes
2 answers
78 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 ...
0 votes
2 answers
82 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 ...
  • 153
0 votes
2 answers
101 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 ...
  • 153
1 vote
2 answers
133 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?
  • 153
1 vote
1 answer
75 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 ...
0 votes
1 answer
55 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" ...
2 votes
2 answers
68 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 ...
  • 2,328
2 votes
1 answer
28 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 ...
  • 16.9k
0 votes
0 answers
15 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 ...
0 votes
0 answers
20 views

XML Exception during ConvertTo-SCModuleWebDeployPackage command execution

I am getting a xml root is missing execption when I run the ConvertTo-SCModuleWebDeployPackage command. I have all the prereqs installed such as MSWebDeploy, SQL server, DacFramework, the sitecore ...
1 vote
1 answer
53 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
77 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
0 answers
83 views

Is there a way to add check box to powershell reports to select or unselect the items from report?

We have a requirement,to show list of items with checkbox to select or unselect the items. Like this, I have tried dialog box with checklist editor by referring to following articles, https://www....
0 votes
1 answer
141 views

Add script in Item context menu

I would like to add PowerShell script on the home item context menu. I have added in Script library by creating a Content Editor followed by a Context menu folder. However, it is not showing the ...
  • 327
2 votes
1 answer
86 views

Not publish item after moving its workflow state through PowerShell script

I am moving workflow state through Powershell script to approved state. However, it is not publishing that item in the web database. Code:- $item.Editing.BeginEdit() $item.__Workflow=$workflowId $item....
  • 327
0 votes
4 answers
146 views

Get workflow id in Powershell script

Can we get workflow id if we have workflow name in Powershell script? Scenario 1: I have workflow name "Test workflow" based on its name can I get its id in Powershell script? Scenario 2: ...
  • 327
0 votes
2 answers
203 views

Get dropdown values through Powershell script

I am using the below code in PoweerShell script:- $options = @{ "A"="a" "B"="b" } $props = @{ Parameters = @( @{Name="selectedOption&...
  • 327
0 votes
0 answers
24 views

How to get root path in selected item path using Sitecore PowerShell? [duplicate]

how to get root path xxx in selected item path using Sitecore PowerShell master:/sitecore/content/XXXX/Home/Contact
user avatar
-1 votes
2 answers
703 views

How to get path property of Sitecore item using PowerShell

how can I get path property of Sitecore item using PowerShell module?
user avatar
0 votes
3 answers
193 views

Moving item using in Powershell

Is there a way to move item using ID in powershell. I know there is a way to Move item using path Move-Item -Path $_.ItemPath -Destination $destinationContainer; But in my scenario, the path is same ...
0 votes
2 answers
145 views

How to get template id of selected article page item using Sitecore PowerShell?

I wonder how can I get Template Id of selected article page using Sitecore PowerShell?
user avatar
1 vote
1 answer
86 views

How can I get link fields content copied to another language version using Sitecore PowerShell Module?

when I create new language version item of content using: Add-ItemLanguage -Item $imageItem -Language $baseLang -TargetLanguage $targetLang -IfExist OverwriteLatest content page link field ...
user avatar
0 votes
1 answer
87 views

How can I create new language version for linked items using Sitecore PowerShell Extensions?

How can I create new language version item for linked items of page using Sitecore PowerShell Extensions? Script for items language version creation: #Create new items with new language function ...
user avatar
1 vote
2 answers
228 views

How to get all image field that is included in a page using Sitecore PowerShell and create new language version for images

I would like to know how to get all related media id's from page using Sitecore PowerShell module and create new language definition for media items. So we have a page that have image field in data ...
user avatar
2 votes
1 answer
66 views

Creative exchange object null reference error

We have upgraded to Sitecore 10.1 from Sitecore 8.2. The Creative Exchange feature is giving object null reference error in web database when creating a new site using powershell script. How to ...
0 votes
1 answer
59 views

A non-interactive client login to Experience Editor (Sitecore 9.3)

I am writing a service tool where I need to invoke a web request to Experience Editor page from command line. I need to authorize the request with Sitecore user. How can I do this? I found some ...
0 votes
1 answer
91 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 ...
1 vote
1 answer
96 views

Is there a way to enable 'alt text' for multiple images using Batch upload

When uploading multiple images using Batch upload, there is no ability to add alt text at once. Is there a way to allow/add distance alt text to multiple images during upload without having to open ...
0 votes
2 answers
191 views

How can I run a powershell that looks for a string with random numbers in the string and replace it?

So I am tasked with looking through all of the html content areas in my content tree and look for this string: "<div id="fpCE_version" style="display:none;">8.5.1</...
2 votes
2 answers
107 views

When creating a new solution do I have to run the .\init.ps1 command again to prepare the container environment?

I am going through the Developer Fundamentals training for Sitecore 10 on the SiteCore website. I created a solution prior to starting the training following my companies documentation. When ...
2 votes
1 answer
599 views

How to check if item language version exists in Sitecore PowerShell?

I am trying to get a list of items which have created version in "en" language in PowerShell script. I am using the following code: $items = Get-ChildItem -Path $folder -recurse | Where-...
  • 77
1 vote
1 answer
191 views

Sitecore powershell bulk edit rich text fields to remove lines

I have a bunch of items with an rich text field from which I need to remove the last line of it's content if it consists of a chain of * (the chains can vary in length, but are always composed by ...
1 vote
1 answer
48 views

List of Personalization Rules Conditions and What it Triggers

Is there a way in Sitecore to get a list personalization with it rules conditions and what triggers it? Prefer to use PowerShell if it can be done that way or an OOB method. Thanks.
  • 705
0 votes
0 answers
147 views

Powershell script to update the template but to retain all renderings and fields

I need to change the template of multiple items in a folder but need to retain the field values and rendering and layout details. I was able to change the template and retain the field values. But how ...
1 vote
1 answer
407 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 =...
1 vote
1 answer
58 views

PowerShell-Sitecore-Combine Folders and Files Under One Folder

I have the below code working. $sourceContainer = "/sitecore/content/folder/Home/Topics/To"; $destinationContainer = "/sitecore/content/folder/Home/Topics/From"; Get-...
1 vote
1 answer
172 views

Error when running "docker-compose build solution" from sitecore 10 docker guide

I'm at this stage of the guide whereby I'm required to build a solution from custom-images directory. After running docker-compose build solution from the directory, it throws the below error at step ...
  • 157
0 votes
1 answer
1k views

AzureRM.Profile already loaded when deploying to Azure

I am trying to deploy vanila sitecore 9.1.1 (XM single) to Azure Paas. For this I am using Sitecore Azure Toolkit and Sitecore ARM templates. Below is the Powershell script I am using. $SCTemplates=&...
  • 572
0 votes
0 answers
115 views

PowerShell Passing in List of Values to Function for Predicate Index Filtering

I am trying to build a predicate, but if I don't hard code a value it does not work. I need to pass in a list of values. If I hard code a value the filter works. Any ideas on what I can do to get this ...
  • 705
0 votes
0 answers
1k views

Powershell script fail with 'Access to the cloud file is denied' error when trying to install SitecoreAzure.Binder module

PackageManagement\Install-Package : Access to the cloud file is denied At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:9711 char:34 + ... talledPackages = ...
  • 1