I like the Windows Server Core OS for its foot print and performance compared to a full blown OS. You can enable what you want and get rid of everything else. The same holds good for Hyper-V Server 2008 as well. However, working with this stripped-down OS can be a real pain. Escpecially, when you connect a removable device like a flash key, there is no notification of the drive letter getting assigned to it, etc. On a full-blown OS, this isn’t a problem as we have the explorer process taking care of showing the notifications.
Coming to the subject of this post, I have been using this script for getting notifications for USB key add/remove events. This script runs in the background and notifies the removable storage events.
1. Download the zip from here
2. Unzip the contents to C:\scripts folder
3. Open Registry Editor from command-line
4. Navigate to HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon and change the value of “Shell” to “cmd /c c:\scripts\InitLogon.bat”
That is it. Next time onwards, whenever you login to the Server Core system, USB_Notify.VBS will start running in the background and pop-up a message whenever a removable device is added or removed. Hope this is helpful.