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
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 AppendSitecore: 9.2
SPE: 5.0