-
-
Notifications
You must be signed in to change notification settings - Fork 70
Closed
Labels
area-commandsInvolves functions and cmdlets.Involves functions and cmdlets.🌈 improvementExtra sugar and spice.Extra sugar and spice.📑 area-documentation
Milestone
Description
I understand the Add-ItemVersion creates a new version based on the existing version but is there a way I can create a new version when there is no existing version?
Sitecore has a lot of items which for some reason dont have a version at all. I'm trying to write a SPE script that can create a new version but for some reason I cant seem to add a version if there are 0 versions for that item. If I manually add a version through Sitecore content editor then run the script against the item, new versions are created.
My current script is:
Add-ItemVersion -Path "master:\sitecore\templates\System\Email" -Language "en" -IfExist Append
Sitecore: 9.2
SPE: 5.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-commandsInvolves functions and cmdlets.Involves functions and cmdlets.🌈 improvementExtra sugar and spice.Extra sugar and spice.📑 area-documentation