Questions tagged [powershell-extensions]

Anything related to the Sitecore PowerShell Extensions (SPE) module or general Windows PowerShell.

Filter by
Sorted by
Tagged with
0
votes
0answers
16 views

inserting tenant error sitecore 9.2 SXA 1.9

When I try inserting a tenant this error appears I tried reinstalling SXA but no difference happens CodeBeside class "Cognifide.PowerShell.SitecoreIntegrations.Applications.PowerShellRunner,...
0
votes
1answer
20 views

Show path instead of ID in link field result in SPE

I've modified one of the SPE 6.1.1 reports in 9.2 to add a column for a general link field, as our client wants to see which items have links and how old they are (based on the link location). But the ...
0
votes
1answer
46 views

Change field from General Link to Single line text and retain Text

I'm having a similar issue with the one described here: How to change item templates and retain existing data Template_Old Title General Link Template_New Title Single-line text My ...
3
votes
1answer
61 views

Getting the datasource of all components inside the page using SPE

I'm creating a script that would list down all the components in the a particular page then displays the RenderingItemName, RenderingItemID, RenderingItemPath, RenderingDatasource, etc., I found the ...
0
votes
0answers
36 views

Invoke-WebRequest throws Access is denied due to invalid credentials while accessing Sitecore EE URL in Powershell

I am trying to get Sitecore users' StartUrl (configured in Profile tab) in powershell and then supply it to Invoke-WebRequest in powershell to get the response status code for the StartUrl (to know if ...
0
votes
1answer
56 views

Executing Sitecore PowerShell script programmatically - Sitecore path not resolving

I am calling the powershell script programmatically using Sitecore Command.. ScriptSession.ExecuteScriptPart() ... Inside the script I have written following script: $settingItemId = "/sitecore/...
0
votes
1answer
37 views

Sitecore Powershell script for moving bunch of fields to template section

We are trying to refactor few of the Sitecore templates. We need some help with powershell script. Is there any way to pull bunch of fields (around 70-80) to different template sections. Manual pull ...
0
votes
0answers
38 views

Sitecore Powershell script for changing item template in all language versions

i want to change the item template in all language version and retain the data. I have tried this : $rootItem = Get-Item master:"/sitecore/content/home/" $sourceTemplate = Get-Item "{...
-1
votes
1answer
35 views

Copy data from en language version to other language version

I need to copy item field data from en language to all other available languagesin all versions. Any powershell script of achieving this.
0
votes
1answer
50 views

Unable to export query result to a file from Sitecore Powershell scirpt with Out-Download command

I have a simple powershell script which uses Out-Download command to export the query result to .xlsx file. However, it doesn't seem working. The same scenario as well if I used the download button ...
1
vote
1answer
146 views

Powershell script for fetching checklist field value

I would like to get checklist field value display name instead of raw values and would like to update its value based on display name. For example I have checklist field values : Test 1 Test 2 Based ...
2
votes
1answer
48 views

How do I query GraphQL using SPE?

How do I leverage SPE to query Solr via GraphQL?
0
votes
0answers
19 views

reorder or rearrange rendering using sitecore powershell [duplicate]

I want to change the position of renderings in the final layout using Sitecore PowerShell existing order headScript AccountDetails Confirmation CardValidation required order of renderings ...
1
vote
1answer
27 views

Get-Item behaving weird returns [PSCustomObject] instead of item but sometimes working fine as well

I am trying to get a media item using the below, most of the times it works perfectly fine for me, however sometimes the same Powershell returns [PSCustomObject], instead of the media item. Sometimes ...
2
votes
1answer
89 views

Getting unknown error while fetching media item using powershell sitecore

I was trying to get media item using media ID. I am getting the below error which I haven't faced before in powershell sitecore. Scenario $ImageId - {61630AC1F0E3111B9C50CEEE0B2B0223} I am using the ...
0
votes
1answer
32 views

Regex to Uncomment an image tag from the rich text editor field using Sitecore Powershell

What I am trying to achieve here is to fetch the HTML within a rich text editor and I need to uncomment all the img tags which are commented within that HTML. I don't want any other HTML code to get ...
1
vote
0answers
37 views

Sitecore Powershell SPE 5.1 “Could not validate access using the provided credentials” error

I have written the SPE powershell script in my local Sitecore 9.1.1 sandbox environment and trying to execute, it is asking session elevate privilege to enter credentials. Even though I am entering ...
0
votes
0answers
33 views

Moving parent item and create alias

I'm working on cleaning up sitecore items where i have bunch of items sitting under various nodes so what i'm trying to archive is to move all under single folder and create alias on the original path....
-1
votes
1answer
85 views

How to remove specific DIV tag from HTML value of a sitecore field using powershell

I want to remove the below tag from an HTML object containing the sitecore field value in the form of HTML. I want to remove this and set back the remaining HTML in the same field. <div class = &...
0
votes
1answer
33 views

SPE remoting throws error 'You cannot call a method on a null-valued expression.' on calling Invoke-RemoteScript

I installed Sitecore Powershell extension 5.1 on my sitecore 9.0.2 which is in azure PaaS. The imported SPE remoting module 5.1 to my windows powershell(5.1) on my local machine. I enabled remoting ...
0
votes
0answers
25 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
64 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.
0
votes
0answers
46 views

SXA Creative Exchange Import triggered via SPE not working

I was trying to set up a CI/CD according to the documentation, where I planned to trigger a Creative Exchange Import via Sitecore Powershell Extensions Web Api. https://doc.sitecore.com/developers/...
1
vote
1answer
23 views

Sorting Decimals in Show-ListView

I'm wondering how one would sort a column of decimal or currency values numerically in show-listview? A contrived example: $decimalArray = 1.1, 2.2, 3.3, 10.0, 20.0, 30.0 $props = @{ Title =...
0
votes
0answers
27 views

Can we copy entire master DB from staging to Dev using sitecore Powershell?

I am curious to know any such commands or way to copy master DB from one sitecore environment to another ? I have a clue of using Copy-Item however I don't have much idea on that.
0
votes
0answers
54 views

Powershell script runtime error when clicking navigate/export excel button in showlistview result

I am using Powershell to generate a report using show-listview but sometimes when the user clicks the excel report or navigation button in the result window it's showing a runtime error. I have ...
3
votes
1answer
120 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
0
votes
1answer
36 views

SXA Missing Variants in a cloned rendering

i followed the documentation https://doc.sitecore.com/developers/sxa/93/sitecore-experience-accelerator/en/copy-and-customize-a-rendering.html and cloned a Page Content rendering. The script finished, ...
0
votes
0answers
120 views

Sitecore PowerShell 6.0 Console on Sitecore 9.3 does not work [duplicate]

I just installed Sitecore 9.3 Standalone XP locally. After rebuilding the link databases and indexes; I did install the Sitecore PowerShell 6.0 package. I could not make the PowerShell console work. ...
0
votes
0answers
39 views

How to delete specific saved Sitecore Forms entries using SPE

I'm using Sitecore 9.0.1 and using the default Save Data submit action on my form: There are many garbage entries due to test and bot submissions, and there isn't a way to delete any of the entries. ...
0
votes
0answers
10 views

Sitecore Powersheel elevated session through Active Directory single sign-on [duplicate]

I want to run some script through sitecore powershell extension but it gives me popup to login. We have currently configured Azure AD single signon for the environment so I dont know password for the ...
1
vote
1answer
68 views

Sitecore Forms CSV export not preserving new line characters from textarea input field

I've got a <textarea> set up in a Sitecore Form in which users can enter multi line inputs: When the value is saved to the database I notice that the breaks ARE preserved: If I copy the value ...
0
votes
1answer
66 views

Pass Variables to SPE Script from PowerShell via Remoting

I'm having trouble passing variables from a PowerShell script into a SPE Script. I'm attempting to call the SPE script from a PowerShell file on the file system. I'm trying to pass in variables that ...
0
votes
0answers
34 views

Override SXA Site Scaffolding

I'm aware of how to add additional items to site scaffolding via inserting items into a /sitecore/templates/Foundation/Experience Accelerator/Scaffolding/Roots/SiteSetupRoot template. I'm interested ...
1
vote
2answers
97 views

Sitecore Powershell Extension throws null-valued expression exception

On a fresh Windows VM I installed powershell extensions module: Install-Module SPE Then I am trying to invoke a remote script on my sitecore instance: $url = "https://my-sitecore.azurewebsites.net" ...
0
votes
1answer
39 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
75 views

Data Importer Module not working with PowerShell Extensions

I was trying to use the Data Importer to import a csv of data templates. I get the following error: New-Item : The type is not a known type for the file system. Only "file","directory" or "...
0
votes
0answers
77 views

Scheduled Task running through Sitecore Powershell extensions shows as running even when it completes

We are running a Scheduled Task manually through Sitecore PowerShell Extensions. The task runs for around 2-3 hours and completes successfully. But the Script window still shows as running even though ...
0
votes
1answer
74 views

Unable to find type in Sitecore Powershell Extensions script [closed]

We're looking to use a static function from a C# class we've written in a Powershell Extensions script. We have included our code as a dll in the bin directory of our Sitecore application, and have ...
1
vote
3answers
210 views

Updating Item media field with specific media Sitecore powershell script

I have 400 product items. Previously, we have a common thumbnail image for all products. Now, I added a new image field (thumbnail image), all products I need to assign a common specific thumbnail ...
1
vote
1answer
136 views

Get renderings data source location

How to get rendering data source location either any one of below, Get items final layout renderings with their data source location Get rendering data source location by specific Rendering folder ...
0
votes
0answers
113 views

Migrate some items from one database to another having same or slightly different templates

I need to migrate data from one database say migration DB to master database using powershell scripts. I have the migration database(client's database copy) .bak file of sitecore 8.2 and have ...
1
vote
1answer
135 views

SPE Remoting: Cannot perform operation because the runspace is not in the 'Opened' state. Current state of runspace is 'Closed'

SPE: 4.5.0.0 Sitecore: 8.2u3 I designed a script to remotely publish a series of item paths. Each path is iterated across each publishing target database. The net result is 8 individual remote ...
3
votes
0answers
243 views

Get-ItemReferrer : Object reference not set to an instance of an object

I am working on Sitecore PowerShell Extensions 5.0.0.42513 with Sitecore 9.0. I have started facing issue as Get-ItemReferrer : Object reference not set to an instance of an object Also shown below ...
5
votes
1answer
192 views

Performance issue with Sitecore Powershell Script

I am working on SPE (Sitecore.PowerShell.Extensions-5.1) with Sitecore 9.0.1 where I have one script which creates a report of items in approved workflow state. But the execution of the script is ...
0
votes
1answer
65 views

Sitecore Powershell Extension 5.1.0.19766 - debug tooltip tiny box

Sitecore PowerShell Extensions 5.1.0.19766 Sitecore 9.1 Windows PowerShell 5.1 I want to view the Objects during a debug process by hovering over the variable, object, array, etc., but only see a ...
0
votes
0answers
146 views

Identity Server + Sitecore Powershell: Non-admin cannot see scripts

I am using Sitecore 9.1 with Identity Server configured to authenticate users against Azure Active Directory. This works great and users can login with their azure accounts without issue. I have ...
3
votes
0answers
80 views

Get workflow history for an item by itemid in sitecore powershell extension - Sitecore 8.1

I need to create a report by Sitecore Powershell Extension where I need to include the details of "Workflow Approver" and "Date on which workflow approved". I have got the list of referring items for ...
3
votes
1answer
71 views

Report for Approved workflow state that are created/updated in last 30 day

I have to create a report via Sitecore Powershell where I have to fetch all items in Approved workflow state that are created/updated in last 30 days. I am getting the data but seems there are ...
0
votes
1answer
36 views

Update Allowed Controls in Placeholder [closed]

I need to update "Allowed Controls" field of placeholder using Sitecore Powershell. I have used below code - $contentPlaceholder = Get-Item -Path "master:/sitecore/layout/Placeholder Settings/main" $...

1
2 3 4 5 6