Questions tagged [powershell-extensions]

Anything related to the Sitecore PowerShell Extensions (SPE) module

Filter by
Sorted by
Tagged with
10 votes
2 answers
3k views

Updating Workflow for all the Items in Sitecore Instance

I would like to update a workflow (any Standard Field) for all existing items. new items. What is the best way to do this? Can I use Sitecore Rocks or Sitecore Powershell Extensions? Any other ...
Prakash's user avatar
  • 1,059
2 votes
2 answers
383 views

Sitecore Powershell - Getting Error "ProviderPath is already present"

In Sitecore Powershell while running simple command like get-item or get-childitem i am getting following error. Get-Item : The member "ProviderPath" is already present from the extended type data ...
user3024615's user avatar
4 votes
1 answer
557 views

Sitecore Powershell Workflow Actions Not Executing

I have been working to get a Powershell script to execute through a workflow action in Sitecore and I'm running into an issue. Previously I was able to insert a new Powershell action from the provided ...
Randolph Jones's user avatar
2 votes
1 answer
1k views

Sitecore Powershell Get-Rendering doesn't find any renderings from Context Menu, but works in ISE

I have a script that copies a page with renderings from a set language to 1 or more other languages that are selected by checkboxes. The whole script works when i run it in the ISE, but when I run it ...
Nils Hall's user avatar
7 votes
1 answer
1k views

Updating parameters using SPE

I'm running a script in which I want to mark as checked all renderings of a specific template with the Vary By Data parameter. But running the script it is adding to the Additional Parameters the ...
Diego's user avatar
  • 5,678
3 votes
1 answer
2k views

SPE prevent Get-Item from throwing error if no item found

I'm writing a script to show the missing/new items between two content branches. For the target of the comparison, I build an item path and then call Get-Item on that path to see if there is an ...
Matthew Dresser's user avatar
2 votes
2 answers
1k views

Reattach images to media library items after optimization?

I was able to download all the legacy image files in my media library via an ASP.net script (https://gist.github.com/DaveGoosem/6289015), in order to optimize them. I've finished doing this and now ...
Levi Wallach's user avatar
  • 1,075
3 votes
1 answer
2k views

Get list of installed media item [closed]

Currently, I have been using the following code to display the Upload Advance Dialog for media files: $itemPath = Get-Item "master:\media library\Files" Receive-File ($itemPath) -AdvancedDialog The ...
Hishaam Namooya's user avatar
1 vote
1 answer
866 views

SPE - Cannot index into a null array

I am trying to pass an Item to a SPE Function as follows: function ImportTask ($importTask, $taskItem) { $taskName = $taskItem.Name $importTask.ItemTitle = $taskItem.Fields["Item Title"]....
Hishaam Namooya's user avatar
3 votes
1 answer
5k views

Why is Get-ChildItem not working

I am trying to write a script to loop through child items using the Get-ChildItem cmdlet but it does not seem to be recognised. $path = "master:/sitecore/content" $x = Get-ChildItem $path Write-Host $...
Matthew Dresser's user avatar
7 votes
2 answers
1k views

Sitecore Powershell: Is it possible to prompt user for their password?

I'm creating a Context Menu script to allow deletion of languages on my content tree. When the user elects to run this script, I want to prompt them for their password as a confirmation mechanism, ...
jdylanmc's user avatar
  • 1,482
3 votes
2 answers
2k views

How to get list view of items plus their linked items in powershell-extensions?

I have a list of items /{path}/ORG[1-n] which each use a multilist field "Countries" to link to multiple country items. This is a many to many relationship. ORG1 and ORG2 may both link to Country1. I ...
James Walford's user avatar
7 votes
1 answer
2k views

Set Powershell script language

I would like to know if there's a way to set the current script's context language through code. I know there's a way to set it in the ISE but I need some code that could override it and force a ...
Filip Verswijver's user avatar
11 votes
4 answers
5k views

Copy final layout to shared layout

Our content authors, makes a lot of mistake when whey work in Experience Editor. Quite often they do some changes on final layout, but expect to have it on shared layout. Is is any tool exist that ...
Arbejdsglæde's user avatar
3 votes
3 answers
1k views

Unlocking items via Sitecore PowerShell Extensions scheduled task

I'm using Sitecore Powershell Extensions to unlock items that have been locked for an extended period of time. The script is stored in the script library: $item = Get-Item -Path master:\content\ $...
Rondel's user avatar
  • 493
2 votes
1 answer
308 views

Get back to 'PS master' location in Sitecore powershell console after error

How to get back to master database location in sitecore powershell console when there is an exception while executing script. We all know that default location when we open sitecore powershell ...
Balaji Kuppuswamy's user avatar
3 votes
1 answer
520 views

Show-Listview shows Item Id instead of Field Id

We're using Sitecore PowerShell Extensions to generate some reports. In one of our templates we have a field with the name Id. This id field is not being listed correctly by PSE because it is ...
Swimburger's user avatar
0 votes
1 answer
3k views

"Cognifide.PowerShell.SitecoreIntegrations.Applications.PowerShellConsole,Cognifide.PowerShell" not found Error while opening Sitecore PowerShell

When we try to open Sitecore Powershell console or ISE after fresh installation on one of the Sitecore instances, we receive below error : Log Entry for this error is: 3572 06:48:51 WARN Could not ...
Balaji Kuppuswamy's user avatar
7 votes
1 answer
1k views

Sitecore Powershell Extensions - Reports Authorization

I've created some PSE scripts to give our client some reports on their content. I created them under the proper convention of Script Module and Script Library so that the reports show up under ...
Jason Booth's user avatar
4 votes
2 answers
3k views

Create Sitecore Link with Powershell

I'm working on some reports using Sitecore Powershell Extensions. One requirement is to provide the public URL for various Sitecore items. I'm thinking this isn't really possible via Link Manager ...
Jason Booth's user avatar
6 votes
1 answer
255 views

How to use multiple words in Quick filter box in Sitecore powershell Show-Listview

I am new for Sitecore Powershell, In the script I am using Show-Listview to display the result and it is providing option to Filter the result data. Powershell doc stating we can use multiple words in ...
Karthik's user avatar
  • 61
4 votes
2 answers
2k views

Powershell Extensions - Concatenating Values in Show-ListView

I'm working on an instance that has a custom redirect engine built in. I've been tasked to write a report that can show the redirect items' Sitecore path with the "redirect from" and "redirect to" ...
Jason Booth's user avatar
-5 votes
2 answers
1k views

Session Timeout in sitecore powershell

[![Ideal Session Timeout in Powershell console][1]][1] I have noticed this few times before & I have intentionally recreated today to confirm on how console would respond when there is a session ...
Balaji Kuppuswamy's user avatar
6 votes
1 answer
191 views

8.1 stopped working after content node deletion. NullReferenceException, Powershell Pipeline Issue?

8.1 won't let us log back in. While attempting to delete a node with ~16k sub-items we couldn't tell whether 8.1 was frozen or still trying to delete. We restarted site/app pool & now can't log in....
C B's user avatar
  • 61
3 votes
2 answers
3k views

EndEdit() and boolean response

I am trying to enable item level language fallback to all items in my website. The below code snippet is taken for editing an standard field and checking whether the field got edited or not. $Lang = "...
Kumar Deepak's user avatar
1 vote
1 answer
652 views

Mandatory fields with SPE

I'm building a Sitecore powershell script where I'm using Read-Variable to read a few fields. I have added the Mandatory=$true on all of them and it only works for single-line fields but not for ...
Diego's user avatar
  • 5,678
4 votes
3 answers
1k views

How to Enable Item-level language fallback on all templates in Sitecore 8.x

Presently I'm working on Sitecore 8.1 Update-1. We have enabled Item-level language fallback on shell and website as suggested on Configure language fallback - Sitecore Documentation. It seems after ...
Harsh Baid's user avatar
  • 1,994
2 votes
1 answer
2k views

Displaying Errors from Sitecore PowerShell Using Remoting

Using the remoting capabilities in Sitecore PowerShell Extensions, I'm trying to execute some PowerShell remotely and ensure that any errors that occur display in the local console. How can I do that? ...
Dan Sinclair's user avatar
  • 5,335
1 vote
1 answer
758 views

Sitecore PowerShell Extensions switch context language based on site context language

I have a script which loops over different sites in a Sitecore instance. For each site some tasks are done, such as creating and moving items. How can I set the language context for these operations ...
Matthew Dresser's user avatar
3 votes
1 answer
1k views

Turning on Index Viewer for SPE

I have really given it a go before I posted here, but I am trying to turn on the Index Viewer for SPE. The gitbook doco says it exists, shows it not being in the menu, but no info on how to put it in ...
Chris Auer's user avatar
  • 13.1k
4 votes
3 answers
6k views

Sitecore PowerShell Extensions get descendant of an item using a template

I'm writing an SPE script and am looping over my site nodes. For each site node, I want to check if a particular descendant exists and if not then create it. I have the list of top-level nodes, but ...
Matthew Dresser's user avatar
3 votes
2 answers
880 views

How can I migrate all controls on all pages to a certain placeholder?

The layout of our website has been completely overhauled. The old placeholders didn't make sense anymore, so they aren't used in the new layouts. As a result, most content pages are now empty. All ...
Dmytro Shevchenko's user avatar
1 vote
1 answer
2k views

How to connect to a Sitecore instance with Windows PowerShell?

I have reviewed the GitBook and the two blog articles (original and v2) about remoting with SPE, but I've not been successful in executing any commands. Here's an example script I've been trying to ...
Dan Sinclair's user avatar
  • 5,335
5 votes
1 answer
851 views

How do you programmatically run a Sitecore agent using Sitecore PowerShell Extensions?

I need to run specific agents on demand. When I try to create a new instance of the agent using PowerShell's New-Object command it doesn't seem to work right.
Michael West's user avatar
  • 17.9k
6 votes
1 answer
639 views

Getting "Current Sitecore database cannot be established" using Sitecore Powershell Extensions

I'm trying to get my feet wet in Sitecore Powershell. I need to list renderings on a list of items. Some of the script works, like getting the items and outputting the name, but when calling Get-...
Troels Aaberg's user avatar
10 votes
2 answers
1k views

How to pass arguments to SPE's Invoke-RemoteScript

I want to pass some arguments to a script block that will be run on a remote Sitecore instance via SPE remoting. I wrote this script as a test, but it's not working. $session = New-ScriptSession -...
Ben Golden's user avatar
  • 3,303
3 votes
1 answer
229 views

Cannot add a User to a Role where the User name contains the "@" sign using PSE

I have to bulk-add a large number of users to a role, to this extent I am using the Add-RoleMember cmdlet. If I run Add-RoleMember -Identity "<role name>" -Members "name.lastname" it works ...
Emanuele Ciriachi's user avatar
6 votes
2 answers
327 views

Sitecore ISE powershell inconsistent results

I am running a script in Sitecore powershell to find items bases on a regular expression on a custom field ('Subkey'). This script sometimes shows results and sometimes shows 'No items available'. ...
Gluip's user avatar
  • 366
7 votes
2 answers
1k views

PowerShell Extensions reports: Is it possible to pass / choose parameters?

I have created my first report, now I'd like to make it reusable. Is there any way I could read parameters from "somewhere" after the user clicks the report's name?
Vicent Galiana's user avatar
7 votes
1 answer
1k views

PowerShell ISE: Function of Abort button?

I have noticed that clicking the Abort button in the PowerShell ISE doesn't actually cause the background job to terminate. I guess I shouldn't be surprised since arbitrarily terminating a thread that ...
Ben Golden's user avatar
  • 3,303
9 votes
3 answers
3k views

Create new language version for content branch

Is there a way in Sitecore Powershell Extensions to create new language versions of a branch in the content tree? I need it to copy exactly the presentation details set on the current language to the ...
Matthew Dresser's user avatar
6 votes
3 answers
2k views

How to reset DisplayName to empty using Sitecore PowerShell Extensions?

I wanted to know better way to reset Display Name to empty using PowerShell scripts. I have written below script.. $item = Get-Item "/sitecore/content/home" $item.Editing.BeginEdit() $item["{...
Harsh Baid's user avatar
  • 1,994
9 votes
3 answers
476 views

Where should I install Powershell module for SXA?

Solution can be installed on many environments - QA, Staging, Prod. In every of these environments Sitecore instances have different roles - CD, CM, Job, Publishing and etc. Should I install ...
Dmitry Harnitski's user avatar
11 votes
2 answers
1k views

Can you run Sitecore Powershell without triggering Sitecore events?

I want to write a script which could potentially clean up a load of unused assets, but I would like it not to trigger events (index rebuilds etc). Is there a way to say "do this silently" in a ...
Owen Niblock's user avatar
  • 1,512
11 votes
1 answer
1k views

Update all users in the Administrator Role

I want to be able to update all users who have the Administrator checkbox selected without manually going through each of the user. In the same script I would like to add them to another Role. This ...
ASura's user avatar
  • 2,363
7 votes
3 answers
4k views

How to get list of all the renderings that has been configured to use data source

We are almost complete with a large project. I am trying to find out which rendering in the page has been configured to use data source using a Powershell script. So that we can run in both UAT and ...
Nil Pun's user avatar
  • 2,283
6 votes
2 answers
581 views

Getting locked items SPE

I have a multisite Sitecore instance and I would like to get all locked items from all different sites and users and unlock them, is it possible to do this job using Sitecore Powershell Extensions?
Melvinr's user avatar
  • 183
4 votes
1 answer
2k views

How do I parse a Rich Text in PowerShell in order to replace elements?

I have a requirement to read each rich text field and then edit the content with unordered lists rather than ordered.
Michael West's user avatar
  • 17.9k
9 votes
1 answer
853 views

Update same rendering of several templates using SPE

I have a bunch of templates that have a Coveo Search Box View rendering associated with the standard values. I need to update the property "Reveal Advanced Query Suggestions" of all of them(a lot of ...
Diego's user avatar
  • 5,678
6 votes
1 answer
888 views

Unable to get value of $_.Source using SPE

I have a rich text field in my user defined template and I want to replace the source value of the rich text field. Below is my query where I'm able to read Name, type etc, however $_.source is ...
Santosh Poojari's user avatar

1
6 7 8
9
10