Dear Andy H,
I worked on your suggested solution and its working very fine but it possible to put all these
Script files separately in each folder with device name? Because when you have 200 network nodes and all script in single file than it is very difficult to find specific file in case you required it.
So please suggest the variable which can create separate folder same as device name and save result file in that Folder