I am trying to create a new item in Sitecore from Powershell and using the below command in ISE
New-Item -Path "master:\content\home" -Name "A/B Demo" -ItemType "Sample/SampleType"
So my expectation is an item with "A/B Demo" gets created in CMS under home. But getting an error
New-Item : Could not find a part of the path 'master:\content\home\A\B Demo'
How should I overcome this error. Thanks in Advance!!
/
in item names. Pass your name through ItemUtil.ProposeValidItemName before storing it. Set your original name as DisplayName instead.