Questions tagged [powershell-extensions]

Anything related to the Sitecore PowerShell Extensions (SPE) module

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

Get Item current language doesn't work for the multiple language sitecore instance [closed]

I have multiple languages from my instance but when i change the language and preview to download the file it fetches the data from English language and not the specified language.
3 votes
2 answers
39 views

How to set Analytics Tracking Event as download using Sitecore Powershell script

I'm trying to set Analytics Tracking Event as Download using Sitecore PowerShell script for most media items which have pdf extension. like this: Below is the script, I have written but not working $...
1 vote
0 answers
29 views

How to inspect vars / persist value tooltip window in PowerShell ISE?

After running a script in Sitecore PowerShell Extensions version 6.4.0.16859, I can hover over a variable to inspect its contents. However, it contains values that overflow out of my screen. I would ...
0 votes
0 answers
40 views

does publish-item powershell command fire publish end event and can we get property like rootItem

$singleitem=get-childItem -path $RootItemPath -Language "en" -Recurse | Where {$_.TemplateName -eq "TEST"} | Select-Object -first 1 publish-item -Item $singleitem -publishmode ...
0 votes
0 answers
53 views

403 IP Forbidden error when running a Sitecore Powershell Extensions remoting script in Azure Pipelines

I am trying to install a Sitecore package through Azure Pipeline using Sitecore PowerShell Remoting. The reference article that I followed. https://jakubwajs.wordpress.com/2020/09/22/running-sitecore-...
  • 1
0 votes
1 answer
30 views

Downloading a list of fields in SPE producing a separate file for each field

Goal: Download a CSV containing the fields on an item using SPE, including columns for name and type. Issue: When I try the code below, I get a separate file for each field, rather than a single CSV. $...
  • 1,912
0 votes
2 answers
61 views

Export all Redirect Maps

Is there a way to export all redirect maps via a PowerShell script or a simple GUI in Sitecore that I am missing? I want a list of them all - don't care about the formatting as long as I can make ...
1 vote
1 answer
200 views

PowerShell special characters encoding

I've built a PS script to create and populate items from a CSV file. The issue is that chars like ä, ü, ö are replaced with � in the field values. I've changed the encoding from ConvertToDynamicObject(...
  • 229
0 votes
0 answers
27 views

Issue while downloading multiple files with Send-File command

Sitecore PowerShell Extensions 6.2.0.29687 Sitecore 10.1 Windows PowerShell 5.1 What I am trying to do: I have filtered out a few files based on certain conditions. So, I have filtered out the files ...
  • 1,268
1 vote
3 answers
430 views

Powershell script to get the list of items created/modified on particular day

We would like to pass the particular day and get the list of items changed on that day. Do we have any PowerShell script for that?
  • 309
0 votes
0 answers
30 views

Invoke-RemoteScript : Server response: The specified script is invalid. SPE

while running below script I'm getting error saying in valid script, not sure what the issue is. Script: Clear-Host Import-Module -Name SPE -Force $session = New-ScriptSession -Username admin -...
0 votes
1 answer
101 views

How to execute sitecore command through powershell script

I have a requirement that I have a button on the Ribbon like "Generate". If the Content author clicks on this Generate button, through Sitecore Command we are making some API calls, and ...
  • 65
1 vote
1 answer
226 views

How do you get JSON data from an item stored in the media library?

master:\media library\item-name contains a JSON file. Get-Item gets the item itself but I am unable to extract the JSON content with ConvertFrom-Json. In PowerShell outside of Sitecore Powershell ...
  • 157
0 votes
0 answers
62 views

Error while creating SXA Site in Sitecore SXA

I have installed vanilla Sitecore instance 9.1 Initial release. After that installed Sitecore Powershell 5.0 was followed by SXA 1.9. I'm trying to create a tenant or site to set up a local site ...
2 votes
1 answer
72 views

Sitecore PowerShell script issue when added script to reporting tool

I have an issue with my Sitecore PowerShell script. It runs without errors and returns the expected result when I test it in PowerShell ISE. But when I add exactly the same script to PSE reports and ...
  • 21
0 votes
0 answers
37 views

Powershell Workflow Action Not Executing from Desktop

If I start in Launchpad and open Content Editor, and from there edit a page in Experience Editor, then I can promote the page through workflow and all actions execute fine. If I start in Desktop and ...
1 vote
1 answer
133 views

How to Find the unique rendering ID for a placeholder

We are currently upgrading a site from 8X to 10.2. We are trying to change the dynamic placeholders as per 10.2. But 8.2 dynamic placeholders are of format- /a/b_1/c_1, /a/b_1/c_2, /a/b_2/c_3. We ...
3 votes
1 answer
89 views

Moving images to another folder Powershell

I am trying to move images from one folder to another. The images folder contains like 1000 images. i want to move the first 100 images to one folder the other 100 images to another folder and the ...
  • 113
1 vote
3 answers
97 views

Unable to read Rendering Parameters template fields using powershell

There is a page template called X being used to create a number of pages. There are two renderings A and B being used on many pages that created from X page template. Now I want to set the one ...
1 vote
1 answer
80 views

How to take item package of particular time period using Sitecore Powershell?

We are working on Sitecore Upgrade and would like to merge the item changes for the particular period. If we try to use item dynamic package, it is taking longer time and timed out somewhere. Is there ...
  • 309
2 votes
2 answers
64 views

How to fetch items that have not completed workflow, using powershell script

Using sitecore 10.0.1 Currently, I want to move items under a path, to "Approve" workflow. So how to fetch items that are not in approved state and change them to "Approved" ...
  • 25
3 votes
3 answers
134 views

PowerShell Elevate Session State on XM Cloud

How can I perform an Elevate Session State in Sitecore PowerShell ISE on XM Cloud running in local container? On the Elevate Session State, I need to "Enter your credentials to validate access to ...
  • 1,155
1 vote
1 answer
49 views

Read-Variable inside listview?

I have a listview of various items and I would want there to be a dropdown box in the listview that lets the user change one of the items results. Is this possible? I am trying to set a property that ...
  • 13
0 votes
2 answers
113 views

How to read Item's media field properties using SPE

I have an item where we have a "Article Thumbnail" field(Media type) and an image is inserted from Media Library. Now I need to check for Alt text in Item's media properties. I am trying ...
1 vote
2 answers
104 views

Getting the datasource Location of all Renderings 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., The script ...
  • 11
0 votes
1 answer
64 views

how to set an item Image field

Using Sitecore PowerShell Extensions I can set an item's text properties but an Image property cannot be set: In the screenshot above, setting the Title property worked but none of the attempts at ...
  • 157
0 votes
1 answer
71 views

Get users from 7.2 - throwing error in Sitecore PowerShell

I am using 7.2 Sitecore version. There I need to fetch users using PowerShell script. I have tried multiple combinations or filters to run for instance - Get-User -Filter * I get an error saying - ...
  • 27
0 votes
1 answer
74 views

Sitecore PowerShell Select item at Show-ListView has no delete action

I need to find media items that has no references, but user should have an option to delete them manually . by some reason, if I add an item to custom noRefeItems, Show-ListView component does not ...
0 votes
1 answer
146 views

Sitecore Powershell to change Sitecore Item Fields Value by CSV File [duplicate]

How to change Sitecore Item field value by csv file with Sitecore PowerShell script . As I have a Title property to be change for thousand of items in Sitecore Media Library. So I want to export ...
0 votes
2 answers
170 views

Sitecore powershell script to change WorkFlow Status to Approved from particular node

How to write sitecore powershell script to change WorkFlow status to Approved from particular Media Library Folder. I have multiple documents to replace in bulk in Sitecore Media Library and have ...
1 vote
4 answers
600 views

Get link details in powershell script

I would like to get all the links details inside teaser ,richtext editor components etc through Powershell script. Is it possible through Powershell script ?
  • 339
0 votes
1 answer
77 views

Can I disable dates before mm/dd/yyyy on the Read-variable dialog?

The official SPE docs does not provide the available option parameters for every field type on the Read-Variable command, so I’m curious if it is possible to block of dates before a set date on a date ...
  • 357
1 vote
1 answer
87 views

Copying Renderings , Final renderings for multiple items using powershell fails randomnly on few items

We have set Presentation Details on template's Standard Values. I dont want these standard value renderings in my existing page, as we have correct renderings in existing pages and I want this ...
1 vote
3 answers
164 views

How to get media library item names in csv which has file extension .pdf, .doc and .xls?

I am looking for a solution to list items in the media library with file extensions pdf, doc, and xls followed by exporting to a csv.
1 vote
1 answer
562 views

Azure Command not working in PowerShell module with Sitecore 9.3

Trying to upload a CSV to Blob. Using Sitecore 9.3. Sitecore PowerShell module is throwing the below error: New-AzStorageContext : The term 'New-AzStorageContext' is not recognized as the name of a ...
  • 477
0 votes
1 answer
80 views

PowerShell script to alter item security inheritance

I am working on SPE code to set user permissions for a specific tree item. $role = "Michael" $path = "master:\content\home\distributors\a-b\Austria" $acl1 = New-ItemAcl -...
0 votes
2 answers
120 views

Need to authorize email sending with API instead of SMTP

Security policy is requiring us to update passwords regularly, and this includes service accounts previously in use for services such as SMTP from our web servers. We are looking to use the Gmail API (...
  • 11
0 votes
1 answer
45 views

Scheduled LinkDB rebuid | Success completion

I have used Sitecore scheduler to schedule a Powershell task. The task rebuilds the Link databases of Master and Core. As the tasks are long-running, I am running them as Async. So in the logs, we ...
  • 1,268
1 vote
1 answer
133 views

Sitecore PowerShell Remoting: how to

Environment details: Sitecore 10 Azure PAAS hosting I am trying to automate a few things in an already running Sitecore set-up. For that, I wanted to utilize Sitecore Powershell remoting. I have gone ...
  • 1,268
0 votes
1 answer
127 views

Sitecore PowerShell session issue: a script needs to be executed in the session

I am running a script and I am using loop concept to get certain data. But a session timeout error was encountered during the script execution and the script stopped running. Issue: A script needs to ...
0 votes
1 answer
44 views

Overwritten Sitecore Powershell Default Module Get-Rendering, How to recover the script block

I was creating custom functions using Sitecore Powershell script. I accidentally gave the custom function a name similar to the Sitecore function (say Get-Rendering). The default function script block ...
0 votes
1 answer
69 views

Retrieving "p:after" in layout via Sitecore Powershell Extentions

I am trying to retrieve these values found in the "final renderings" field: p:after and p:before. But I can't seem to find them anywhere. Is there a way to get them out? The reason I need ...
  • 120
0 votes
2 answers
449 views

How can I count all existing versions of an item in Sitecore Powershell Extensions?

When I go to the content editor I can see that the Home item has 81 versions, but when I'm counting its versions in Sitecore Powershell Extensions I'm getting 79 versions as a result. What am I doing ...
0 votes
1 answer
49 views

Is it possible to achieve Sitecore item version? [duplicate]

I want to archive Sitecore item version and not the entire item using Powershell script. I could not find the way to archive version, articles are there to archive item but not the specific version. ...
  • 3
0 votes
2 answers
252 views

Access the database by connection string

Context: I am trying to automate a few steps in the existing Sitecore 10.1.1 environment using Sitecore PowerShell. Problem: We have a command Get-Database to access the database either by providing ...
  • 1,268
0 votes
1 answer
162 views

How to take content item package with all referenced items using Sitecore Powershell?

I would like to create package of one single content item using Sitecore PowerShell Extensions. While creating the package, I would like to include all the referenced items in the package. Is there ...
  • 309
1 vote
1 answer
97 views

Sitecore Powershell Test-Account -Identity breaks with email as username

I am in need to iterate through a list of emails (that happen to be username in Sitecore CMS) and then remove the users. I would like to have an "if" statement to see if account is present ...
  • 117
1 vote
1 answer
159 views

How To Upload File To Remote Sitecore Instance Via Web Request

I am attempting to upload a PDF file to Sitecore as a single web request and have it added to the media library. I would like to choose a parent folder and have all requests generate a PDF at that ...
  • 4,811
0 votes
2 answers
132 views

How to take list of http:// or https:// link referenced in our Sitecore content tree using Sitecore Powershell?

I would like to take a list of external links (http:// or https://) referenced in our website from our Sitecore content tree. I need to compare with all Sitecore Fields(Rich text, general link, single ...
  • 309
0 votes
2 answers
197 views

How to add new version before updating the field values using Sitecore Powershell?

I have to update field values to a particular item. Instead of changing the item's final version, I would like to create a new version and do my updates. For ex: if en(v2) is the latest, I need to ...
  • 309

1
2 3 4 5
9