Questions tagged [powershell-extensions]
Anything related to the Sitecore PowerShell Extensions (SPE) module
363
questions
0
votes
1
answer
27
views
Sharing data between two powershell scripts
I have two scripts namely, Add and Report. I am having a array of items in Add script. I want to read this array in Report script. Add script can be called multiple times. I want to retain the value ...
1
vote
2
answers
68
views
How to update Item's Media Properties using SPE (Sitecore Powershell Extensions)
I have an Image Field in an Item. When the image is uploaded to Media Library, the Alt field is not updated and hence when we look at the Image properties from Item, it is Blank. So far so good.
The ...
0
votes
0
answers
14
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 ...
1
vote
3
answers
137
views
Get Sitename through PowerShell script
I would like to get SXA Site name dynamically when we run PowerShell script through the context menu.
Currently I am giving static Site name in PowerShell script. Using the below code.
Show-Input &...
0
votes
1
answer
35
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
30
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
39
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
3
answers
50
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
1
answer
55
views
How to copy images included in content using Sitecore PowerShell Extension
I would like to know how to copy Sitecore Media Library content from Sitecore page one language to second language?
1
vote
2
answers
127
views
How to enable multiselect in dialog prompt?
how to set up multiple select on the Sitecore PowerShell interactive dialog?
Thanks
2
votes
1
answer
51
views
In SPE how can we assign dynamic hashtable to Read-variable options for checklist editor
I have a requirement to show list of options as checklist to user for selection. If followed In Powershell how to enable/show options like Select All | DeSelect All for Multilist field type , it have ...
0
votes
1
answer
77
views
Need sample Sitecore PowerShell script to add components to any SXA page dynamically
We are looking for a Sitecore PowerShell script using which we can assemble/add components directly to an SXA page. I am able to add an SXA page, then add a Container component (under the page ...
0
votes
1
answer
30
views
How do you programmatically change the "Quick Action Bar" of a template to "Required" using PowerShell? [duplicate]
Can someone please provide an example using SPE to set the field "Quick Action Bar" of my templates to required "Required"?
0
votes
2
answers
73
views
Change field type via a Powershell Script [closed]
I have created a custom field type which inherits from general link but has an extra attribute we need. We only want it to be used for a particular microsite. Now I want to write a script so that I ...
0
votes
2
answers
77
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</...
0
votes
1
answer
89
views
Get-Item path not working as expected
Can anyone explain what's going on here with this Sitecore Power Shell script?
We have 2 websites set up on 1 Sitecore instance, they're as follows:
/sitecore/content/siteA
/sitecore/content/siteB
...
1
vote
2
answers
54
views
How we can update droptree value of an item using PowerShell query
Does anyone know how to Update droptree field values through Powershell?
We have the bulk of items, which one of the field values as __Workflow state under workflow section[while we can see enable ...
2
votes
1
answer
214
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-...
0
votes
0
answers
40
views
Azure AD login triggered for powershell script
We are working in Sitecore 9.3.
In the CM instance, we have configured a site as well for internal business users.
The site uses Azure AD B2C for login using WsFederation.
We are able to login to ...
0
votes
1
answer
59
views
Powershell Reports menu not appearing
We upgraded a Sitecore site from 9.1 to 10.2. After the upgrade we installed the latest SPE. Everything works as expected except the SPE Reports submenu; it doesn't show, even for the admin user.
We ...
0
votes
1
answer
63
views
How do we get list of items in a workflow using powershell script
I need to get list of items/pages and all its associated contents in a workflow using the powershell script. Is there any possibility to achieve the same?
2
votes
1
answer
23
views
How do you copy Latitude Longitude from the old SXA fields to the new Coordinate fields?
We are upgrading from an older SXA for Sitecore 8.2.7 to SXA 9.3. We would like to keep the Latitude and Longitude values intact but we have hundreds of items with this data.
How can I migrate these ...
1
vote
0
answers
90
views
Getting this error after installing PowerShell v6.3 Type "Cognifide.PowerShell.Client.Controls.IsePluginStrip, Cognifide.PowerShell" not found
I am hoping to understand the cause of this and hopefully find a solution - I have looked at every possible solution, but haven't been able to fix it.
Sitecore v10.0.2 using PowerShell v6.3.
I have ...
1
vote
4
answers
161
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
63
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
101
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
50
views
How do you download images in bulk using Show-ListView?
As you can see from the title, I want to download images based on "search" that has been filled in Show-ListView. I recently posted another similar question about searching how to download ...
0
votes
0
answers
32
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
64
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
284
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
49
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
73
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
207
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
106
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
1
answer
97
views
Programatically change all renderings with specific rendering parameter
I'm new to Sitecore powershell and I would like to know what's 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 ...
0
votes
0
answers
37
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
26
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 ...
0
votes
0
answers
21
views
Export Sitecore Item content to Excel or csv [duplicate]
I have a requirement where in I need to export the Sitecore item content all data from a specific root node to an excel or csv file. Which is the appropriate ways of doing this? I tried installing ...
2
votes
1
answer
391
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 ...
1
vote
1
answer
222
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
41
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
63
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
141
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
24
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
53
views
New lines in cells of SPE Show-ListView when displaying table and exporting to Excel
I have a list of items and I'm displaying their field values in Show-ListView.
Some fields are multilist fields, so I'm fetching those item names and including them as individual lines within single ...
0
votes
0
answers
36
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
131
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
89
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
237
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 ...
0
votes
1
answer
45
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 am getting errors.
The ...