There might be scenario, where
- remove a rendering from list of pages/Tree
- remove broken rendering from Tree
There might be scenario, where
In today's article, would like to present script. And the purpose of this script to Get url web status in bulk.
1. Please find script by click here
2. Please update list of urls in one file and placed at one place (Let's say D:/urls.txt)
3. Open PowerShell and execute script as .\urlhealths.ps1
Note:
Please do not forget to update path in script to get url list (line no. 42)
Also please ensure urls.txt contains list of url (one url in one line)
Hope this will help.
Since I was trying to get license details for a Sitecore instance, so thought to share with all.
below are ways to get Sitecore license details using Sitecore PowerShell script as
$licensePath = [Sitecore.Configuration.Settings]::LicenseFile
[xml]$licenseDocument = Get-Content -Path $licensePath
$licenseDocument.signedlicense.Signature.Object.license |Format-Table -AutoSize
Challenge:
There were scenario, where I was trying to get list of strings from text file and tried as below
[string[]]$ItemIdList = Get-Content -Path 'D:\ItemIds.txt'
but getting issue as file not found.
Approach to resolve:
With below lines of script, trying to first upload at temp/upload path (it will create directories if not exist).
And then reading list of strings from text file.
$dataFolder = [Sitecore.Configuration.Settings]::DataFolder
$tempFolder = $dataFolder + "\temp\upload"
$filePath = Receive-File -Path $tempFolder -overwrite'
[string[]]$ItemIdList = Get-Content -Path $filePath
There are scenarios where we have to create item list in Sitecore - For example: Countries, States, Products or any dropdown item list.
Prerequisites
Sitecore PowerShell Extension must be installed.
List of items, for reference sharing list click to download CountryList, USStates, IndiaStates or any custom file.
Download script CreateBulkItem.ps1
Demo Time
Create a Sitecore item at below path
/sitecore/system/Modules/PowerShell/Script Library/SPE/Tools/Package Generator/Content Editor/Context Menu/Packaging
by duplicating existing script item and paste CreateBulkItem.ps1 as below (update list text path in script)