People who code: we want your input. Take the Survey

Questions tagged [powershell]

Issues relating to the PowerShell scripting language. This can include the stand-alone PowerShell scripts run from the command-line, or PowerShell DSC install automations.

Filter by
Sorted by
Tagged with
1
vote
1answer
46 views

Compare two items and copy missing children using Powershell

Environment: Sitecore 9.2 & SXA 1.9 Scenario: I have two different items and I would like to compare them and copy the missing children from one item to another using Powershell script. Item A (...
1
vote
1answer
47 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
0answers
38 views

Powershell script to update personalization rule

I want to update personalization rule for all the pages which have one common rendering. Is it possible using powershell we can identify the rendering and update personalization rule to target page ...
0
votes
1answer
34 views

Sitecore 9.0.1 installation is failing with Solr 6.6.3

I already have 2 instances running on my machine with Solr version 6.6.2 for POC purpose I am installing Sitecore 9.0.1 instance with Solr version 6.6.3.Solr is installed using the powershell script ...
0
votes
1answer
33 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
36 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 ...
2
votes
2answers
56 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?
1
vote
1answer
56 views

Trigger publish as part of deployment

We have a set up with CM, CD1, CD2. Both CDs have their own 'web' database (cd1 and cd2). We are currently using DevOps to run a powershell script that deploys to each machine. We would like to ...
1
vote
1answer
44 views

MediaCache remove item error during deployment

During deployment on CD server we're first removing complete website from root directory and then adding custom code on top of that through PowerShell script. During this time we're getting below ...
3
votes
1answer
2k views

pywintypes.error: (2, 'CreateFile', 'The system cannot find the file specified while installing Sitecore Docker images

I am following the document https://doc.sitecore.com/developers/100/developer-tools/en/walkthrough--using-the-getting-started-template.html to create a test sample project for Sitecore Headless ...
1
vote
1answer
49 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
0answers
41 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 ...
0
votes
0answers
24 views

What is the difference between using the Sitecore gutter to unlock an item and using the command button in the Sitecore Ribbon?

I am working on creating an SPE version of unlocking an item in Sitecore I can assign to content editors so an administrator does not have to do it. Unlocking an item using the Sitecore ribbon seems ...
4
votes
2answers
342 views

SItecore 10 docker build solution issue - Invoke-Expression

I am trying to follow sitecore 10 example in docker (https://containers.doc.sitecore.com/docs/build-solution) and as an out of box step worked correctly, I am having issue on step 6 with build ...
0
votes
0answers
23 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 ...
0
votes
1answer
53 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
1answer
37 views

Powershell script for Coveo Indexing

I am using this Powershell script for Coveo indexing, but I do not see the output after waiting for a long time. I can see that indexing is running in "Coveo indexing manager". But its not ...
0
votes
1answer
42 views

How do I get the list of items created or updated as a part of latest package install using powershell script?

How do I publish items using sitecore powershell script? The catch here is I only want to publish the items which got added as a part of latest package install. So I want a single powershell script ...
1
vote
2answers
332 views

How to edit/remove some (NOT ALL) HTML tags or attributes using Sitecore Powershell?

I am already able to loop through all of the items with a particular tempalteID and show their name, path, and value of the content field. Current Code: $_BlogListingFolder = '/sitecore/content/path......
1
vote
0answers
61 views

Sitecore smart publish failing with remote script block using powershell

Invoking RemoteScript block and publishing item on remote server through octopus but getting error. [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Import-Module -Name ...
2
votes
1answer
163 views

Can we install sitecore packages using Windows Powershell?

Is it possible to install sitecore items packages in sitecore using Windows Powershell? The sitecore packages are created using "Package Designer" in sitecore. If possible, please help me ...
1
vote
0answers
23 views

Sitecore 9.1 distributed architecture - how to create two processing node through PS script

Sitecore 9.1 initial release . Is there a way to create two processing nodes with PowerShell script or should it be done manually. If it needs to be done manually, what all settings to be taken care ...
1
vote
0answers
44 views

License error to Execute razl exe from sitecore powershell script

I am trying to automate content migration to upper environment using razl and sitecore powershell. While executing razl exe through sitecore powershell module, getting license error. error: you do not ...
1
vote
0answers
34 views

Sitecore PowerShell access allow/deny at same time

Hello Sitecore SPE Experts, I have a very basic question, hope anyone help me: I am using something like below Add-ItemAcl -Path master:\content\home -AccessRight "item:read" -PropagationType Any - ...
2
votes
1answer
202 views

PowerShell script to get data from Solr and Edit in Sitecore

Is there a way that i can Query Solr to get data based on a template. Then foreach of that data do a Sitecore Getitem and Update a field's value.
4
votes
1answer
248 views

Getting an item using Powershell having only the URL

Is it possible to get a Sitecore item via Powershell script having only the public URL? Something like an overload of the Get-Item function that receives the URL would be ideal Thanks in advance
-1
votes
1answer
268 views

Script to automatically recycle Azure app every day at a certain time?

We're dealing with what appears to be a memory leak issue, and we're still trying to find the root cause. In the meantime, Azure is auto-healing every time the memory gets high, which is happening ...
0
votes
1answer
59 views

DBCleanup with Powershell

I would like to automate the DBCleanup tasks (/sitecore/admin/dbcleanup.aspx). The idea is to launch a TeamCity job that calls a powershell script to run the different cleanup jobs on the different ...
1
vote
1answer
204 views

SIF cannot be installed or updated because the authenticode signature of the file is not valid

I'm trying to install SIF module using PS command. But unfortunately I could not succeed in doing so. PS Version: 5.1 Please refer below snap shot for error details -
1
vote
1answer
144 views

Event handler PowerShell/Services/RemoteScriptCall.ashx call giving 503 error

I have a local Sitecore instance with name sc90.local and I am trying to publish files on local instance using gulp. Response error: Upload failed: styles.css Status code:503 URL: POST http://sc90....
-1
votes
1answer
173 views

Habitat Home Platform Docker installation error

I'm flowing the blog from "Viet Hoang" to install the Habitat.Home.Platform Docker example. I followed all the instructions and when I execute ".\build.ps1 -DeploymentTarget DockerBuild" the script is ...
0
votes
1answer
63 views

Sitecore.Courier PowerShell Installation error

I'm trying to install the "Sitecore XP 9.3.0 and SXA 9.3.0 Demo – Habitat Home" by following the blog from Viet Hoang. https://buoctrenmay.com/2019/12/23/sitecore-xp-9-3-0-and-sxa-9-3-0-demo-habitat-...
3
votes
1answer
173 views

Issue while installing horizon “Exception calling Set Access Rule with 1 argument” [closed]

I am installing Horozon. While installing at step "SetPermission : FilePermission" I am getting following exception [------------------------------------------ SetPermissions : FilePermissions -------...
2
votes
2answers
285 views

Failed to call the method because [Sitecore.Data.Items.Item] does not contain a method named “op_Addition”

I am trying to execute this script but it is throwing an error. $path = "/sitecore/content/home" $root = Get-Item $path $items = Get-ChildItem $path -Recurse ($items += $root) | Where-Object { $_....
3
votes
2answers
757 views

Find-Item -Index Get latest version

I am looking for a master index query that will return the latest version of any item. In the solr index there is a field call _latestversion. But when I add that to my query, I get the error Find-...
1
vote
1answer
688 views

How can I rebuild the Solr indexes via Powershell?

I'm attempting to streamline the development environment setup process for a large development team. A lot of the setup process is already automated, e.g. we automatically create a Solr Docker ...
1
vote
1answer
134 views

SQL Provider for PowerShell is not installed error

I am trying to install sitecore commerce on server where SQL server is not installed. I got the below error ----- DeployCommerceDatabase : DeployCommerceDatabase ------------------------ Creating ...
-1
votes
1answer
115 views

Powershell script to find all instances of WFFM in solution?

Good afternoon, Due to a recent but necessary CSS change, we need to find all instances of our only WFFM form across all 500 websites in our solution. I am looking for a powershell script to ...
0
votes
1answer
152 views

Adding scaffolding PowerShell scripts after Branch creation in SXA

I am using SXA 1.8.0 with Sitecore 9.0.2 on multisite solution. I have a branch template for a page template which creates a few renderings data sources underneath this page, like that: Page Data ...
0
votes
1answer
573 views

Sitecore Powershell - Get all items under buckets

I am trying to see if I can traverse through every node in a bucket and get all its items using PSE. All I am able to get is only the root bucket folder. I tried all the below options with no luck. ...
0
votes
1answer
717 views

“Could not deploy package” error while installing Sitecore 9 update 2 setup on my local enviromment [duplicate]

I am a beginner in sitecore and I am facing the below error while setting up sitecore on my local environment [----------------------------------------------------------------------------------------...
1
vote
2answers
125 views

Display save actions for a WFFM form in Sitecore PowerShell

I would like with Sitecore Powershell to extract and display the ID(s) of the save action(s) that a WFFM has assigned. Those IDs in fact the ID of items from /sitecore/system/Modules/Web Forms for ...
0
votes
1answer
413 views

Create Interactive Dialog Box based on the User input using Sitecore Powershell

I want to create an interactive dialog using PowerShell script. I have multiple sites under the same Tenant if I select any site node in field 1, then field 2 root node should be changed to that ...
1
vote
1answer
278 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 ...
1
vote
2answers
197 views

Getting 401 unauthorized exception while importing Powershell Reports

I am getting 401 unauthorized exception while downloading(Excel/CSV) Powershell Reports. I have tried by adding /-/script/handle in IgnoreUrlPrefixes setting but no luck. Sitecore Version: Sitercore ...
1
vote
1answer
193 views

Sitecore Add Role In Role using Sitecore Power Shell Extension Script

How can we add RoleToTheRole. For example i want to add ('sitecore\developer') role to the role ('sitecore\test') using power shell script. In c# with the below code i am able to add role to the role ...
1
vote
2answers
2k views

How to get ALL specific child-items in a folder using fast query?

I have here a sample content. Now I want to get all the Article Template under the Folder. Sitecore Content Folder Article1 Article2 NewsFolder1 ...
-1
votes
1answer
93 views

How to check an array of items if it has a page layout and output only the page item and exclude its subitems using Powershell? [closed]

I have an array of items stored in $mylist. I'm trying to check items with layout and output them. Here's the script that I have tried: for ($i = 0; $i -le $mylist.count; $i++) { $i = $...
2
votes
1answer
187 views

How can I get the renderings when using the Find-Item command?

I used Find-Item to get the items on my sitecore_master_index. Now, I want to get the presentation details of each item. How can I do get each rendering/presentation details?
2
votes
1answer
62 views

How can I filter or show only one of the duplicates in the results when using Find-Item command?

I used Find-Item to get the items on my sitecore_master_index. However, the results contains same ID but with different languages. I have found out that this item has many language versions in the ...