How it is possible to create a object and numbering it?
I want to run a loop and create objects with different names.
$url = "http://stackoverflow.com"
$n = 30
for($i = 0 ; $i -le $n; $i++)
{
($ie +$i) = New-Object -ComObject InternetExplorer.Application
($ie +$i).visible = $true
($ie +$i).Navigate($url)
}
So that the results are the objects:
$ie1
$ie2
$ie3
etc.
You can use
New-VariableCmdLet to create a var in wich you compose the name dynamicaly.