Questions tagged [powershell-extensions]

Anything related to the Sitecore PowerShell Extensions (SPE) module or general Windows PowerShell.

31 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
71 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 build into Sitecore but sometimes the UI ...
5
votes
0answers
157 views

CI/CD Sitecore challenge: going from “wipe” to “overwrite”

We are set to release a large Sitecore-based system in a week. Presently the CI/CD process works by effectively republishing everything from a git repository as the source (we use TDS for day-to-day ...
3
votes
0answers
36 views

Is it possible to install PowerShell Module for Sitecore and SPE Remoting module remotely?

Is it possible to install the PowerShell Module for Sitecore and SPE Remoting module remotely? I'm wondering if it is possible to install it via ansible to a new Sitecore instance and then remotely ...
3
votes
0answers
24 views

Restoring marketing taxonomies with Sitecore powershell extenstion

I am trying to automate Sitecore upgrade from 8.1 to 9.0.1. In Upgrade steps, There is one step restoring deleted marketing taxonomies, which can easily be done with Url navigation and click button on ...
3
votes
0answers
67 views

ShowFieldEditor on a media item detaching media

I have a simple script that we're running, where a content editor has bulk uploaded media and they want to go back through and provide attribution to the images (caption, alt text, photo credit) and ...
3
votes
0answers
171 views

How to bulk upload media files and set each item's template to custom template?

I have a directory structure that looks like this: -- Folder 1 ---- Folder 2 ------- File 1 ---- Folder 3 ------- File 1 And so on with Folder 1 being the parent folder. When I upload the files from ...
3
votes
0answers
142 views

New item is not in focused after creation using powershell

When we create item in a Sitecore bucket folder using PowerShell Extensions like shown below: New-Item -Path "$PathofBucketFolder" -Name $TitleofanItem -ItemType $TemplateofanItem Item gets created ...
2
votes
0answers
36 views

How to add experience editor button with Sitecore Powershell?

I've created a script to aid editors publishing components on a page, and I've added it to the content editor item context menu, but I can't work out how to add a button to do the same from the ...
2
votes
0answers
343 views

Show-ListView called from action script display columns from parent Show-ListView

We're using Sitecore PowerShell Extensions to generate some reports. We have a problem when calling "Show-ListView" from the "Actions" script that is in the parent "Show-ListView" result. Looks ...
2
votes
0answers
214 views

Security disabler doesn't operate in context of Unlock-Item comandlet?

Writing a script to allow editors to unlock an item locked by another user I used New-UsingBlock(New-Object -TypeName "Sitecore.SecurityModel.SecurityDisabler"){ $item | Unlock-Item } This didn't ...
2
votes
0answers
566 views

SPE Remove-Rendering with -FinalLayout Removing all renderings from the Final Layout

I recently wrote my first Powershell script for removing an old rendering from a placeholder and replacing it with a new rendering. For some reason, when the rendering I need to remove is in the ...
1
vote
1answer
37 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 ...
1
vote
0answers
31 views

Removing publication restrictions - publication targets

Does anyone know or have a PowerShell script which can remove the checkbox in publication restrictions specific to publication targets for Sitecore items? We need to achieve (2) as below since some ...
1
vote
0answers
104 views

Can I automate the PowerShell Extension package installation?

Is it possible to automate the installation of the package that everybody is using to automate the other packages installation? My goal would be having a script which I can use to install SPE on a ...
1
vote
0answers
113 views

SPE Object reference not set to an instance of an object

In Sitecore 9.02 I get this error running any script in Powershell ISE. Console works fine. Stack trace: [NullReferenceException: Object reference not set to an instance of an object.] Cognifide....
1
vote
0answers
38 views

PowerShell Receive-File dialog is empty

I'm trying this really easy Receive-File but I'm getting a blanc popup. I've tried different paths but always get the same result. Another popup Read-Host is no problem. That one shows correctly. I'...
1
vote
0answers
163 views

Sitecore Commerce 9 Update 1 Installation Issue with SPE 4.7.2

I tried to install Sitecore Commerce using PowerShell script but I got the error that resource is not found for Sitecore PowerShell Extensions 4.7.2 although I have this zip package for Sitecore 9 ...
1
vote
0answers
109 views

PowerShell find-item doesn't return values

I'm currently using find-item on Sitecore PowerShell Find-Item -Index sitecore_master_index -Criteria @{Filter = "Equals"; Field = "recipe id"; Value = "Recipe_Lambada"}, @{Filter = "DescendantOf"; ...
1
vote
0answers
180 views

Use custom Mongo db with Powershell

I have a custom mongo database, that database contains information about pages.I need to query it in order to use SEP to create pages according to that info, ig, adding renderings component, etc. ...
1
vote
0answers
84 views

“PowerShell Script Workflow Action”(approve/reject) is not fired from the workbox page on IE browser

"PowerShell Script Workflow Action"(approve/reject) is not fired from the workbox page on IE browser. Whereas it is working fine on chrome browser. None of the buttons(approve,approval all, reject ...
1
vote
0answers
154 views

Adding placeholder settings to presentation details of many items

I have to add a bunch of placeholder settings to a bunch of items. These items already have specific presentation details, so not using the standard values. I tried to add them to standard values, ...
0
votes
0answers
25 views

Powershell script modifies My Toolbar when users are created but an hour later it's reset to default

I've gotten help here to implement a custom My Toolbar every time a new user is created: Run powershell script when new user is created. However, although this works initially when I first log in as ...
0
votes
0answers
38 views

Workflow is not getting assigned for items

I'm creating a template and assigning a workflow to that template. But the items which are created from that template are not having the workflow value. $template = New-Item -Path "/sitecore/...
0
votes
0answers
16 views

Choose Item Dialog box

I have sitecore power-shell and sitecore 8 with SXA module. I need to have a dialog box that will allow user choose Item from a tree. is it any way to do it ? not sure that standard dialog could do ...
0
votes
0answers
47 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 ...
0
votes
0answers
49 views

Problems with spaces in SPE Sitecore queries

I am using Sitecore 9.0 and SXA 1.8 and scaffolded a new tenant and site named New Tenant and New Site. When executing the following query using SPE I get not results: Get-Item -Path master:// -Query ...
0
votes
1answer
98 views

Export buttons in Show-ListView is not working

I know there is a similar question before but it has different error than mine. In my ListView result, when I try to click any of the export buttons, nothing happens. Upon checking the SPE logs, this ...
0
votes
1answer
34 views

Not getting any details when running “Install-Update Package” through Sitecore Powershell Module remoting service for my sitecore instance

I am running a Powershell Script using Sitecore Powershell Module remoting service to install .update packages from my host to a remote Sitecore instance but I am not getting any details back on the ...
0
votes
0answers
68 views

How to create a Sitecore Module WDP packge **WITH** Sitecore items?

I was following the official documentation on the subject here https://doc.sitecore.com/developers/sat/20/sitecore-azure-toolkit/en/web-deploy-packages-for-a-module.html and realized that it looks ...
0
votes
0answers
69 views

How to replace an item with another item by ID in Treelist field using Powershell?

I want to replace an item with another item in a Treelist. Basically, the items I want to replace are broken links. Suppose, There are two items A and B. A is used in a Treelist field, so I want to ...
0
votes
0answers
161 views

Error installing Sitecore PowerShell Extensions 5.0 on Sitecore 9.1 instance ['packageinstall:items:ended' event]

I got this error when trying to install SPE 5.0 on my Sitecore 9.1 instance. [![enter image description here][1]][1] I was able to get more details checking the log files: ManagedPoolThread #3 08:...