IT Infrastructure Blog

Welcome

Filed under: Uncategorized — Colleen Romero @ 4:44 pm

Welcome to the RSC West Midlands IT Infrastructure blog.  Our remit is to support learning providers in the effective use of information technology, and one aspect of this is experimenting with this technology. Our internal systems comprise a Windows Server 2003 Active Directory domain with 13 Windows XP clients, a SharePoint server, and a few Linux servers running applications such as Moodle, MediaWiki, WordPress and Mahara.

As the IT Infrastructure advisor, I am the main person responsible for managing our internal systems, and as a result have done some work with Active Directory, desktop management, scripting etc. and thought it would be useful to share what I learnt with others.  Hence this blog.

Disclaimer: I will do my best to support any learning provider who wants to try the code samples provided with this blog, but be advised that you will be using these resources at YOUR OWN RISK, and neither I or nor the RSC West Midlands will accept liability for any problems their use might cause.

April 19, 2011

Using SharePoint for Moodle file storage

Filed under: Document Management, Moodle, SharePoint — Colleen Romero @ 11:33 am

By default, Moodle 1.x stores course files in a directory on the Moodle server.    Microsoft Education labs has published a white paper on configuring Moodle to use a SharePoint document library for file storage.   The advantage of this approach is that the recovery, versioning and rich search features of SharePoint can be applied to Moodle course files.  If SharePoint is already being used for managing other electronic documents, then it would also be of benefit to use the same platform to manage Moodle files.

The instructions in the white paper are relatively explicit, but I am documenting the steps I took to set up SharePoint Services v3 as a file repository for Moodle 1.9 running on CentOS with an Apache web server.  The Moodle and SharePoint servers are on the same subnet.  The SharePoint server is not a member of an Active Directory domain.   A full backup of your Moodle site should be done beforehand. (more…)

October 22, 2010

Managing Automatic Updates

Filed under: Freeware / Trialware, Scripting, System Administration, Windows — Colleen Romero @ 3:31 pm

Once I figured out how to automatically boot up our training room PC’s (see Wake-on-LAN post), the next challenge was to have the PC’s automatically download and install windows updates and then shut themselves down.  Although Windows Update can be configured to download and install updates automatically at a set time, users were still prompted to install updates on subsequent boots.  Furthermore, I could not find a way to force a shutdown after the update completes.

Fortunately, there is a Windows Update Agent (WUA) API which is accessible via VBScript, and I found a script that uses the WUA objects to download and install updates from a Windows Server Update Services (WSUS) server.   The script can be found on MSDN (here).  The only problem was that the script has to be run on the computer being updated, and I wanted to manage the update process centrally.   Both PSEXEC (a free Microsoft tool, click here for more information) and WMIC are able to run programs remotely, but neither seemed to work in this instance. 

My solution was to create a script that used the SCHTASKS command to schedule a one-off task to run the Windows Update script and shut down the computer.  The task schedule script is called by the wake-on-LAN script.  The scripts to set this up can be downloaded from here.

October 6, 2010

Wake-on-LAN

Filed under: Freeware / Trialware, Scripting, System Administration, Windows — Colleen Romero @ 2:13 pm

Our training room is only used occasionally, and therefore its PCs are powered on only when they are needed.  The problem with this arrangement is that it can take ages for all the Windows and virus updates to deploy when the PC is powered on after being shutdown for a while.

One solution would be to power on the PCs at least once a week, preferably after hours, run the updates and then shut them down.   Finding a way to automaticaly power on the PCs is the first step to implementing this solution.  Fortunately, many modern PCs can be configured to automatically power on in response to a specific message known as a Wake-on-LAN or WOL Packet.  See Wikipedia article for more information.  There are a number of free utilities that can be used to send a WOL packet, such as:

The limitation of these utilities is that they require the MAC address of the PC’s network card.  The MAC address can usually be found printed onto the network card, or by running one of the following Windows commands:

  • IPCONFIG / ALL
  • WMIC NIC GET NAME, MACADDRESS

Manually determining the MAC address is time-consuming for large number of PC’s, and the list has to be updated every time a PC is changed.  My challenge, therefore, was to find a way to automatically send a WOL packet to a group of PC’s (without spending any money, of course).  My solution has the following requirements:

  • Windows XP or higher PC’s
  • Windows Active Directory
  • PCs to be woken up have their IP addresses assigned via DHCP with a lease longer than the frequency of the automatic power-ons
  • PC DNS records updated automatically via DHCP

I created a Windows batch script that uses the Gammadyne Wake on LAN utility, and does the following:

  • Queries Windows Active Directory to get a list of names of the PCs to be woken up.  This can be restricted to a specific organizational unit.
  • For each PC, queries DNS to get the IP address
  • For each IP address, queries the DHCP database to get the MAC address.

I foresee the DHCP lease length being the biggest limitation with this solution.  Another option would be to have a script that runs at startup and writes the MAC address to the PC’s Active Directory record, which the wake up script reads – another post maybe.

I have created two scripts:

  • WakeUpAll.cmd that sends the WOL packet to all PC’s in a specific Active Directory OU
  • WakeUpByName.cmd that accepts the PC name as a parameter

These scripts are in a zip file which can be downloaded from here.

August 27, 2010

Removing Users From Moodle Course Backup

Filed under: LDAP, Linux, Moodle, Scripting — Colleen Romero @ 2:44 pm

I was trying to transfer a course from one of our Moodle sites to another, and I wanted to include user data, so I selected the option to include Course users in the backup.  However, during the restore, I got an error that a user in the backup file conflicts with an existing user.

The conflict was because staff members log onto our Moodle via LDAP, so the same user accounts were present at both sites.  Removing the duplicate accounts from the destination Moodle may have solved the issue but I did not want to risk other problems.

Fortunately, I found a solution.  The course backup set contains a manifest file – moodle.xml – which contains a list of users included in the backup.  Removing the user record from the file will prevent the user data from being restored.

(more…)

Deploying Second Life via Group Policy

Filed under: Freeware / Trialware, Group Policies — Colleen Romero @ 1:48 pm

We run Second Life events in our training room, and I've found deploying the Second Life viewer in such an environment to be a hassle.  This is because the Second Life installer is only available as an EXE so it cannot be assigned via Group Policy.  To make things more complicated, the viewer checks whether an update is available and tries to force you to upgrade, but non-administrators are blocked from installing software on our training room PCs.

Fortunately, there is software that can generate an MSI from an installed application.  I was able to deploy Second Life Viewer on our training room network using this method, as follows:

(more…)

Older Posts »

Powered by WordPress