Questions tagged [powershell-extensions]

Anything related to the Sitecore PowerShell Extensions (SPE) module

Filter by
Sorted by
Tagged with
0
votes
1answer
23 views

Can I start PowerShell background job through PowerShell Web API endpoint?

I have a PowerShell Web API endpoint running on Azure that takes more than the maximum duration of 230 seconds on an Azure Web App. Is it possible to start a background job consisting of PowerShell ...
1
vote
1answer
36 views

How can I automate the upload Media Library files available in folder under App_Data?

I build my frontend artifacts (theme files, including pre-optimized-min versions of my CSS and JavaScript) using SXA Umbrella, and in my DevOps release pipeline I make them available in the folder ...
0
votes
1answer
31 views

Is this possible to modify existing PowerShell scripts for Sitecore?

I want to modify any one of the existing default Sitecore PowerShell scripts (in the screenshot below), is there any way of doing it? If yes, then please let me know how this can be achieved?
1
vote
0answers
29 views

Sitecore PowerShell Remoting doesn't work with http://localhost/ and http://127.0.0.1/ addresses

I have Sitecore 9.3 with SXA and SPE 6.0 installed in a Docker container. docker-compose.yml map containers 80 port to 80 on local machine. ports: - "80:80" I have an additional ...
0
votes
1answer
39 views

How can I access field under particular section in Sitecore using PowerShell Extensions

want to access field "Text1" under "Row1" section. I can do it with $item.Fields["Text1"].Value But there are another section which also contain Text1 field. How can ...
2
votes
2answers
35 views

Setting Image Properties using Powershell on existing Image Field

I am trying to find a way to change the Properties (Alternate Text) of an image field in an item. Do you know how can I access those image properties using Sitecore Powershell?
2
votes
2answers
33 views

Disable Custom Chunk Button calling PSE script if there is no write access to selected item

I have a custom Button in the content Editor (Share), basically it just runs a PSE Script that moves final layout to shared layout. Only a specific role can see the button. Now my problem is, that the ...
0
votes
3answers
29 views

Sitecore PowerShell Extensions - Sitecore 9.3

I am trying to find the Sitecore PowerShell extensions for Sitecore 9.3. As my knowledge Sitecore 9.3 supports SPE 6.0 but not able to find any SPE modules for Sitecore 9.3 in market place( https://...
1
vote
1answer
46 views

How to supply value for HttpContext.Current when the OnItemSaving event is triggered via SPE?

I have created a Powershell script that involves automatic assignment of page design to an item. Below are the portions of codes I am using: Powershell code: C-Sharp code My problem is that whenever ...
1
vote
1answer
45 views

Change links in rich text editor using powershell

I have imported a large amount of items in sitecore and used a rich text editor field to store the content text html. Currently all links in the rich text editor are like external links pointing to ...
0
votes
0answers
24 views

Sitecore PowerShell list-view throws 500 error when exporting report to excel

I am using Sitecore PowerShell extensions 5.0 and I have a script written to pull some data from the Sitecore tree. The Script run without any issues until it produces the report. Once the report is ...
0
votes
0answers
23 views

How can I select/unselect Sitecore Commerce catalog using SPE?

I would like to select/unselect one or more catalogs using PowerShell remoting: I'm currently trying this, but that does not seems to be the correct way to set a checkbox... $sitePath = "/...
0
votes
0answers
18 views

Adding Active Directory users using SPE and Show-ListView

We have implemented SSO with Sitecore. However, we don't want to allow all users to be able to log in to Sitecore, so the users are created in the extranet domain manually. I'm trying to make the ...
1
vote
1answer
41 views

Sitecore Powershell Task is scheduled to run every minute but it's running every other 10 minutes

I scheduled a Sitecore PowerShell Task to run a Powershell script every minute but for some reason, it's running the task every other 10 minutes. The frequency in the config file is set to 5 seconds. ...
1
vote
2answers
42 views

Azure AD users unable to execute Sitecore PowerShell scripts

We are having issues with the execution of PowerShell scripts that have security permissions based on roles applied to them, when they are executed from within a context menu within Content Editor. ...
1
vote
1answer
87 views

Sitecore Powershell script to filter the users based on custom roles

we have custom roles in sitecore role manager and assigned them to sitecore users. I am writing a Sitecore PowerShell script to filter the users based on my custom role 'Buyer'. below is my script. i ...
1
vote
0answers
38 views

Error while install a Sitecore content package using SPE in Sitecore XP 9.3

On day to day basis we need to install some content packages from one environment to another. For that we are using SPE module and the below script to install the package zip. But it usually fails due ...
1
vote
1answer
30 views

SXA clone site script not cloning media or themes

I have a tenant with a site. When I clone the existing site, the script does not clone the media library or themes. Instead the new site points back to the original sites media and theme locations. (...
0
votes
1answer
28 views

Find-item Greaterthan not recognized by SPE 3.0

I'm working on a PSE script that will work on different sitecore environment with different sitecore versions. This script basically get the list of items that is recently updated between to given ...
3
votes
1answer
70 views

How to exclude an item based on template when using find-item in Powershell

I'm working on this script: $criteria = @( @{Filter = "NotEquals"; Field = "_template"; Value = "{A87A00B1-E6DB-45AB-8B54-636FEC3B5523}"} ) $props = @{ Index = &...
0
votes
2answers
75 views

Creating a new item with “/” in Itemname

I am trying to create a new item in Sitecore from Powershell and using the below command in ISE New-Item -Path "master:\content\home" -Name "A/B Demo" -ItemType "Sample/...
1
vote
0answers
22 views

Unicorn serialized files whose items are edited through SPE are not listed in source control pending changes

We are running Sitecore powershell script to update a item's field. Respective yaml files are generated in web root folder. But not showing in TFS pending changes. On the other hand, if we are ...
0
votes
0answers
38 views

Sitecore Powershell Extensions - Remote Update Package installation not working after recycling app pool

I'm trying to run an update package installation remotely by using the Remoting PowerShell module for SPE. It doesn't install it unless I run it on the SPE console first, and then, remote ...
2
votes
1answer
105 views

Run Powershell script when an Item is being published

I'm trying to do implement some logic while a particular template item is getting published. To implement this logic I started exploring the Sitecore Powershell's Event Handlers. For the events like ...
3
votes
1answer
100 views

Download Image from External URL to Sitecore Media library

Is there a way to add (Download) an image from an external URL to the Sitecore media library directly using SPE? Example: I want to add an image from URL (http://mySite/wp-Rad.jpg) to Sitecore media ...
1
vote
1answer
40 views

Update Commerce Data Templates with SPE

How can I trigger Update Commerce Data Templates from SPE? I am automating a Docker deployment script and the one step that I am missing for it to be fully automated is being able to do this from ...
1
vote
1answer
102 views

How to create button at EE and run powershell script

I need to add a custom button for EE and run a script if the user clicks on the button. basically, I know how to create a button at the core database at /sitecore/content/Applications/WebEdit/Ribbons/...
-2
votes
1answer
210 views

Sitecore PowerShell script to get all images where the media attached is empty

I'm writing a Sitecore PowerShell script to get all images (without their Media Folders) under the path master:\sitecore\media library, where the Media attached is empty. I am using the below code but ...
-2
votes
1answer
48 views

uncheck checkbox and publish in Sitecore

How can we uncheck a checkbox like "upload to cloud cdn" for Sitecore media library and republish it in Sitecore using powershell? Can anyone please help.
0
votes
1answer
87 views

Get the count and size of the subfolders of media folders and media items for each of the medial folders inside media library

I need to get the count of all the media items and folders inside any media folder in media library. Then export the data to csv I am planning to write a script using SPE. Please help me on the same ...
0
votes
1answer
54 views

Adding powershell script to Poststeps folder in App_Data - Is it possible?

I need to do some post step stuff when Sitecore has been installed/set up (And no post step when solution has been built). And it seems that the poststeps folder in App_Data seems to be the way to go. ...
2
votes
1answer
54 views

Import CSV command not working on Azure CM Server

I am using below Powershell command to read CSV file from directory: $importData = Import-CSV "C:\Projects\news_sample.csv" It's working fine on my local Sitecore instance and machine. I am ...
0
votes
1answer
29 views

“Unexpected token :” when getting JSON elements

So I'm able to connect to an API and generate items based on a template from that data. But what is stumping me is the ability to get a child JSON element of one that contains a colon. For example the ...
0
votes
0answers
42 views

Stack empty error when using Sitecore PowerShell Extensions dialog box

I am getting stack empty error while using Sitecore PowerShell Extensions dialog box Error occurs when using Sitecore PowerShell Extensions dialog box (e.g. “Create a new SXA site”) and publishing is ...
0
votes
0answers
21 views

Powershell -ErrorAction not working for Receive-File

I have created the utility to upload a files using Receive-File. Its working fine however if user missed to choose the file and clicked "OK" button in that case I am getting the error ...
1
vote
1answer
68 views

Powershell - Add-ItemVersion

I want to create a new language version via Powershell (the item has no versions yet) but I'm not able to do so via Powershell... I'm not getting an error but the version is also NOT created This is ...
0
votes
1answer
42 views

In Powershell how to enable/show options like Select All | DeSelect All for Multilist field type

Good day!! anyone know how to show the option like Select all and Deselect All for Multilist field type in powershell. Similar kind of functionality available for checklist field type but not ...
0
votes
0answers
96 views

Sitecore powershell, Excel export does not contain all the records after decoding the rich text field

I wrote a script to capture all content from specific location of the content tree, as part of this script I need to take out only the text from the rich text fields. I use the HtmlAgilityPack to ...
-1
votes
1answer
93 views

write sitecore powershell inside C# code

I'm working with Sitecore 9.2 , And I need to create a custom button inside custom ribbon when click on button open dialog so the content author can select date and then i will do my business function ...
0
votes
0answers
28 views

inserting tenant error sitecore 9.2 SXA 1.9

When I try inserting a tenant this error appears I tried reinstalling SXA but no difference happens CodeBeside class "Cognifide.PowerShell.SitecoreIntegrations.Applications.PowerShellRunner,...
0
votes
1answer
25 views

Show path instead of ID in link field result in SPE

I've modified one of the SPE 6.1.1 reports in 9.2 to add a column for a general link field, as our client wants to see which items have links and how old they are (based on the link location). But the ...
0
votes
1answer
52 views

Change field from General Link to Single line text and retain Text

I'm having a similar issue with the one described here: How to change item templates and retain existing data Template_Old Title General Link Template_New Title Single-line text My ...
3
votes
1answer
115 views

Getting the datasource of all components 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., I found the ...
0
votes
0answers
300 views

Invoke-WebRequest throws Access is denied due to invalid credentials while accessing Sitecore EE URL in Powershell

I am trying to get Sitecore users' StartUrl (configured in Profile tab) in powershell and then supply it to Invoke-WebRequest in powershell to get the response status code for the StartUrl (to know if ...
0
votes
1answer
252 views

Executing Sitecore PowerShell script programmatically - Sitecore path not resolving

I am calling the powershell script programmatically using Sitecore Command.. ScriptSession.ExecuteScriptPart() ... Inside the script I have written following script: $settingItemId = "/sitecore/...
0
votes
1answer
46 views

Sitecore Powershell script for moving bunch of fields to template section

We are trying to refactor few of the Sitecore templates. We need some help with powershell script. Is there any way to pull bunch of fields (around 70-80) to different template sections. Manual pull ...
-1
votes
1answer
87 views

Sitecore Powershell script for changing item template in all language versions

i want to change the item template in all language version and retain the data. I have tried this : $rootItem = Get-Item master:"/sitecore/content/home/" $sourceTemplate = Get-Item "{...
-1
votes
1answer
246 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.
0
votes
1answer
213 views

Unable to export query result to a file from Sitecore Powershell scirpt with Out-Download command

I have a simple powershell script which uses Out-Download command to export the query result to .xlsx file. However, it doesn't seem working. The same scenario as well if I used the download button ...
1
vote
1answer
622 views

Powershell script for fetching checklist field value

I would like to get checklist field value display name instead of raw values and would like to update its value based on display name. For example I have checklist field values : Test 1 Test 2 Based ...

1
2 3 4 5
7