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

Questions tagged [powershell-extensions]

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

6
votes
1answer
35 views

How to determine whether an editor is using the Desktop Content Editor or Launchpad Content Editor?

I've been doing a lot more SPE report implementations and noticed that the functionality of loading the ListView is dependent on whether the editor is using the Content Editor from Launchpad or the ...
3
votes
1answer
44 views

Determining whether item has been published

Is there an easy way using SPE to determine whether an item has been published?
3
votes
1answer
43 views

Using Show-ListView to Display a Dynamic Number of Columns in Sitecore Powershell

My goal is to use the Show-ListView function available in Sitecore Powershell to show a dynamic number of columns. I'm currently executing the Show-ListView function as follows: $table | Show-...
2
votes
1answer
33 views

Setting Presentation Aliases with Sitecore Powershell Extensions

In Sitecore 9, in the Content Editor and under the Presentation tab, there's an option to set Aliases on an item. Assuming you already have the desired item stored in variable $item, how would you set ...
1
vote
0answers
28 views

Evaluating foreign character (Arabic) string literals in Sitecore Powershell Extensions

I'm trying to evaluate existence of a word in arabic string like "هو مشروع آخر من ضمن المشاريع الثلاثة" my code is like $myString = "هو مشروع آخر من ضمن المشاريع الثلاثة" if($myString.Contains("مشروع"...
0
votes
0answers
21 views

PowerShell Receive-File dialog is empty

I'm trying this really easy Receive-File but I'm getting a blanc popup. I've tried different paths but always get the same result. Another popup Read-Host is no problem. That one shows correctly. I'...
1
vote
2answers
45 views

Force saving of an item

I have several newly added save events for existing items. Any way to force a save of an item? When I do $item.Editing.BeginEdit() / $item.Editing.EndEdit() in PowerShell it returns false since ...
5
votes
1answer
30 views

Getting and setting the order of renderings/sublayouts on a page

I have written a PowerShell script that replaces sublayouts with renderings across all pages in a Sitecore site. Everything is working well except for the order of the renderings. The order always ...
0
votes
0answers
19 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
1answer
77 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
115 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
33 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
67 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
35 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
28 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
107 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
22 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
89 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
41 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
51 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
648 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
54 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
126 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
166 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
62 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
126 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
69 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
56 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
45 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
73 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
346 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
215 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
160 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
492 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
59 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
90 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
109 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
80 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
118 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
61 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
149 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
50 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
205 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
139 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 ...
5
votes
1answer
231 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
230 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
158 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
126 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
145 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
447 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-...