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
0
votes
0answers
17 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
0answers
24 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
19 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
22 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
33 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
59 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......
0
votes
0answers
37 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 ...
1
vote
1answer
75 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 ...
0
votes
0answers
20 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 ...
0
votes
0answers
35 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 ...
0
votes
0answers
26 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 - ...
1
vote
1answer
72 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.
3
votes
1answer
145 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
88 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
41 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 ...
0
votes
1answer
92 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
154 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
52 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
131 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
225 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
517 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
496 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
85 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
102 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
109 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
428 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
543 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
100 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
269 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
212 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
1answer
121 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
163 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
48 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
163 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
45 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 ...
0
votes
1answer
433 views

How to get items from both master and web Context in PowerShell Extensions without using Get-Item?

I want to get all the items from both master and web database using Find-Item cmdlet and run in one Powershell script. I'd also rather not use Get-Item cmdlet for performance reasons. Any inputs will ...
0
votes
1answer
194 views

How to save a file with a custom name using Show-ListView function?

I want to save a file with a custom name while using Show-ListView function. Right now, when I am trying to save the file it is returning in this format "report-2019-02-25_095656.csv". This is the ...
0
votes
0answers
183 views

How to replace an item with another item by ID in Treelist field using Powershell?

I want to replace an item with another item in a Treelist. Basically, the items I want to replace are broken links. Suppose, There are two items A and B. A is used in a Treelist field, so I want to ...
0
votes
1answer
418 views

Error while running Uninstall-SitecoreConfiguration SIF method

I'm trying to use SIF 2.0 to uninstall a no longer used Sitecore 9.1 instance. This method used to work perfectly with previous versions and I know that for sure since I'm quite a hard user. I don'...
3
votes
1answer
400 views

Is it good to update item values in web database in sitecore?

We have to remove one rendering from multiple pages across the site. For that we have created a Powershell script to delete the rendering. Can we run the same powershell script directly on web db and ...
1
vote
2answers
112 views

Is it possible to edit items via SIF

Installing Sitecore Commerce 9.0.3 with adjusted URLs (changing everything localhost), I made adjustments to the installation process with SIF. For example, I fix the localhost URLs in the Sitecore....
0
votes
1answer
114 views

PowerShell exception at Receive-File dialog

I have a PowerShell code like this Import-Function Validate-PowerShell Test-PowerShell Try { $ctx = get-item . Import-Function Import-RedirectMappings $file = Receive-File (get-item "...
0
votes
2answers
252 views

Powershell script to update displayname error

When I try to update the display name of the item am getting the following error. Please let me know how to fix this? Working Please wait, working... unlike you! 'DisplayName' ...
4
votes
3answers
866 views

Sitecore 9.1 Installation Error

The installation for Sitecore 9.1.0 is stuck at step number 50. This is what I get in the System Event Logs as 3 separate errors. Errors were encountered in the procedure 'dbo....
4
votes
4answers
852 views

Powershell Script to update Date

I would like to know how to update date field from CSV file.Attached the code while debugging I can able to publish date is updated but its not visible in Content tree. script: $currentItem.Editing....
5
votes
1answer
257 views

Add Placeholder To Presentation Details Using Sitecore Powershell

I'm attempting to use Sitecore Powershell Extensions to automate Step 2 of the following upgrade guide for a Sitecore accelerator known as SCORE: https://brainjocks.atlassian.net/wiki/spaces/SDD/...
4
votes
2answers
1k views

How to copy multiple items to a new location

Got over 200 items in various folders in one location that would like to copy to a new location while retaining the same folder structure. Each item has more than one version and would like to retain ...
1
vote
1answer
593 views

Reading a CSV file from media library through power shell script

This is working fine $global:ProductPath = "/sitecore/content/Home/Content_Pages/ " $csv = Import-CSV "C:\inetpub\wwwroot\mysample\Book1.csv" $bulk = New-Object "Sitecore.Data.BulkUpdateContext" try ...
2
votes
1answer
695 views

How to get detailed installation log while the update package is being installed remotely using SPE?

I'm using SPE to install the TDS .update package file. How do I get detailed installation log remotely in the script below? Current PowerShell Script: $SitecoreInstanceUri = "https://helixsite....