Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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

0
votes
0answers
10 views

Displaying item title data using Show-ListView

I have a fairly simple report built to pull all of the items in a bucket... $items = Get-ChildItem $path -Recurse $items | Show-ListView -Property ID, Name, DisplayName, @{Label="Path"; Expression={...
0
votes
0answers
22 views

Sitecore PowerShell RemoveLinks() using Broken Links Report

I am currently using the Sitecore Powershell Broken Links Report to find and delete broken links. Using the Broken Links Report, I have been able to locate the broken links. I can't seem to delete ...
2
votes
1answer
55 views

SPE to Unlock all items locked by a specific user

Is there a quick way to unlock all the items locked by a specific user from an admin account?
1
vote
1answer
21 views

Negate the criteria filter in Sitecore Powershell Find-Item call?

I'm trying to find all items in Sitecore where a particular field ("ShortTitle") is blank. I have the following call working to Sitecore Powershell Extensions's (SPE) Find-Item, but there doesn't seem ...
5
votes
1answer
50 views

Broken Links Report Options Powershell vs. Fast Query?

I am currently trying to find and delete broken links in the Sitecore master database. I am using a version of this script. The problem I am having is that the number of items in the content tree is ...
3
votes
0answers
26 views

ShowFieldEditor on a media item detaching media

I have a simple script that we're running, where a content editor has bulk uploaded media and they want to go back through and provide attribution to the images (caption, alt text, photo credit) and ...
0
votes
1answer
26 views

New-ItemClone Error through SPE

I recently tried using New-ItemClone command on SPE and encountered this error: System.AggregateException,Cognifide.PowerShell.Commandlets.Data.Clones.NewItemCloneCommand These are the codes used: ...
7
votes
1answer
93 views

SPE How to add multiple items to package source

I'm writing a SPE script to package up all unused media library items under a specific folder (prior to deletion). I've found New-Package and New-ItemSource methods and know how to use them (to some ...
0
votes
0answers
19 views

Getting Document moved error while running remote powershell script in Sitecore 9.0 update 1 PAAS

I am trying to run Sitecore powershell script remotely using below script Import-Module -Name SPE $session = New-ScriptSession -Username $userName -Password $password -ConnectionUri $uri Invoke-...
1
vote
0answers
62 views

Sitecore Commerce 9 Update 1 Installation Issue with SPE 4.7.2

I tried to install Sitecore Commerce using PowerShell script but I got the error that resource is not found for Sitecore PowerShell Extensions 4.7.2 although I have this zip package for Sitecore 9 ...
1
vote
1answer
38 views

Type or namespace 'ProxyManager' does not exist in the namespace 'Sitecore.Data.Proxies'

I've recently downloaded the source codes for Sitecore Powershell Extensions from GitHub and I've updated the Sitecore references to use the Sitecore 9 Nuget references. After doing so, I've found ...
0
votes
2answers
46 views

Improving queries performance

I have a script that goes and queries a string from a field box. Issue: This script takes too long! How can I improve the time to get results? Set-Location master: Get-ChildItem -Path "master:\\...
2
votes
3answers
371 views

Sitecore Powershell Script to find all the items with Personalizations defined

I need to find all the items that has personalization defined on the layout definitions using a Sitecore Powershell Extensions script.
2
votes
2answers
37 views

Set accessor for property “Proxy” unavailable - Sitecore PowerShell Extensions

I have been recently started working with Sitecore and Sitecore PowerShell Extensions, but have been struggling for a while. On my local clean instance of Sitecore, I have installed the SPE package ...
8
votes
1answer
95 views

Upgrade path from Integrated Dynamic Placeholders to Sitecore 9 Dynamic Placeholders (OOTB)

Does anyone have a SPE script that could be used to upgrade the rendering parameters of existing content to the new dynamic placeholder style required for Sitecore 9 Dynamic placeholders? We used to ...
0
votes
1answer
104 views

Sitecore Powershell Script to find publish history for a particular date

Is it possible find all the items published on a given date along with Published user , published Date and time using sitecore powershell ?
2
votes
2answers
42 views

Export component list in Sitecore master db with PowerShell

I am curious to know if it is possible to export Sitecore master db using PowerShell to a csv or to PowerBI? I am exploring possibility to get information for a given UI component (e.g. “large hero”)...
2
votes
0answers
83 views

Show-ListView called from action script display columns from parent Show-ListView

We're using Sitecore PowerShell Extensions to generate some reports. We have a problem when calling "Show-ListView" from the "Actions" script that is in the parent "Show-ListView" result. Looks ...
0
votes
1answer
63 views

Getting Error 403 from Server “Forbidden” during uploading File to Sitecore

i know that my question is similar to other questions here, but i think i have a different scenario. I'm trying to upload some css files to sitecore (in my case Sc 9.0.1) by calling this url using ...
1
vote
1answer
40 views

SPE Remote Script Call Nullreference Exception

Situation I'm trying to use the SPE Web API to call a simple script to publish 1 single item from gulp (in SXA Theme). The script URL call looks like this: /-/script/v2/master/PublishItem?user=...
0
votes
1answer
23 views

Bulkupdate change language for source folder

I am running power shell script to bind treelist data in both language english & french.even if i change language am getting only English content in french .please review my script and let me know ...
0
votes
2answers
58 views

Powershell Script error

I am trying to import csv file to content data via power shell script.am getting following error message New-UsingBlock : Item '/sitecore/content/Web3/Content Shared Folder/Property Page' is ...
2
votes
3answers
202 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 ...
0
votes
0answers
176 views

SXA Import Failed Value cannot be null. Parameter name: source

I am using Sitecore 9.0 Updated 1 and Install Sitecore Experience Accelerator 1.6 rev. 180103 in my Sitecore instance. Now Working in SXA we have created dummy site and Export the site to add one new ...
0
votes
1answer
125 views

Is there any way to tell when an item revision was published using PowerShell Extensions? [duplicate]

Is there any way to tell when a particular revision of an item, or version, got published? I can see standard fields for created and edited date-time, but publishing copies these fields to the web DB. ...
4
votes
3answers
345 views

Update fields using Sitecore Powershell Extensions

I'm using the following script to update a specific field in all the children of the item right-clicked in my content tree. It works but the update is not applied to the item clicked with my context ...
0
votes
0answers
47 views

PowerShell find-item doesn't return values

I'm currently using find-item on Sitecore PowerShell Find-Item -Index sitecore_master_index -Criteria @{Filter = "Equals"; Field = "recipe id"; Value = "Recipe_Lambada"}, @{Filter = "DescendantOf"; ...
1
vote
0answers
71 views

Security disabler doesn't operate in context of Unlock-Item comandlet?

Writing a script to allow editors to unlock an item locked by another user I used New-UsingBlock(New-Object -TypeName "Sitecore.SecurityModel.SecurityDisabler"){ $item | Unlock-Item } This didn't ...
0
votes
0answers
98 views

Create an item at site creation with Sitecore PowerShell

I wrote a simple script in order to push an item when i create a new site: $item = New-Item -Path $SitecoreContextItem.Paths.Path -Name "bidule" -ItemType "/sitecore/templates/Project/OSK/OSK Home" ...
0
votes
1answer
63 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' ...
5
votes
1answer
91 views

Can a Sitecore LaunchPad button be attached to a Sitecore Powershell script?

I am working on connecting a Sitecore LaunchPad button to a Sitecore Powershell script so I can use the script to perform the desired action. Any examples of how I should do that ?
4
votes
1answer
60 views

How to add keyword to the Keywords-multifield list with SPE?

Trying to add a keyword to the keyword-multilist field with SPE. $items = Get-ChildItem -Path "master:\sitecore\content\Website\site\subnode" -Recurse $items | ForEach-Object { [Sitecore.Data....
1
vote
1answer
119 views

Export of of script results to Excel not working

When I get a ListView with script results, and want to export the results to Excel etc., nothing happens when I click on the buttons. I do however get an error in the developer tools console: ...
1
vote
1answer
44 views

How do I calculate the maximum Index to use with Add-Rendering in a Sitecore PowerShell script?

I have a Sitecore PowerShell script and I am using it to insert a rendering at a particular position on the page. To do this, I am using the [-Index <Int32>] parameter on the Add-Rendering ...
2
votes
0answers
179 views

SPE Remove-Rendering with -FinalLayout Removing all renderings from the Final Layout

I recently wrote my first Powershell script for removing an old rendering from a placeholder and replacing it with a new rendering. For some reason, when the rendering I need to remove is in the ...
5
votes
1answer
107 views

What is the call depth limit in Sitecore PowerShell and can it be overridden?

I have a recursive script that hits a System.Management.Automation.ScriptCallDepthException exception. What is the call depth limit in Sitecore PowerShell and can it be overridden? Note: Yes, I can ...
4
votes
1answer
211 views

How to escape a query in Sitecore PowerShell

This PowerShell query breaks, if the item name contains query operators such as "and" or "child". How should I escape it, so that they don't break it? $SourceItemPath = $SourceItem.Paths.path $...
3
votes
1answer
157 views

How do you add html link to PowerShell Report in each row?

I'm trying to add an html link to each row containing a reference to an arbitrary item. Essentially I want to load a custom item, but it not be the same item as the record. I tested with both scForm....
3
votes
1answer
124 views

Replace or Update Base Template of a Template

I am trying to remove a base template if found and add a different base template if not found. In the code below the standard template is never found even though I know its there. Is it because I'm ...
3
votes
1answer
99 views

Archive Sitecore items using Sitecore PowerShell Extention

I need to archive Sitecore items using Sitecore PowerShell. Any commnand that can be used to achieve this.?
1
vote
0answers
136 views

Use custom Mongo db with Powershell

I have a custom mongo database, that database contains information about pages.I need to query it in order to use SEP to create pages according to that info, ig, adding renderings component, etc. ...
4
votes
1answer
338 views

Display item.Paths.FullPath with Show-ListView command

I have the following script to output to a table certain fields of a selection of items Get-Item -Path "master:" -Query "fast:/sitecore/content/Home//*[@@templateid='{BAC0709D-5606-4A86-AF67-...
3
votes
1answer
277 views

What is the Powershell syntax for adding and removing items from a TreelistEx field?

I want to edit some Placeholder settings with Powershell extensions, which involves adding a specific rendering to some and removing another rendering from others. Is there a simple syntax based on ...
2
votes
3answers
106 views

Data re-writing from Sitecore 7.2 with SPE

So I need to re-create some content from Sitecore 7.2 to a new Sitecore 8 instance. What we had in mind is to create a script using PowerShell in the new Sitecore 8 instance to fetch the needed data ...
1
vote
1answer
234 views

Bulk create Media Items

Is it possible to bulk create media items from an array of System.IO.FileInfo without needing to install the remote powershell extension package to use the Upload-SitecoreFile command? Notes - The ...
3
votes
2answers
328 views

How to get the current language in a Sitecore Powershell editor (context menu) script?

How can I find which language the editor is currently working in when running a script from the context menu? Get-Item . Returns the item, but in the context language that the script session is in.
4
votes
1answer
508 views

Sitecore powershell - Get the count of media folders and media items for each of the medial folders inside media library

I need to get the count of all the media items and folders inside any media folder in media library. Then export the data to csv I am planning to write a script using SPE. Please help me on the same ...
3
votes
2answers
533 views

Deleting an Item with a null Template

Thru a series of unfortunate events (most likely missing a template in a package between servers/instances) I found myself having issues inserting links thru the General Link field. Tracked it down ...
7
votes
2answers
283 views

How to copy an item to multiple locations

What is the easiest and quickest way to copy an item to various locations? I have about 100 multisites in a solution and I have created a new template. I need to create a new item inheriting this ...
3
votes
1answer
170 views

How to enable non-admin user to use powershell extensions?

I want to enable a specific non admin user to use PowerShell extensions without giving them admin privileges. So far, according to the PowerShell ISE Security Documentation, I have given all the ...