Questions tagged [powershell-extensions]
Anything related to the Sitecore PowerShell Extensions (SPE) module
487
questions
1
vote
4
answers
1k
views
How to Get Items from the specific folder with specific TemplateName in Parameters
How to get the items with specific template only. I need this, beacuse it is useful for the bucketable items, like Tags
Here is my code:
$props = @{
Title = "Test"
Description = &...
1
vote
1
answer
222
views
How to compare two MultiList Selected Values
I want to compare two MultiList in terms of, comparing Selected Items.
I have a MultiList where users can select what items they want to be selected.
Here is the image of it:
Now I have a Tagging ...
1
vote
1
answer
535
views
How to get value from the MultiList Field and Get Path to Tag Repository
I have a little bit of confusion regarding the Multilist Field in Sitecore. Basically, I want to get all of the selected MultiList Field in PowerShell to do stuff with them.
Is it possible to make ...
0
votes
0
answers
71
views
Sitecore Powershell Extension - Is there any way to "tag" media files and download media files with particular tag?
As you can see from the title I need to make a script to get all of the media files from particular path (sitecore/content/Media Library for example) and to download those media files that are ...
3
votes
1
answer
313
views
Value cannot be null error in Sitecore powershall report download
I am trying to generate report using powershell. I am getting results but when I tried to download report using powershell report dialog box throwing error as shown in below screenshot
Please see ...
0
votes
1
answer
2k
views
Sitecore PowerShell Extension - How to get Media Item URL and export it in CSV file (Script making)
I am completely new to Sitecore PowerShell script making. I have a task where I need to get the media item url from the specific folder sitecore/media library/somefolderofimages.
Media Item URL that I ...
1
vote
2
answers
111
views
Error while running Export-UnicornConfiguration cmdlet in the Sitecore PowerShell script
I am triggering an SPE script from the code. SPE script contains a few checks but finally has Export-UnicornConfiguration $configurationName.
The script runs without any errors when it is triggered ...
2
votes
1
answer
368
views
Where are my SXA items?
Running 10.2, I followed the SXA installation instructions and installed:
Powershell Extensions 6.3
Sitecore Experience Accelerator 10.2.0 rev. 04247
If I go into /templates, then SXA stuff is there,...
0
votes
1
answer
2k
views
How to get multilist , dropdown list field value of an item using PowerShell query
I am looking to extract the multilist , dropdown list field value of an item using PowerShell query.
$item = Get-Item -Path master -ID "{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}"
$rawIds = ...
0
votes
1
answer
413
views
Display values in the dropdown list with duplicate values
I have a hash table with keys as Guids and values as string. Of which some of the values are same with different Guids. User will be presented with an prompt which contains a droplist of options and ...
0
votes
2
answers
890
views
Programatically change all renderings with specific rendering parameter
I'm new to Sitecore PowerShell and would like to know the best way to get all the items on my content tree that have a specific rendering parameter set so I can replace it with another value in the ...
0
votes
0
answers
186
views
Remote powershell scripts failing intermittently
During deployment with AzureDevOps, remote PowerShell scripts fail intermittently.
In SPE logs we see,
60796 08:22:06 INFO 'POST/script' called by user: 'admin'
61320 08:22:09 INFO Executing ...
0
votes
0
answers
30
views
How can we update delta item from one Sitecore instance(master DB) to another Sitecore Instance(master db)
We want to move delta items update done within a time interval from one sitecore instance to another using Sitecore Powershell script, is there a way to connect to 2 master DBs at once and copy/move ...
3
votes
1
answer
2k
views
How to pass parameters in Powershell scripted task scheduler?
We would like to pass parameters to powershell script calling from Task scheduler option powershell scripted task schedule.
Is there any functionality to pass custom parameters in powershell scripted ...
2
votes
1
answer
751
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
285
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-...
-3
votes
1
answer
341
views
How to add space between two paragraph import from csv file through powershell script
We have a field under .csv file and that field contain two paragraphs showing in one row :
orem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's ...
1
vote
1
answer
908
views
How can we show value of a custom field inside Show-ListView
We would like to show custom data such as custom string(" Test Case 1","Test case 2"). All these data do not inside any items in Sitecore. It is just a string in powershell script ...
0
votes
1
answer
59
views
Trigger and monitor Content Migrator preset from SPE
Does anyone know if there is a way of triggering Sitecore Sidekicks's Content Migrator from within Sitecore using SPE and monitor progress? Sidekick's Content Migrator scripting works for Powershell ...
0
votes
0
answers
96
views
Setting the export report name in Show-Listview in SPE
I wondered if it's possible to set the report name when exporting to something specific when using Show-ListView in SPE?
Looking at the docs I can't see any params for this but maybe I've missed ...
0
votes
2
answers
446
views
How to upgrade the Sitecore powershell version from 4.7.2 to 5.0 in sitecore 9.0.1
I have the Sitecore 9.0.1 installed along with the Sitecore PowerShell version 4.7.2 . For some requirements need to Upgrade the Sitecore PowerShell version to 5.0 . Can anyone please help in ...
2
votes
1
answer
352
views
Jss not recognized as internal or external command while running in C#
I am calling a batch file via c# using powershell library, I see the below error
'jss' is not recognized as an internal or external command,
Whereas manually executing the batch file runs with no ...
0
votes
1
answer
1k
views
Import Excel module installation issues in Sitecore Powershell Extentions
We are trying to enable excel data extraction in a machine where MS office is not present. While doing that we are facing issues to enable the Import-Excel module in SPE. We are facing the below ...
1
vote
1
answer
129
views
SPE report fails to run in Reporting Tools; runs successfully in the ISE
I've created multiple custom reports for content managers. They all run as expected in the Sitecore Powershell ISE.
When I save them in Reporting Tools and attempt to run, I get errors.
The first ...
1
vote
1
answer
71
views
Editing SXA Searchbox rendering parameters thru powershell
I am trying to update the 'Search results signature' and Suggestion mode of SXA Search box rendering of items thru below powershell script but it is adding new parameter at the bottom instead of ...
2
votes
1
answer
310
views
Reload parent content item
We have a context menu PowerShell script to move an item to a new location and perform some other actions on the item once it's moved to the new location. When the script has finished the item that ...
0
votes
1
answer
228
views
Add site module error
I am trying to add an SXA module on a site node. Right-click site node > Scripts > Add site module.
I am getting the below error in SPE logs.
19528 00:27:22 INFO Script item set to
master:\...
3
votes
1
answer
465
views
Add SPE module to custom Sitecore Docker Image
I am trying to add SPE module to XP0 but getting error as shown in the image and its occurring while building the image. what am I doing wrong ? I have tried SPE 6.2-1809 version as well.
SPE_IMAGE: ...
0
votes
0
answers
188
views
Is there a way to connect Xconnect to get all Contacts via sitecore powershell script?
Is there a way to connect Xconnect to get all Contacts via sitecore PowerShell script ?
1
vote
1
answer
500
views
How to get values selected in Treelist Queryable field
We have try to find all items under treelist field.
Example
$rawIds = [Sitecore.Data.Fields.MultilistField]$page.Fields["Sub Category Pages"]
Here getting $rawIds as null.
Please note here &...
1
vote
1
answer
273
views
Retrieve Rules field using Powershell script in readable format
We are trying to get report using Powershell to list all sub items under one item and some of it's fields. One field in the item is of Rules field type. We are able to fetch RuleSet XML (<...
1
vote
1
answer
444
views
How can I get List of Images that directly linked with specific Page Items?
Have a scenario, where wanted to get list of Images which directly linked with marked page items.
Below is the powerShell script which I am trying, please help
$allImages = Get-ChildItem -Path 'master:...
2
votes
1
answer
368
views
Powershell script to update personalization rule
I want to update the personalization rule for all the pages which have one common rendering.
Is it possible to identify the rendering using Powershell and update the personalization rule to the target ...
0
votes
1
answer
286
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
1
answer
476
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
1
answer
167
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
0
answers
97
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
1
answer
282
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
2
answers
1k
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
2
answers
205
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 ...
1
vote
4
answers
4k
views
Where to download Sitecore PowerShell Extensions for 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 the marketplace (https:...
1
vote
1
answer
367
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
1
answer
1k
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
0
answers
45
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
1
answer
565
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. ...
2
votes
2
answers
586
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
1
answer
1k
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 ...
2
votes
0
answers
193
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
1
answer
187
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
1
answer
96
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 ...