O'Reilly logo

Microsoft Exchange Server PowerShell Essentials by Biswanath Banerjee

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using variables

In PowerShell, the data is stored, retrieved, and modified using the methods listed next. In this section, we are going to cover only variables:

  • A variable is used to store bits of information
  • Arrays are used to store information in an index
  • A Hash table uses key-value pair to store data

A variable is virtual storage to store information that will be utilized later in a script or the information that is the output of running a script. Variables can contain different data types such as text strings, objects, and integers. There are few special variables that you can use, which are defined in PowerShell.

The examples of some of the special variables are as follows:

Special Variable

Description

$_

This is the same as the $PS item. It ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required