Questions tagged [powershell-extensions]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
23 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
21 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
20 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
34 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
30 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!...
3
votes
1answer
41 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 ($...
3
votes
2answers
130 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
51 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
21 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
30 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
28 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. ...
2
votes
1answer
73 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
20 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
39 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 ...
1
vote
1answer
38 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
25 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
48 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
122 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
59 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 "/...
4
votes
3answers
252 views

Sitecore PowerShell extensions module compatibility with Sitecore 9.2

I am trying to install the Sitecore PowerShell extensions module in Sitecore 9.2. While installing this module, I received a w3wp crash error as: When I try to run any script, I am receiving "...
0
votes
1answer
28 views

Issue in updating parameters template field of a rendering using powershell

The following is the code which i'm using to update the field values of a rendering. $item = Get-Item -Path "master:\content\ListManagerTask\Adding Contact" Get-Rendering -Item $item -PlaceHolder "...
0
votes
0answers
39 views

Workflow is not getting assigned for items

I'm creating a template and assigning a workflow to that template. But the items which are created from that template are not having the workflow value. $template = New-Item -Path "/sitecore/...
5
votes
1answer
81 views

Run powershell script when new user is created

So, I've been successful in creating a powershell script that modifies the MyToolbar to what we need based on the user's domain: $ribbonCommands = "{1DDBC2B7-69B4-44A0-AAF9-895AB51B1F00}|{D87FDF3B-...
1
vote
1answer
102 views

Assign media item to sitecore item using powershell script

I want to add an image to an item using powershell script and here is my code. I don't know what i'm missing.. $item.Editing.BeginEdit() [Sitecore.Data.Fields.ImageField]$fieldValueLink = $Item....
2
votes
1answer
40 views

Is it possible to get the “Breaking Links” pop-up when using the Remove-Item from SPE?

I would like to use the Remove-Item function from SPE, but I want to be notified before I delete an item which is referenced by another item(s). I mean the window above when I would like to remove an ...
1
vote
1answer
114 views

Adding Items to Multilist Field using powershell

Can any please explain me how to add multiple items to the multilist field. For me only last item is getting selected. $item.Editing.BeginEdit() $allItems = Get-ChildItem -Path '/sitecore/content/...
0
votes
0answers
16 views

Choose Item Dialog box

I have sitecore power-shell and sitecore 8 with SXA module. I need to have a dialog box that will allow user choose Item from a tree. is it any way to do it ? not sure that standard dialog could do ...
2
votes
1answer
128 views

Does changing permissions to a certain role affect other roles?

I have a role, "Role1", - a member of "RoleA". Also, I have created a new role, "Role2", which is also a member of "RoleA". Now, I want to change the permissions in workflows and templates of Role2. ...
0
votes
1answer
26 views

Adding scaffolding PowerShell scripts after Branch creation in SXA

I am using SXA 1.8.0 with Sitecore 9.0.2 on multisite solution. I have a branch template for a page template which creates a few renderings data sources underneath this page, like that: Page Data ...
0
votes
1answer
74 views

Setting a new items' DropLink field value using PowerShell

I have set a value in a General link field in a Sitecore item using PowerShell. Here is the PowerShell script. $item.Editing.BeginEdit() [Sitecore.Data.Fields.LinkField]$...
0
votes
1answer
101 views

Sitecore Powershell - Get all items under buckets

I am trying to see if I can traverse through every node in a bucket and get all its items using PSE. All I am able to get is only the root bucket folder. I tried all the below options with no luck. ...
2
votes
1answer
85 views

How do you create new templates using SPE?

I have created sitecore template using powershell extension. Here is my powershell script: $template = New-Item -Path "/sitecore/templates/PowershellTask" -Name "testtemplate" -type "{AB86861A-6030-...
0
votes
1answer
73 views

Exception calling “Invoke” with “1” argument(s):"Element 'Objs' with namespace name 'http://schemas.microsoft.com/powershell/2004/04' was not found

I'm trying to install and update package through powershell, below is the script. session is successfully created, but when invoking a remote script, I'm getting an error. Script: $file = "C:\...
0
votes
0answers
63 views

Attempting to Export Creative Exchange through script web api

I'm attempting to follow the documentation for SXA in a CI/CD process. Configuration Details: Sitecore 9.1 (Standalone Config - My Local Dev) SXA 1.8 initial release PowerShell 5 Running on Windows ...
1
vote
1answer
43 views

How to remove duplicate dynamic placeholders from Final Layout using SPE?

We got duplicate dynamic placeholders assigned in Final Layout. How can I remove the duplicates from the Final Layouts in all the languages? This is how we are filtering out the placeholders ...
1
vote
2answers
44 views

Display save actions for a WFFM form in Sitecore PowerShell

I would like with Sitecore Powershell to extract and display the ID(s) of the save action(s) that a WFFM has assigned. Those IDs in fact the ID of items from /sitecore/system/Modules/Web Forms for ...
0
votes
0answers
50 views

Problems with spaces in SPE Sitecore queries

I am using Sitecore 9.0 and SXA 1.8 and scaffolded a new tenant and site named New Tenant and New Site. When executing the following query using SPE I get not results: Get-Item -Path master:// -Query ...
0
votes
1answer
117 views

Export buttons in Show-ListView is not working

I know there is a similar question before but it has different error than mine. In my ListView result, when I try to click any of the export buttons, nothing happens. Upon checking the SPE logs, this ...
0
votes
1answer
39 views

Not getting any details when running “Install-Update Package” through Sitecore Powershell Module remoting service for my sitecore instance

I am running a Powershell Script using Sitecore Powershell Module remoting service to install .update packages from my host to a remote Sitecore instance but I am not getting any details back on the ...
5
votes
1answer
84 views

Good workflow for SXA powershell scripts

I am trying to find a good way to work with PowerShell scripts that we use for SXA such as for scaffolding. I have tried the PowerShell ISE client that was build into Sitecore but sometimes the UI ...
1
vote
1answer
79 views

How can I copy personalization rules to a rendering in Sitecore Powershell?

I'm copying a rendering from one item to another using Sitecore Powershell Extensions. All is working well, except that the personalization rules for the rendering aren't copied over. I can get/set ...
1
vote
1answer
56 views

How to get Sitecore user create date with PowerShell

I'm building a report with PowerShell, but I can't find where is the creation date for the users. I need filtering by dates range and later get custom properties. Get-User -Filter 'default\*' ` ...
1
vote
1answer
33 views

Get-Package is missing Path parameter [closed]

Weirdly, in one of my script I am trying to do such a call: Get-Package -Path "c:\inetpub\wwwroot\Platform.dev.local\App_Data\packages\This.File.Was.JustCreated.xml" but what I get in return is: ...
2
votes
0answers
38 views

How to add experience editor button with Sitecore Powershell?

I've created a script to aid editors publishing components on a page, and I've added it to the content editor item context menu, but I can't work out how to add a button to do the same from the ...
1
vote
2answers
264 views

How to get ALL specific child-items in a folder using fast query?

I have here a sample content. Now I want to get all the Article Template under the Folder. Sitecore Content Folder Article1 Article2 NewsFolder1 ...
0
votes
0answers
70 views

How to create a Sitecore Module WDP packge **WITH** Sitecore items?

I was following the official documentation on the subject here https://doc.sitecore.com/developers/sat/20/sitecore-azure-toolkit/en/web-deploy-packages-for-a-module.html and realized that it looks ...
3
votes
1answer
181 views

Unable to elevate Console in 9.1 Azure PaaS

I have a relatively clean install of Sitecore PowerShell Extensions v 5.0 in my environment, which is running Sitecore 9.1 on Azure PaaS. As far as I can tell, everything in the install seems to be ...
1
vote
1answer
35 views

How to get the descendants of the values/folder in `Read-Variable` command using `Fast` query?

I have here a Read-Variable command that will make you select any content folder. $root= Get-Item master:\content\home $selectFolder= Read-Variable -Parameters @{ Name = "root"; Title="Start ...
-1
votes
1answer
36 views

How to check an array of items if it has a page layout and output only the page item and exclude its subitems using Powershell? [closed]

I have an array of items stored in $mylist. I'm trying to check items with layout and output them. Here's the script that I have tried: for ($i = 0; $i -le $mylist.count; $i++) { $i = $...
2
votes
1answer
110 views

How can I get the renderings when using the Find-Item command?

I used Find-Item to get the items on my sitecore_master_index. Now, I want to get the presentation details of each item. How can I do get each rendering/presentation details?