Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IAS Export & Import script?

Status
Not open for further replies.

ADB100

Technical User
Mar 25, 2003
2,399
GB
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:
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%
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top