Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Array of Variables

$
0
0

I am new in powershel and i would like to know if it is possible have an array of variables, something like this:

$OS = Get-CimInstance -ClassName CIM_OperatingSystem

$Ram = Get-CimInstance -ClassName CIM_PhysicalMemory

$Base = Get-CimInstance -ClassName CIM_Card

$AllData = {$OS, $Ram, $Base}

I want to recover all information as array


Viewing all articles
Browse latest Browse all 6937

Trending Articles