I had a working CMD script that was scheduled using Task Scheduler that runs everyday at 15:00. It uses netsh to export the IAS configuration to a UNC share and then create a copy of the file with the date & time appended to the filename:
This stopped working a while ago and all I can think of is a Windows update as nothing else has changed - the user account details configured in Task Scheduler are correct, the script runs OK when run manually?
Anyway I was hoping I could achieve the same with a VBScript (or other script?). Can anyone help?
Andy
Code:
netsh aaaa show config >\\server.company.local\share\IAS-Policy\ias-policy
Set CURRDATE=%TEMP%\CURRDATE.TMP
Set CURRTIME=%TEMP%\CURRTIME.TMP
DATE /T > %CURRDATE%
TIME /T > %CURRTIME%
Set PARSEARG="eol=; tokens=1,2,3,4* delims=/, "
For /F %PARSEARG% %i in (%CURRDATE%) Do SET DDMMYYYY=%i%j%k
Set PARSEARG="eol=; tokens=1,2,3* delims=:, "
For /F %PARSEARG% %i in (%CURRTIME%) Do Set HHMM=%i%j%k
copy \\server.company.local\share\IAS-Policy\ias-policy \\server.company.local\share\IAS-Policy\ias-policy_%DDMMYYYY%%HHMM%
Anyway I was hoping I could achieve the same with a VBScript (or other script?). Can anyone help?
Andy