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 Server export to network share with script?

Status
Not open for further replies.

ADB100

Technical User
Mar 25, 2003
2,399
GB
I have two IAS servers used for various RADIUS authentication tasks (VPN, Wireless etc). I had a working script that executed as a scheduled task that exported the configuration from the 'Master' at 15:00 every day. The script also took a copy of the created file and wrote it back to the same share adding the date & time to the filename. At 15:05 the 'Slave' imported the configuration.
A while ago the export just stopped working and all I can think of is a Windows Update stopped it working as the script hasn't changed. If I run the script manually it works fine, as a scheduled task it fails to create the 2nd file with the date & time.
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%

The task is set to run with an administrator account and I have verified the password is correct.

Any ideas why this isn't working or what to modify to make it work?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top