A few things to keep in mind.
- When working with Sitecore
Items
you will need the PowerShell drive to be either master:
, web:
, or core:
. This is necessary to ensure that the SPE provider is in use for managing content through the Sitecore API. This is when the ItemType
would be something like a template name.
- When working with filesystem data you will need to ensure the drive selected is something like
C:
. As mentioned by Rinku the use of $SitecoreDataFolder is a way to ensure that the proper drive is provided.
New-Item
for the filesystem provider and SPE provider behave differently.
In your example you should run the command like the following:
New-Item -Path $SitecoreDataFolder\test-folder -ItemType Directory
You can use the command Receive-Item
as seen in the docs to upload files.