Saturday, August 10, 2013

How to upload PDFs and other files onto a Facebook Group

This is not too hard, but sometimes I forget :)

To upload a PDF or other file to your Facebook group, you just go onto the group page where you can type a status update, and click the "Add File" button (see image below).

However, I don't think this currently works for personal or public Facebook pages, sorry!

Thursday, June 20, 2013

How to use a DLL in ASP.NET page using Microsoft Visual Web Developer Express

So you've created a DLL assembly for shared code (perhaps using Microsoft Visual Basic Express or some other), and you want to use it on your website, accessing a public class from the DLL. This is how I did it in Microsoft Visual Web Developer 2010 Express edition...

STEP 1: Add a reference to the DLL to your website.

  1. In Solution Explorer, select your Web project.
  2. On the Website menu (for Web site projects) or the Project menu (for Web application projects), choose Add Reference. Alternatively, you can right-click the name of your Web project in Solution Explorer and then select Add Reference.
    The Add Reference dialogue box is displayed.
  3. Select the Browse tab.
  4. Browse to the folder that contains the assembly you want to reference, select the assembly, and then click OK.

    Adding a reference in this way ensures that all file dependencies (debug files, XML document files, and so on) are copied.

STEP 2: Use the public class from the DLL on you page

Use Imports to utilize the namespace from your DLL, then simply use Dim and New to instantiate a new object using a public class from the DLL. ie:

Imports MyDLLNameSpace

Dim myObject As New dllPublicClass 

If you just use the Dim statement Visual Web Developer should prompt you to add the Imports statement.


Wednesday, June 12, 2013

Managing Windows Printer Drivers (Updating, Removing, etc)

Strangely, for all my years of Windows experience, I have only just discovered the Print Management administration console :O I recently had a problem where different users/computers had different drivers for the same printer, and some drivers worked, some didn't. So how do you check which version of the driver is installed on the computer or on the print server? And how do you update them or remove them etc? The answer is: use Print Management.

This page from Microsoft has instructions for managing printers and printer servers on Windows 7 and Windows 2008 R2:

In particular, this link has instruction for managing the printer drivers, including instructions for adding, updating and removing drivers (again, the instructions are particularly for Windows 7 and Windows 2008 R2, but the instructions are pretty much the same for Windows XP and Windows 2003 R2):

Here are some screenshots showing where to find the Print Management icon in Administrative Tools (and you can get to Administrative Tools from the Control Panel), in both Windows 2003 R2 and Windows 7...

Once you are in the Print Management interface you can see all the Driver version numbers, and by right-clicking on a driver you can update or delete the drivers. I especially needed to do this to update the 64-bit driver on a 32-bit server. Using the normal Printer Properties interface only updated the 32-bit version of the drivers, and once I went into Print Management I discovered that the 64-bit versions were still the old ones.

(PS: The particular problem I had was with Kyocera drivers. Maybe just me, but I haven't had good experiences with this brand. I prefer HP all the way. I have used Toshiba multifunction printer/copiers, and they have generally been ok, but driver support also has sometimes had issues.)

Thursday, April 11, 2013

Can Macs get viruses or malware?

Can an Apple Mac computer get a virus? Yes! There is a common misconception that Mac computers can never get viruses, that malware is only a Windows problem. Well that's not true. Probably there are more viruses out there that attack Windows computers, but it doesn't mean it is impossible to get a virus on a Mac. An Operating System, like any complex software, is likely to have many security holes or bugs that could be exploited by a malicious attacker. So yes, it is definitely possible for a Mac computer (or iPad or iPhone or Android or whatever) to get a virus or malware.

As with Windows computers, you have to keep your Mac software up-to-date. Newer versions have built-in anti-virus protection that is kept up-to-date by Apple (as long as you do the updates). Older versions of Mac OS may not be as safe, and you may need to install anti-virus software.

Here is a User Tip from the Apple Support Communities site about protecting your Mac:

Harden your Mac against malware attacks

Here is some free antivirus software available for Mac OS X:

Of course, there are also protection products you can purchase from companies like Symantec/Norton, Sophos, McAfee etc.

Monday, February 18, 2013

Free DNS hosting service?

I haven't actually used it yet, but I found this free DNS Hosting service available. Use it as your primary DNS, or as backup. Here it is:

Thursday, January 24, 2013

How to change the username in Office 365

I had a problem recently while doing a Staged Migration from Exchange 2007 to Microsoft Office 365. At the on-premises site, the Active Directory had a setup as follows:
  • User first name: First (eg Joe)
  • User last name: Last (eg Bloggs)
  • User login name: firstl (eg joeb)
  • User primary email: (eg
The problem was, when user accounts were migrated to Office 365, sometimes the UPN (User Principal Name) came across as, other times as This was a bit confusing for users to have a username which looked like an email address ( but was different to their usual email address ( Not only that, there was a hiccup with one user who got the default domain for their primary email address (eg It would be much better if all user accounts consistently used for both username and primary email address.

How to change the UPN?

So how did I change the UPN for those users to be the same as their primary email address? In the end I used PowerShell for Microsoft Online, and these are the steps I followed:
  1. Installed Microsoft Online Services Sign-In Assistant (IDCRL7) - 64 bit version
  2. Installed Microsoft Online Services Module for Windows PowerShell (64-bit version)
  3. Clicked the Microsoft Online Services Module shortcut to open a Windows PowerShell workspace
  4. Ran "connect-MSOLService" to connect to Microsoft Online (and entered username and password for Office 365 administrator account)
  5. Ran "Set-MsolUserPrincipalName -UserPrincipalName -NewUserPrincipalName"
These are the references I used to get to this result:

How to change the primary email address?

How about the account which had the wrong primary email address? For this one I needed to change the Proxy Addresses for the account, and because the Office 365 users were still synchronized with the on-premises Active Directory, I had to use ADSIEdit.msc to change the proxyAddresses attribute for that account, specifying SMTP in all-caps, for the address I wanted to use as the primary email address. I followed the instructions I found in Step 4 of the Solution in the following Microsoft KB article:

Here is a copy of the main steps from that KB article:
Use Active Directory Service Interfaces (ADSI) Edit to edit the proxyAddresses attribute of the user object so that it matches the primary SMTP address that you noted in step 1D. To do this, follow these steps:
  1. Click Start, click Run, type ADSIEdit.msc, and then click OK.
  2. Right-click ADSI Edit, select Connect to, and then click OK to load the domain partition.
  3. In the navigation pane, locate the user object that you want to change, right-click it, and then click Properties.
  4. In the Attributes list, click the proxyAddresses attribute, and then click Edit.
  5. In the Value to add field, enter the appropriate SMTP address, and then click Add.
Note The primary SMTP address value for the user object should be prepended by an uppercase "SMTP:" designator for the address value to be formatted correctly for the proxyAddresses attribute. For example, "" is an acceptable value, and "" isn't an acceptable value. f.Click OK two times, and then exit ADSI Edit.
(It was this forum discussion that helped me get to the answer: