I have a this batchfile that is working but running to many times.
for /f "skip=1%%1 in ('xxxx csproduct get identifyingnumber') do \\server\postimage$\dnscmd.exe DNSSERVER /RecordAdd test1.com ixx%computername% CNAME ixx%%1.test1.com
Effectivly this just needs to extract the servers serial number as a variable then use it in a DNSCMD.exe to create an alias in DNS..
THe for loop runs twice 1 with the correct variable - secondly with a blank line - which then overwrites the correct first run sequence...
Its driving me nuts - can this easily be done in Scripting host? or....
Hope someone can help!
Cheers
James
for /f "skip=1%%1 in ('xxxx csproduct get identifyingnumber') do \\server\postimage$\dnscmd.exe DNSSERVER /RecordAdd test1.com ixx%computername% CNAME ixx%%1.test1.com
Effectivly this just needs to extract the servers serial number as a variable then use it in a DNSCMD.exe to create an alias in DNS..
THe for loop runs twice 1 with the correct variable - secondly with a blank line - which then overwrites the correct first run sequence...
Its driving me nuts - can this easily be done in Scripting host? or....
Hope someone can help!
Cheers
James