Seems like ages since I last visited as I hardly do much scripting anymore as everything is working! Hope that everyone is alive and well and enjoying life.

I have encountered a problem that really needs resolving. Years ago when I setup my existing clients, I gave the servers the same names at each client so as to make scripting easy in that my current global coding is $ServerName = "\\Serverwhatever" etc.

This made it easy to just use $servername everywhere in the script for Wsus, locations to text files required by the scripts etc.

However, with new clients coming onboard this year and with them using different names for their servers, the Global Coding $ServerName = "\\Serverwhatever" in my udfs.kix file is not practical as I have to keep changing the "\\serverwhatever" to whatever the server name is in the udf file. I use the same script for every client, so I only have one script to update.

Why do you guys do to address this issue as I don't think a readline (handle) type coding works in global. But if I want to install a printer for example, I need to have \\servername\printername in the script. I do a readline (handle) for the printer name, no problem, but thats not global and I need the server names global as there are many lines of coding pointing to \\servername\location whether is wsus, printer, a specific directory, mapped drive etc.

Thanks