New-Item for InitializationParameters

Creates a new item.

Syntax

New-Item [-ParamName <string>] [-ParamValue <string>] [-Confirm] [-WhatIf] [<CommonParameters>]  

Description

The New-Item cmdlet creates a new item and sets its value. The types of items that can be created depend upon the location of the item. For example, in the file system, New-Item is used to create files and folders. In the registry, New-Item creates registry keys and entries.

In the InitializationParameters directory, you can use the New-Item cmdlet to create and configure Plugin initialization parameters.

Parameters

-ParamName

Specifies the display name to use for the initialization parameter.

Required? false
Position? named
Default Value
Accept Pipeline Input? false
Accept Wildcard Characters? false

-ParamValue

Specifies the value of an initialization parameter, which is a plug-in-specific value that is used to specify configuration options.

Required? false
Position? named
Default Value
Accept Pipeline Input? false
Accept Wildcard Characters? false

-Confirm

Prompts you for confirmation before executing the command.

Required? false
Position? named
Default Value
Accept Pipeline Input? false
Accept Wildcard Characters? false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

Required? false
Position? named
Default Value
Accept Pipeline Input? false
Accept Wildcard Characters? false

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs and Outputs

The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet returns.

Inputs System.Object

You can pipe a value for the new item to the New-Item cmdlet.
Outputs Any

Notes

The New-Item cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type "Get-PsProvider". For more information, see About_Providers.

Example 1

C:\PS>New-Item -Path WSMan:\localhost\Plugin\TestPlugin\InitializationParameters -ParamName testparametername -ParamValue testparametervalue  

This command creates an Initialization parameter named testparametername in the InitializationParameters directory.  

See Also

about_Providers
Get-Item
Set-Item
Remove-Item
Clear-Item
Invoke-Item
Rename-Item
Move-Item
Copy-Item