Both appear to create or change an item property.
What's the difference between the two? Under what circumstances do they perform differently?
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.
Besides what @JPBlanc mentioned, there is another important difference. Note that only New-ItemProperty has the parameter -PropertyType
, which can be used to specify the registry value type (like REG_DWORD etc.).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With