I have a PowerShell script that lists all servers in my domain. I need to have this information put into another PowerShell script as seen below in the "servers names" box.
New-Item -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\EventCollector\Subscriptions\taco\EventSources -Name "servers names" –Force
This script creates a folder under eventsources in the registry called "server name". This folder is how event collector (log server) creates subscriptions of servers. so if I have a server named burrito. event subscription will add that server "burrito" to its event collector subscription to gather logs. I need PowerShell to read the servers I collected and put them in the "server names" part of the above script so that those folders are created. I hope this makes sense.