Hi all,
Looking for some assistance please.
I am attempting to use PS to import a list of IP address subnets (with individual, corresponding, site names) from CSV and for each of them, create additional items and then export the result to another CSV.
In the import CSV there are two columns, “Site Name” and “IP Address” e.g.
| Site Name | IP Address |
| Test1 | 1.1.1.1 |
| Test2 | 1.1.2.1 |
| Test3 | 1.1.3.1 |
| ConnectionName; ConnectionAddress; FolderName |
| Test1 Host1; 1.1.1.1; Test1 Host1 |
| Test1 Host2; 1.1.1.2; Test1 Host2 |
| Test1 Host3; 1.1.1.3; Test1 Host3 |
| Test2 Host1; 1.1.2.1; Test2 Host1 |
| Test2 Host2; 1.1.2.2; Test2 Host2 |
| Test2 Host3; 1.1.2.3; Test2 Host3 |
| Test3 Host1; 1.1.3.1; Test3 Host1 |
| Test3 Host2; 1.1.3.2; Test3 Host2 |
| Test3 Host3; 1.1.3.3; Test3 Host3 |
I’m aware (roughly) I’m looking at using “import-csv”, “foreach” and, I’m assuming, “new-item” but I’m not entirely sure how to put it all together.
If anyone could point me in the right direction I’d appreciate it.
Regards,
Tal