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
54 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
1answer
18 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-...
1
vote
1answer
43 views

Error when running "docker-compose build solution" from sitecore 10 docker guide

I'm at this stage of the guide whereby I'm required to build a solution from custom-images directory. After running docker-compose build solution from the directory, it throws the below error at step ...
0
votes
1answer
223 views

AzureRM.Profile already loaded when deploying to Azure

I am trying to deploy vanila sitecore 9.1.1 (XM single) to Azure Paas. For this I am using Sitecore Azure Toolkit and Sitecore ARM templates. Below is the Powershell script I am using. $SCTemplates=&...
0
votes
0answers
47 views

PowerShell Passing in List of Values to Function for Predicate Index Filtering

I am trying to build a predicate, but if I don't hard code a value it does not work. I need to pass in a list of values. If I hard code a value the filter works. Any ideas on what I can do to get this ...
0
votes
0answers
252 views

Powershell script fail with 'Access to the cloud file is denied' error when trying to install SitecoreAzure.Binder module

PackageManagement\Install-Package : Access to the cloud file is denied At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:9711 char:34 + ... talledPackages = ...
1
vote
1answer
61 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
59 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
53 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
64 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
42 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
44 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
134 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
69 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
46 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 ...
5
votes
1answer
5k 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
110 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
55 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
26 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
487 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
26 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
89 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
44 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
63 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
474 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
81 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
220 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
89 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
36 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
281 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
316 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
395 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
77 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
183 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
183 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
66 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
198 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
340 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
927 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
838 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
164 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
125 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
176 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
693 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
820 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
136 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
485 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
329 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
221 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 ...