Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 2.0 » New-Item

New-Item - Powershell 2.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

New-Item

Short description
Creates a new item.

Syntax
New-Item [-Path] <string[]> [-Credential <PSCredential>] [-Force] [-ItemType <string>] [-Value <Object>] [-Confirm]
 [-WhatIf] [-UseTransaction] [<CommonParameters>]

New-Item -Name <string> [[-Path] <string[]>] [-Credential <PSCredential>] [-Force] [-ItemType <string>] [-Value <Ob
ject>] [-Confirm] [-WhatIf] [-UseTransaction] [<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 l
ocation 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. 

New-Item can also set the value of the items that it creates. For example, when creating a new file, New-Item can a
dd initial content to the file.