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
22 views
0
votes
1answer
33 views

Field Audit Report [closed]

I am new to Sitecore Powershell Extension. I am trying to create a report for our company to audit all existing fields in our current Sitecore installation. How would you write a script to have the ...
0
votes
0answers
21 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
29 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
31 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
38 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
32 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
24 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
2answers
35 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
52 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
49 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 ...
0
votes
1answer
27 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
74 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
119 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
35 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
32 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
45 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
61 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
29 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" $...
0
votes
2answers
42 views

new-using block with remove-itemversion

While learning about Remove-ItemVersion, I came across below piece of code - New-UsingBlock(New-Object Sitecore.Data.Events.EventDisabler) { Remove-ItemVersion -Path master:\content\home -...
1
vote
1answer
69 views

Remove duplicate items from an array of items

I need to create an array of templates that refer to a particular rendering. In some templates, renderings are placed twice. So, array contains 2 copies of same templates. What is the sitecore ...
3
votes
1answer
47 views

What is the SPE equivalent of “Revert Tree”?

What is the SPE equivalent of "Revert Tree"? I've attempted the following: $config = [Sitecore.Configuration.Factory]::GetConfiguration(); $dataFolderPath = ($config.sitecore."sc.variable" | ?{ $_....
1
vote
0answers
38 views

Pagination on Update-ListView

I have written a PowerShell script as an action to delete selected items in the list view. The issue is - when I delete an item on any page other than the first one, after deletion, update-listview ...
2
votes
1answer
168 views

Sitecore Powershell Script to Delete All Items in Results

I need to delete all the items present in the list view on the click of the "delete all" action button. I am running the script - foreach($selectedItem in $allData) { $item = Get-Item -Path ...
0
votes
1answer
69 views

Sitecore powershell script to delete selected items from results

Below is the Sitecore Powershell Script to delete selected items from Powershell script result - foreach($Item in $selectedData) { if($Item -ne $null) { $Item | Remove-Item } } ...
0
votes
1answer
46 views

Fixing media items with wrong extension

There have been some suspect manipulations in our media library (for example, detaching and reattaching of images), such that we now have images in our library which are linked to the wrong template. ...
3
votes
1answer
168 views

Sitecore Powershell script to add items in array

I am a Sitecore PowerShell newbie. I have to write a Sitecore PowerShell script to ignore certain items from consideration based on their template types. For this we can add these items to an array ...
1
vote
3answers
164 views

Sitecore Powershell skip items in System Folder

I am a powershell newbie. I have to write a Sitecore Powershell script where I need to check all the templates for a particular value. But I need to ignore templates inside /sitecore/templates/System/ ...
6
votes
2answers
268 views

Compare items between two instances

We upgraded Sitecore 8.2 project to 9.1. Upgrade took around 1 month to finish and during this period, authors created/updated some items in old instance and they didn't make a note of those items. ...
3
votes
2answers
187 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
0answers
24 views

Get-RenderingParameter is not recognized as a name of a cmdlet

I'm writing a script to exchange a rendering component with a new rendering component, but it should keep all of the same rendering parameters. I followed the documentation to use Get-...
2
votes
1answer
44 views

Use Set-ItemTemplate to fix an item with a missing template

Is there way to use Set-ItemTemplate to fix an item with a broken (deleted) template? I'm trying the following script but get a null reference error $item = Get-Item -Path master: -Query "/sitecore/...
0
votes
1answer
51 views

Out-Download access denied to user anonymous

I have a custom SPE script that is executed from the Reporting Tools on the Sitecore start menu. The script writes a csv file to the app_data\temp directory, then calls Get-Item $filePath | Out-...
0
votes
0answers
24 views

Export/download options for custom roles is hidden in power-shell script results

I have created a custom role for some users which can access some reports. Although the users under the specified role can access and execute the reports and get result window what they lack is the ...
2
votes
0answers
58 views

Unable to get xDB reports using Sitecore Powershell

I am trying to get the Page URL visits which we get from Experience Analytics dashboard using Powershell. Below screenshot specifies the data i am trying to access using Powershell. I found a link ...
0
votes
1answer
39 views

How to use Receive-ItemCloneNotification in SPE?

I have items that have clone notifications. Now I want to accept the changes using SPE. Can someone teach me how to use Receive-ItemCloneNotification? Can't see any articles that explain it. Thanks!...
4
votes
1answer
76 views

Delete all items which names start with “old_”

I want to delete all images under the folder Images and all sub-folders too. This is what I did $path ="master:\sitecore\media library\images" $items = Get-ChildItem -Path $path -Recurse ForEach ($...
4
votes
2answers
320 views

Using Powershell Extensions to remove empty <p> tags from all rich text fields

I need to remove empty <p> tags from all rich text fields in the content tree: <p>&nbsp;</p> I've done nothing myself with Sitecore Powershell Extensions so far, so I am not ...
3
votes
1answer
334 views

Error in Sitecore 9.2 and SXA 1.9 - Could not load type “Sitecore.Jobs.Job” when creating new Tenant

To replicate: Download and install Sitecore 9.2 Initial Release using "Graphical setup package for XP Single" option, which will install Sitecore.NET 9.2.0 (rev. 002893) Download "Sitecore Experience ...
0
votes
0answers
26 views

Sitecore powershell Extension new site “context” => Azure authentication

I've installed the powershell Extensions on my 9.0 update 2 and we are using Azure Ad authentication login. And now my users have some problems that they can't switch between preview und edit mode in ...
0
votes
1answer
42 views

Error with PowerShell Extension dependency Microsoft.Management.Infrastructure

I've installed Sitecore Powershell Extensions version 5.0 on Sitecore 8.2 update 7, I also installed Microsoft.Management.Infrastructure as it was a dependency. I installed this library through NuGet ...
1
vote
0answers
37 views

Session Elevation options when using Federated Authentication

When I want to excecute a powerhsel Script in sitecore 9 update 2 with SPE 5 I get the following authentication Dialog. But I am using Azure Federated Authentication Login to log in into sitecore. ...
3
votes
1answer
248 views

Sitecore PowerShell script to get all images where the File Path is empty

I'm writing a Sitecore PowerShell script to get all images (without their Media Folders) under the path master:\sitecore\media library, where the File Path in the Media section is empty, like the ...
0
votes
0answers
32 views

SPE Add-Rendering - Cannot bind parameter 'Instance' [duplicate]

I'm new to SPE and during one of my tests I'm facing the following error message when trying to add a rendering to an existing item: Add-Rendering : Cannot bind parameter 'Instance'. Cannot convert ...
3
votes
0answers
53 views

Is it possible to install PowerShell Module for Sitecore and SPE Remoting module remotely?

Is it possible to install the PowerShell Module for Sitecore and SPE Remoting module remotely? I'm wondering if it is possible to install it via ansible to a new Sitecore instance and then remotely ...
2
votes
1answer
81 views

The current user does not have write access to this item. User: sitecore\virtualssuser

I'm getting this error while running a powershell extension script in Sitecore. Here's a simple version of the script. $allContent = Get-ChildItem -Path "/sitecore/content/Website/Home" -Recurse ...
0
votes
0answers
26 views

Powershell script modifies My Toolbar when users are created but an hour later it's reset to default

I've gotten help here to implement a custom My Toolbar every time a new user is created: Run powershell script when new user is created. However, although this works initially when I first log in as ...
3
votes
1answer
56 views

How to get to know how many words are there in a Sitecore Content Item

I am looking to get to know about how many words and characters are there in a particular Content Item using Sitecore powershell. I know how to do it for a file. for ex: Get-Content C:\testfile.txt | ...
0
votes
3answers
481 views

Sitecore Powershell Extensions for Sitecore 9.2 [duplicate]

I ran into a problem installing SXA (Sitecore Experience Accelerator) 1.8 on a new Sitecore 9.2 instance. The problem is with SPE. The latest version of SPE on Marketplace is 5.0
3
votes
1answer
71 views

Reset-ItemField failing silently

I'm (trying to) using Reset-ItemField to remove broken workflow links. While no error is shown in the console, the relevant fields are not changed. $counter = 0 Get-Item -Path :master -Query "/...

1 2 3 4 5