What’s the difference between new-itemproperty and set-itemproperty?

Question:

Both appear to create or change an item property.

What’s the difference between the two? Under what circumstances do they perform differently?

Answer:

For me the difference is that if you use new for an item property that exists you’ll receive an error, you can use set-itempropoperty in all cases.

So new is for creation, and set is for modification or creation. New will not create if the property exists.

Source:

What’s the difference between new-itemproperty and set-itemproperty? by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply