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
34 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/...
-1
votes
0answers
47 views

Mapping CDN image path in sitecore using powershell script [closed]

Consider that the images are present in CDN(Content Distribution Network) and i wanted to use those images in my site by using the image url, which is generated by CDN.I want to perform the above ...
4
votes
1answer
66 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
39 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
34 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
34 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
15 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
124 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
17 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
38 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
41 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
56 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
42 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
40 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
29 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
40 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
47 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
79 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
28 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
68 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
57 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
39 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
31 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
36 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
129 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
61 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 ...
2
votes
1answer
122 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
29 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
32 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
85 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?
2
votes
1answer
35 views

How can I filter or show only one of the duplicates in the results when using Find-Item command?

I used Find-Item to get the items on my sitecore_master_index. However, the results contains same ID but with different languages. I have found out that this item has many language versions in the ...
0
votes
1answer
142 views

How to get items from both master and web Context in PowerShell Extensions without using Get-Item?

I want to get all the items from both master and web database using Find-Item cmdlet and run in one Powershell script. I'd also rather not use Get-Item cmdlet for performance reasons. Any inputs will ...
1
vote
1answer
110 views

Adding new version for each item

I was trying to add new version for each item in sitecore: $root = "master:\content\home" @(Get-Item -Path $root) + @(Get-ChildItem -Path $root) -Recurse | Add-ItemLanguage -Language "en-us" -...
0
votes
1answer
75 views

How to delete Sitecore items without reference using PowerShell script?

We have multi-site application, want to delete items which are not referencing anywhere in content tree. Following are categories: 1) DataSource items 2) Template 3) Media items 4) Renderings How ...
2
votes
1answer
126 views

Inherit child template to the parent template using Powershell

I have 2 templates: Template A: PersonalTemplate Template B: PrivateTemplate Here I want to inherit Template B in Template A using the PowerShell script.
0
votes
1answer
52 views

How to save a file with a custom name using Show-ListView function?

I want to save a file with a custom name while using Show-ListView function. Right now, when I am trying to save the file it is returning in this format "report-2019-02-25_095656.csv". This is the ...
1
vote
1answer
74 views

Sitecore Powershell Extension installation fails

I have to environments test and prod with the same codebase and content installed, and I have installed SPE on the Test system all fine and dandy, but when I try to do it on our production environment ...
2
votes
1answer
69 views

SPE's Download for media files not working - can't find zip file

We have a problem where the Download script used as a right-click menu option is throwing an error. Looking into the script, the problem appears to be how the value [Sitecore.Configuration.Settings]::...
1
vote
2answers
237 views

Sitecore Powershell Extensions not returning field source value

I'm trying to write a simple Powershell script that finds all General Link fields and outputs the value of their Source field. $fields = Get-ChildItem -Path "master://sitecore/templates/user defined" ...
0
votes
0answers
61 views

How to replace an item with another item by ID in Treelist field using Powershell?

I want to replace an item with another item in a Treelist. Basically, the items I want to replace are broken links. Suppose, There are two items A and B. A is used in a Treelist field, so I want to ...
0
votes
0answers
148 views

Error installing Sitecore PowerShell Extensions 5.0 on Sitecore 9.1 instance ['packageinstall:items:ended' event]

I got this error when trying to install SPE 5.0 on my Sitecore 9.1 instance. [![enter image description here][1]][1] I was able to get more details checking the log files: ManagedPoolThread #3 08:...
1
vote
0answers
29 views

Removing publication restrictions - publication targets

Does anyone know or have a PowerShell script which can remove the checkbox in publication restrictions specific to publication targets for Sitecore items? We need to achieve (2) as below since some ...
1
vote
1answer
93 views

Installing SPE 4.7.2/5.0 on Sitecore XP 9

I am trying to install SXA 1.8.0 on Sitecore 9.1 environment (my local pc as testing) but I cannot install Sitecore Powershell Extension 4.7.2/5.0 which is required to be installed before SXA ...
1
vote
0answers
86 views

Can I automate the PowerShell Extension package installation?

Is it possible to automate the installation of the package that everybody is using to automate the other packages installation? My goal would be having a script which I can use to install SPE on a ...
0
votes
1answer
53 views

PowerShell exception at Receive-File dialog

I have a PowerShell code like this Import-Function Validate-PowerShell Test-PowerShell Try { $ctx = get-item . Import-Function Import-RedirectMappings $file = Receive-File (get-item "...
0
votes
2answers
79 views

Powershell script to update displayname error

When I try to update the display name of the item am getting the following error. Please let me know how to fix this? Working Please wait, working... unlike you! 'DisplayName' ...
1
vote
1answer
221 views

One time delete of old versions

Master database has more than 500 items that have more than 10 item versions. Some content items have more than 100 versions. According to recommendation to limit 10 item versions I want to perform a ...
0
votes
1answer
29 views

Setting Page Design field in Sitecore pages

I'd like to set the Page Design field in certain pages of a certain template to a value in sitecore using powershell script. I tried the following but it didn't work. I also tried the name of the page ...
-1
votes
1answer
213 views

PowerShell script to update field with IDs to media items

Trying to update media item field through script .In the csv file I have item name for uploaded images that needs to be updated in the Imagefield script: $AllPhotoGallery = Get-ChildItem -Path "...
0
votes
1answer
294 views

PowerShell script to compare latest version number of master and web DB in sitecore

Can Anyone help writing a PS script to get the item list where the latest version on web db is different than master