Hello, i have a scenario where i have about 5000 servers. I can’t write configuration data for each server mentioning its name, is there a way that we can get the hostnames from a textfile and place them in a variable such that it will generate the .mof files for them?
If all servers are using the exact same config, you can use something like this:
#whatever config you need
Otherwise, look at using configuration data instead
In push model, how can we use localhost? Pull supports this type of config.
Can you give me an example of config data to include all hosts, really appreciate your help.
I think there might be some confusion here. Push mode basically a decentralized scenario where you have servers without a “management server” per say; kind of standalone. Pull mode, you have centralized scenario where configurations are published in the Pull servers and clients check in every x amount of minutes. Which one of the two scenarios are you? and what are the differences between server to server?
Thanks for your reply, i am looking for push mode, but in push mode if we create a config document we need to pass hostname for node parameter right? If i have 1000+ hosts, how can i give all host names in that doc? Instead can we use a variable to get host names from a text file?
You could create a configuration like this:
#Some config here
And also, I haven’t tried it but Start-DscConfiguration has a -ComputerName parameter for which, I would assume, you can just use it in conjuction with a config for localhost.