Oh Yes, We Get to Use Commandlets!

I started upgrading some of the machines around the office to the new version of Office for Forced down the Microsoft Path AgainMac — the Office:Mac 2011 version. I have to admit it is really pretty nice except for a few things and I wasn’t complaining until the users started taking their laptops out of the office. I soon found out that they couldn’t connect to our Exchange server. Upon further investigation, what we discovered was that unlike Entourage every time Outlook 2011 is started that it queries the server to refresh the server account settings and for some reason it was using only the internal name of my server instead of the external URL similar to what everyone would be using for the OWA (Outlook Web Access) interface. After a bunch of research, I found that I had to stipulate the external address specifically for the Outlook Anywhere functionality using some commandlets.

Here’s how to do it. Open up your Exchange Power shell interface and put in these settings using Commandlets for publishing Outlook Anywhere configurations using your real servername and real external address:

Enable-OutlookAnywhere -Server servername -ExternalHostname “mail.yourdomain.com” -ExternalAuthenticationMethod “Basic” -SSLOffloading:$False

Set-OABVirtualDirectory -identity “servername\OAB (Default Web Site)” -externalurl https://mail.yourdomain.com/OAB -RequireSSL:$true

Set-WebServicesVirtualDirectory -identity “servername\EWS (Default Web Site)” -externalurl https://mail.yourdomain.com/EWS/Exchange.asmx -BasicAuthentication:$True

To make sure you entered it correctly you can look up the URLs for web services with the following command:

Get-WebServicesVirtualDirectory | Select name, *url* | fl

It is worthwhile to make sure that you have to have some other things in place correctly such as the appropriate DNS settings as well as the right SSL SAN certificate set up in IIS. I had these all correct and it wasn’t an issue until this latest version of Office 2011 for Mac was used.

Oh Honey, There’s One Thing Missing…

I recently decided to upgrade my wife with a new to 64-bit Windows 7 laptop. Everything went quite smoothly and I had all the applications and data, even the little stuff like bookmarks, moved over and running just great… at least until she decided she needed to print something. “Oh yeah, no sweat! I forgot to add the printer for you!”

Canon didn't provide a 64-bit driver for my printer.
Canon has not updated many of their older printers, like this MF3110 model with 64-bit drivers for XP, Vista or Windows 7.

Our printer is a Canon MF3110 black and white multifunction laser which is shared off an older Vista computer. We leave it running and use as our home file and printing “server.” Much to my disappointment, I found out that Canon decided not to create 64-bit drivers for that model (as well as a lot of their other printers that are a few years old). Now don’t hear me complaining too loud about Canon. I love a lot of their products and especially that printer, mainly because I can find toner cartridges at ridiculously low prices and it never seems to break down.

After looking around online I saw where someone had done something similar and shared that model of printer from a XP workstation out as a generic postscript printer using the Ghostscript software for a Linux Ubuntu system in order to print to it. I decided I’d try to see if I could do the same thing, but instead share it to the 64-bit Windows 7 laptop. Sure thing, after a bit of tweaking, it worked like a charm!

Here’s what I did:
On my 32-bit computer where my Canon printer is located, I downloaded and installed the following three programs:

Ghostscript Windows 32-bit version:
http://pages.cs.wisc.edu/~ghost/doc/GPL/gpl864.htm

GsView Windows 32-bit version:
http://pages.cs.wisc.edu/~ghost/gsview/get49.htm

Redmon Port Redirector:
http://www.is-foehr.de/

I didn’t really do anything custom or special during the installs. I just let them run their course.

Again, on the same computer where the Canon printer is, I added a new local printer. I named it something generic like Canon64b, (and then here’s the first tricky part) on the very next screen I selected “Create a new port” and selected “Redirected Port” and named it “RPT1:” which should be the default. Then for the model and driver of the printer, I used something really generic “MS Publisher Imagesetter” that should already have drivers on all Windows systems (including 64-bit versions). Then I shared out the printer to “everyone.” The other tricky part was within the Properties of the printer to go to the “Ports” tab and click on the “Configure Port” button for the RPT1 port and set up the correct parameters:

In the “Redirect this port to the program:” field I put in the gsprint program’s location:
C:\Program Files\Ghostgum\gsview\gsprint.exe

For Arguments in the next box down, I put in the name of my real printer which is on the computer like this:
-printer “Canon MF3110” –

Note: is important to include the quotes around the printer, a space and then a dash for this all to work properly.

In the Output area: select “Program handles output” and make sure the printer section is pointing to the real printer. The Run field should be selected as “Hidden

Then I applied all the changes.

Interactive Hiccup
In order to get it to run without interaction and prevent displaying a confirmation message every time I print a page, I had to copy a registry string value key using regedit

From this location:
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Devices

To this location:
HKEY_USERS\.DEFAULT\Software\Microsoft\Windows NT\CurrentVersion\Devices

The key should be named the same as your real printer and look something similar to this:
Canon MF3110 REG_SZ winspool,Ne03:

After adding the registry key, on my 32-bit computer, I ran a test print from my new virtual Postscript printer and made sure it printed fine.

Then I went to my wife’s laptop and added the new network printer and was able to print… crisis averted and happy wife!

 


Server temperature graphic

I had an issue where at one of my remote offices an air handling unit was failing and the server room was heating up far beyond the recommended operating temperature. There were people working in that remote office, but I couldn’t rely on them to check on it daily and nobody was there over the weekends. I looked around and there were a few different devices and software products for monitoring temperature, but some were quite expensive.

I decided to play around and see if I could get a method working where I could monitor the temperature using something built-in and basic. I had read that most Dell servers have temperature probes that monitor air temperature for ambient air as well as planar (off the CPU/motherboard) and would make that available to the SNMP service specifically within the MIB-Dell-10892 specification.

I was surprised to find out how easy it was to set up SNMP and MRTG to poll the server and provide me with the readings I was looking for! Here’s how I did it:

First on the server, I enabled the SNMP service. It was a Windows server, so it was as simple as going to Start > Control Panel > Add/Remove Programs > Add/Remove Windows Components > Management and Monitoring Tools > [Details] > Select “Simple Network Management Protocol” to install it. Then to make sure there was a reasonable level of security, I went to the Services applet, found the SNMP Service and chose a READ ONLY community string and specified the IP of my monitoring host under the Security tab. I made sure the service was started.

Then I made sure to allow the UDP 161 and UDP 162 ports associated with SNMP were allowed through the firewall.

Next I put in the following settings into my MRTG configuration file. To tell you the truth, the hardest part was determining the calculation and syntax in order to get it to convert from Celcius to Farenheit!  Be sure to replace my IP and snmp community string with the IP and community string of your host in the configuration file settings.

################################################
WorkDir: /var/www/mrtg
### Measure Planar and Ambient Temps
#—————————————————————
Target[10.1.100.100.temp]: 1.3.6.1.4.1.674.10892.1.700.20.1.6.1.1&1.3.6.1.4.1.674.10892.1.700.20.1.6.1.2:readonlycommunitystring@10.1.100.100 / 10 * 1.8 + 32
MaxBytes[10.1.100.100.temp]: 150
Title[10.1.100.100.temp]: Planar and Ambient Temperature – Remote Server
PageTop[10.1.100.100.temp]: <H1>Planar and Ambient Temperature – Remote Server</H1>
Options[10.1.100.100.temp]: gauge, integer, nopercent
YSize[10.1.100.100.temp]: 220
YTics[10.1.100.100.temp]: 11
YLegend[10.1.100.100.temp]: Temp degrees F
ShortLegend[10.1.100.100.temp]: deg F
Legend1[10.1.100.100.temp]: Temperature1
Legend2[10.1.100.100.temp]: Temperature2
Legend3[10.1.100.100.temp]: Legend3
Legend4[10.1.100.100.temp]: Legend4
LegendI[10.1.100.100.temp]: MotherBD Temp 1:
LegendO[10.1.100.100.temp]: Ambient Temp 2:
###################################################