Securly has recently allowed automated uploads of guardian contact details. This requires getting your guardians details into a csv file in a specific format. This is easy to do manually - but takes a little work to do automatically. This is the procedure that I use to extract the data from Capita SIMS and sync it to Securly on a daily basis. You can see the basic Securly guide here - but don't believe the bit about the columns being in any order - I've found they have to be in the order specified!
Note - you have to edit the names of the fields to the ones Securly want.
I run this on a daily schedule and output the result to a csv file on a virtual machine that I use for lots of automated tasks.
"C:\Program Files\SIMS\SIMS .net\commandreporter" /user:xxxxxxx /password:xxxxxxx /report:"securlyreport" /OUTPUT:\\Win10man\gam\parents.csv /QUIET
$Path = "c:\gam\parents.csv"
(Import-CSV -Path $Path) | Select-Object -Property 'Parent First Name', 'Parent Last Name', 'Parent Email', 'Student First Name', 'Student Last Name', 'Student Email'| Export-CSV -Path $Path -notype
(gc C:\GAM\parents.csv) | % {$_ -replace '"', ""} | out-file C:\GAM\parents.csv -Fo -En ascii
Now we are ready to upload the file. To do this I use WinSCP. Securly provides credentials for their ftp upload server specific to you and the setup procedure is detailed here. WinSCP provides and easy scripting tool that will generate a script you can run as a scheduled task. Check in your Securly admin console that the upload has been successful.
That's it - no more manual uploads.
SIMS Report
The field I use are:Note - you have to edit the names of the fields to the ones Securly want.
I run this on a daily schedule and output the result to a csv file on a virtual machine that I use for lots of automated tasks.
"C:\Program Files\SIMS\SIMS .net\commandreporter" /user:xxxxxxx /password:xxxxxxx /report:"securlyreport" /OUTPUT:\\Win10man\gam\parents.csv /QUIET
Modifying the output to meet the Securly requirements
SIMS outputs csv files with double quotes around each entry. Securly cannot cope with this and you also need to columns in the right order. So after the report runs a PowerShell script runs to reorder the columns and remove the quotes:$Path = "c:\gam\parents.csv"
(Import-CSV -Path $Path) | Select-Object -Property 'Parent First Name', 'Parent Last Name', 'Parent Email', 'Student First Name', 'Student Last Name', 'Student Email'| Export-CSV -Path $Path -notype
(gc C:\GAM\parents.csv) | % {$_ -replace '"', ""} | out-file C:\GAM\parents.csv -Fo -En ascii
Now we are ready to upload the file. To do this I use WinSCP. Securly provides credentials for their ftp upload server specific to you and the setup procedure is detailed here. WinSCP provides and easy scripting tool that will generate a script you can run as a scheduled task. Check in your Securly admin console that the upload has been successful.
That's it - no more manual uploads.
Comments
Post a Comment