Part of our move was including the building of the new DR environment. Like most people, we cheated, and cloned the production servers to the new environment. One issue was host naming changes. In our DR environment, the host names change due to the location, and roll of the servers. This means that various IIS config options are now incorrect. This is easily fixed with the new AppCmd in IIS7.
appcmd set vdir /vdir.name:"SiteName/virtual_dir" /physicalPath:"\\NewServer\Images"
The command is relatively easy to understand. /vdir.name is the path to the site, and virtual directory, and /physicalPath is the new path. Easy huh?
Due to some unforeseen issues, we had to move our RAS server into a new DHCP scope, and VLAN today. This is usually relatively easy…
- Change Server IP
- Change switch port VLANs
- Change firewall to point to new server
This went smoothly, all being completed in about 2 minutes. But on checking the DHCP scope, the RAS server wasn’t requesting any IP addresses. I recycled the RAS service, but that didn’t seem to help, only hint of an issue for RAS was the generic message about DHCP server not being reachable…
Unable to contact a DHCP server. The Automatic Private IP Address 169.254.71.62 will be assigned to dial-in clients. Clients may be unable to access resources on the network.
Apparently my brain has been on overdrive, and I forgot that moving the server to a different VLAN also made the DHCP requests not reach it. This is easily resolved with a few commands on our switches…
# config t
(config)# int vlan77
(config-if)# ip helper-address 10.13.1.3
(config-if)# exit
(config)# exit
# write
A quick restart of the RAS service, and the new VLAN is hosting its assigned IP scope.
With Windows 2008, the task scheduler is setup differently than earlier. You can use the Com object Schedule.Service to access information about tasks.
Read more…
Windows 2008 doesn’t have SMTP as part of IIS any more. It’s only kept around by shipping the IIS 6 libraries with it, which means it’s managed by the old IIS 6 utilities. We installed SMTP so that our web servers had a relaying agent so if there were any delays talking to the main SMTP server the app wouldn’t crash out. The problem is, the default setting is for the SMTP service to be set to a manual startup, rather than Automatic. This is easily remedied by going through the services management utilities, or powershell one liner…
gwmi win32_service
| ?{$_.name
-like "*SMTP*"} | %{$_.changestartmode
("Automatic")}
This is actually 3 steps. The first step connects to WMI and fetches all the services. The second limits the scope to just services with SMTP in the name. And the third is using the returned object and changing settings.
When run, a buunch of data is returned telling to the state of the command:
__GENUS : 2
__CLASS : __PARAMETERS
__SUPERCLASS :
__DYNASTY : __PARAMETERS
__RELPATH :
__PROPERTY_COUNT : 1
__DERIVATION : {}
__SERVER :
__NAMESPACE :
__PATH :
ReturnValue : 0
You can verify that the command worked properly by looking at the ReturnValue, or by running the command again, but without the set step…
ExitCode : 0
Name : SMTPSVC
ProcessId : 7024
StartMode : Auto
State : Running
Status : OK
Running this command on a 2008 server is about 10 times faster than waiting for the services utility to open.
I have an awful memory, so this is more a bookmark for me than anything. Whilst running home grown scripts for PowerShell, you often see the following error:
File C:\scripts\test.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see “get-
help about_signing” for more details.
At line:1 char:19
+ c:\scripts\test.ps1 < <<<
This is because PowerShell expects the script to be signed (something I have to look into). But as I’m doing basic scripts, you can disable this by using the following command:
Set-ExecutionPolicy RemoteSigned
You can get more details on this by using the following:
Whilst doing the datacenter migration, we decided to upgrade all of our servers at the same time. It was less of a migration, and more of a new install, new location. We upgraded from Windows 2003 x86 platforms, to Windows 2008 x64 platforms. During the migration, we’ve stumbled across some issues…
Read more…
Back in January, Microsoft announced a new project called Tag at CES. In Microsoft’s words, Tag is:
Microsoft Tag is a marketing solution that enables consumers to access and share useful and fun content in a simple way. It also helps marketers engage with consumers in meaningful and creative ways, and to measure effectiveness.
They also call it colorful, and capable of transforming traditional marketing media. I started toying with it a little bit then, but not much until recently when they announced a new API.
Read more…
One of the things I’ve been working on is migrating our equipment over to the corporate domain off of our domain. For the most part, this has been relatively easy, and given me some changes to fix some things I’ve wanted to get to, but not had time to. One of the stumbling blocks was cutting the file server over to the new server.
Read more…
Apparently the folks at Microsoft get bored from time to time, and knock out small handy tools, but never really announce them to the world. Here is one called “RichCopy”. Mentioned on the TechNet magazine this month, the name hints at what it is… An improved copy/move utility, with lots of options. The cool one I have been after for a long while… threaded copy. Check it out… lots of cool bits and pieces.
This is a stupid one that had me baffled today. I am writing a weather app for my Windows Mobile phone. I was defining some custom classes to handle the various different portions of the weather. For example, temperature can be readable in Celsius, or Fahrenheit. So I built a custom class to handle both. I was stumbling on a weird issue of type conversion when I didn’t think there should be one.
Read more…