Which gets rid of the multiple spaces and creates a string I can split. However, I want the last field which, depending on how many spaces are in the IIS site name, can vary in index. So, is there any way I can use Split() to get me the *last* field of the string?

Yes, I know this is awflulness at its most, but I don't know how to query IIS through Powershell directly so I'm bodging the thing together.

Any solutions (or complete alternatives) would be much appreciated. It needs to be able to run remotely rather than on localhost.