Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 3.0 » New-Variable

New-Variable - Powershell 3.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-Variable

Short description
Creates a new variable.

Syntax


Description
The New-Variable cmdlet creates a new variable in Windows PowerShell. You can assign a value to the variable while crea
ting it or assign or change the value after it is created.


You can use the parameters of New-Variable to set the properties of the variable (such as those that create read-only o
r constant variables), set the scope of a variable, and determine whether variables are public or private.


Typically, you create a new variable by typing the variable name and its value, such as "$var = 3", but you can use the
 New-Variable cmdlet to use its parameters.