Just when you thought it couldn’t get easier to create a truck load of subscribers, I happened to bump into this nice blog article from the Scripting Guys about how can I read a csv file? http://blogs.technet.com/b/heyscriptingguy/archive/2008/10/13/how-can-i-read-a-csv-file.aspx
Seeing the one liner made me think of the last blog article I wrote on creating subscribers in OpsMgr 2012, so naturally I stayed up extra late to put the two together.
The data source will be a csv file with the following Header and information:
The script is very similar to the hey scripting guys article above.
#Begin of Script
$path = “C\TEMP\email.csv”
Import-csv -path $path |
Add-SCOMNotificationSubscriber -Name $_.Name -DeviceList $_.Email, $_.sms, $_.sip
#End of script
I hope this saves someone some time in the near future!