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
25
votes
1answer
740 views

How to package a Helix solution using powershell

Following the Helix modular architecture, my solution is divided into a large amount of separate projects. To deploy the solution as a single package, we need to package all assets, configuration ...
14
votes
1answer
473 views

Why does Register-SitecoreInstallExtension appear to do nothing?

I'm making my first attempt at extending SIF, and I don't seem to be able to register a new Task correctly. Can anyone suggest what I'm doing wrong here? I've create a new script commandlet. It has ...
8
votes
4answers
4k views

Installation Error - Cannot validate argument on parameter 'Source'

I am in process of installing Sitecore 9 using SIF. Everything went smooth but when running the Power shell script to install SIF, ended up with the error below: PS>TerminatingError(Invoke-CopyTask)...
6
votes
5answers
1k 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....
6
votes
3answers
806 views

SIF Installation throwing Password Validation Failed exception

We are trying to install Sitecore 9.0.1 rev 171219 (XP0) on-premise. Everything goes fine until it tries to create Sitecore.Messaging Database. As the installation have already created ...
5
votes
1answer
2k views

How to install zip file package from Installation Wizard using Powershell DSC?

I am trying to automate installing a "zip" package files from Sitecore's installation wizard. But I'm unable to work out how to allow an automation using PowerShell DSC to log in and trigger the ...
5
votes
3answers
4k views

Certificate does not contain Private Key exception while executing Sitecore 9 installation script on Windows 2012 R2

I am trying to install Sitecore 9 on Windows Server 2012 R2. There were some issues while executing Sitecore 9 installation script using SIF related to create self signed certificate for xConnect. ...
5
votes
1answer
316 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
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 ...
4
votes
1answer
812 views

Commerce PowerShell Error SQL Provider is not installed

HI I'm trying to install Sitecore Experience Commerce and got this PowerShell message I tried the steps below to install this SQL for PowerShell but I still got the error message below https://docs....
4
votes
2answers
2k 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 ...
4
votes
2answers
2k views

Creating new items using powershell from csv

I want to know is there any way to create new items in sitecore using the powershell with data from excel sheet
4
votes
1answer
523 views

Sidekick Error on Sitecore and/or PowerShell

Hope someone could help me with the following issue on Sidekick Migration Tool. I'll explain exactly the steps I did to set-up and configure Sidekick on two Sitecore instances, both on the same ...
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
4
votes
3answers
1k 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....
3
votes
3answers
809 views

New-SCWebDeployPackage is not recognized

I'm trying to package a Sitecore solution and followed the instructions mentioned in the following URLs. https://doc.sitecore.net/cloud/working_with_sitecore_azure/configuring_sitecore_azure/...
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-...
3
votes
1answer
471 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 ...
3
votes
3answers
349 views

How can I change already created items to be under my newly created workflow?

Could Some one help me updating the workflow and workflow state field for all the sub items under the item say sitecore/content/ParentItem . I have created a new workflow and set it up in standard ...
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 -------...
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 ...
3
votes
1answer
151 views

Size Limit Error when deploying my Sitecore solution

I installed Sitecore 9.0 in my local machine and migrated Sitecore 8.0 to the local Sitecore 9. The migrated Sitecore 9.0 is working without any issue. While I'm working on packaging local Sitecore ...
3
votes
1answer
253 views

Script is not reading Workflow field on some item versions

I have a script that loops through items with a certain name, then loops through the versions of that item and checks the workflow standard fields (__Workflow, __Workflow state, etc). The goal of the ...
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 { $_....
2
votes
3answers
2k views

Running PowerShell scripts without using Sitecore PowerShell Extensions module

We are facing some issues with Lucene during installation of PowerShell Extensions module (SPE). Is there any option to run Sitecore scripts from Windows PowerShell? I mean that I will just add ...
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
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?
2
votes
1answer
326 views

Getting “Could not access network location SC_SQL_SERVER_USER” while installing Sitecore using Powershell DSC

I am trying to install Sitecore using PowerShell DSC following below link https://jermdavis.wordpress.com/2015/11/09/development-environments-with-powershell-dsc-part-5/ I am getting "Could not ...
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 ...
2
votes
1answer
809 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....
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 ...
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.
2
votes
2answers
464 views

Solr Installation error : NativeCommandError

I am setting up the Solr 6.6.2 with SSL for Sitecore 9 installation on one of the new development machine. I am following the Kam Figy PS script : https://gist.github.com/kamsar/...
2
votes
1answer
3k views

Error message “Cannot bind parameter 'Uri'. Cannot convert value” when trying to install update package via PowerShell DSC

I am trying to install .update file with instructions provided by davis from previous post How to install zip file package from Installation Wizard using Powershell DSC? I am using another developer'...
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 ...
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
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
vote
3answers
2k views

Sitecore Commerce Installation error 503 service unavailable

I am trying to install Sitecore Commerce with following version details: Sitecore 9.0.2 rev. 180604 (OnPrem)_single.scwdp Solr 6.6.3 SQL Server 2016 Express (13.0.4001) Sitecore.Commerce.2018.03-2.1....
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
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
739 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 ...
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
1answer
10k views

The property 'Name' cannot be found on this object. Verify that the property exists

While running the script on powershell (admin) as `Register-PSRepository -Name SitecoreGallery -SourceLocation https://sitecore.myget.org/F/sc-...
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
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
vote
1answer
418 views

How to change template for multiple items

There are many PDF files in our project that are manually added to the media library. I see that some of them have the template - /sitecore/templates/System/Media/Versioned/Pdf and some others - /...
1
vote
1answer
430 views

Sitecore PowerShell Extensions Remoting variables not working in Octopus Deploy

I'm having issues with variables when using SPE Remoting with OctopusDeploy, where method-local variables can't be used. I get this error The value of the using variable '$using:propertyTableKey' ...
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
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
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 ...