Questions tagged [powershell-extensions]

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

39 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
1answer
110 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
172 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
39 views

Get-ItemReferrer : Object reference not set to an instance of an object

I am working on Sitecore PowerShell Extensions 5.0.0.42513 with Sitecore 9.0. I have started facing issue as Get-ItemReferrer : Object reference not set to an instance of an object Also shown below ...
3
votes
0answers
35 views

Get workflow history for an item by itemid in sitecore powershell extension - Sitecore 8.1

I need to create a report by Sitecore Powershell Extension where I need to include the details of "Workflow Approver" and "Date on which workflow approved". I have got the list of referring items for ...
3
votes
0answers
45 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
25 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
73 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
198 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
1answer
188 views

New item is not in focused after creation using powershell

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

Unable to get xDB reports using Sitecore Powershell

I am trying to get the Page URL visits which we get from Experience Analytics dashboard using Powershell. Below screenshot specifies the data i am trying to access using Powershell. I found a link ...
2
votes
1answer
73 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 ...
2
votes
0answers
40 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
96 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 ...
2
votes
0answers
168 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....
2
votes
0answers
459 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
250 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
673 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
0answers
32 views

Pagination on Update-ListView

I have written a PowerShell script as an action to delete selected items in the list view. The issue is - when I delete an item on any page other than the first one, after deletion, update-listview ...
1
vote
0answers
18 views

Get-RenderingParameter is not recognized as a name of a cmdlet

I'm writing a script to exchange a rendering component with a new rendering component, but it should keep all of the same rendering parameters. I followed the documentation to use Get-...
1
vote
0answers
34 views

Session Elevation options when using Federated Authentication

When I want to excecute a powerhsel Script in sitecore 9 update 2 with SPE 5 I get the following authentication Dialog. But I am using Azure Federated Authentication Login to log in into sitecore. ...
1
vote
0answers
226 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:...
1
vote
0answers
44 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
143 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
42 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
181 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
128 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
188 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
91 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
160 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
17 views

Sitecore Powershell Extension 5.1.0.19766 - debug tooltip tiny box

Sitecore PowerShell Extensions 5.1.0.19766 Sitecore 9.1 Windows PowerShell 5.1 I want to view the Objects during a debug process by hovering over the variable, object, array, etc., but only see a ...
0
votes
0answers
22 views

Identity Server + Sitecore Powershell: Non-admin cannot see scripts

I am using Sitecore 9.1 with Identity Server configured to authenticate users against Azure Active Directory. This works great and users can login with their azure accounts without issue. I have ...
0
votes
0answers
22 views

Export/download options for custom roles is hidden in power-shell script results

I have created a custom role for some users which can access some reports. Although the users under the specified role can access and execute the reports and get result window what they lack is the ...
0
votes
0answers
25 views

Sitecore powershell Extension new site “context” => Azure authentication

I've installed the powershell Extensions on my 9.0 update 2 and we are using Azure Ad authentication login. And now my users have some problems that they can't switch between preview und edit mode in ...
0
votes
0answers
26 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
40 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
19 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
90 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
63 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
0answers
99 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 ...