Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » New-ItemProperty

New-ItemProperty - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.


Short description
Creates a new property for an item and sets its value. For example, you can use New-ItemProperty to create and chan
ge registry values and data, which are properties of a registry key.

New-ItemProperty [-LiteralPath] <string[]> [-Name] <string> [-Credential <PSCredential>] [-Exclude <string[]>] [-Fi
lter <string>] [-Force] [-Include <string[]>] [-PropertyType <string>] [-Value <Object>] [-Confirm] [-WhatIf] [-Use
Transaction] [<CommonParameters>]

New-ItemProperty [-Path] <string[]> [-Name] <string> [-Credential <PSCredential>] [-Exclude <string[]>] [-Filter <s
tring>] [-Force] [-Include <string[]>] [-PropertyType <string>] [-Value <Object>] [-Confirm] [-WhatIf] [-UseTransac
tion] [<CommonParameters>]

The New-ItemProperty cmdlet creates a new property for a specified item and sets its value. Typically, this cmdlet 
is used to create new registry values, because registry values are properties of a registry key item.

This cmdlet does not add properties to an object. To add a property to an instance of an object, use the Add-Member
 cmdlet. To add a property to all objects of a particular type, edit the Types.ps1xml file.