Avatar of Dustin Saunders
Dustin Saunders
Flag for United States of America

asked on 

Powershell - Dynamically named DataTable

Experts-

I use code similar to this to dynamically create variables:
New-Variable -Name "var$i" -Value $x
Get-Variable -Name "var$i" -ValueOnly

Open in new window


But I am not sure how to proceed creating dynamically named DataTables.

For example, I have a CSV with sets of domains on them.  For each domain, I want to create a dynamically named DataTable to store the data for that specific domain.  After doing a bit of processing I'll need to merge all the data tables into one procedurally.  Is there a way I can dynamically create these tables?
Powershell

Avatar of undefined
Last Comment
Dustin Saunders

8/22/2022 - Mon