So, the problem is that I must create a 300 ini files. In CSV file I have a computer names and MAC addresses. Ini files must be named as MAC addresses. For that I have solution:
$data = Import-CSV d:\import.csv
ForEach ($i in $data){
$name = $i.name
$MAC = $i.MAC
New-Item -ItemType file -name $_.MAC.ini
}
But in this code I need to put some txt in those inies. For example:
some value
some text
some value=$_.name
and more txt
The content must have the name of computer in some value which is in the same line as MAC address in CSV.
Here I need a help to do it. In first place I tried with Add-Content, but no luck :(