Hmmm, yes, now I see limitation in this method if you intend to use it with mxds, i.e. precisely identify which services are which.I also see Michael's point; I don't use the map services locally in mxds either - and therein seems to lie the problem with identifying by name - the name property returns that as it is in the map TOC. And that can be changed by the user (or whoever authored the mxd).The only way I can really confidently identify (not really absolutely) with arcpy from the mxd perspective is to examine the contents of the layers within the map service - but then again I must know what a map service contains, and this doesn't always apply to map services obtained from elsewhere (someone else's server). Searching metadata in this case may be your answer.Otherwise, with this since I know precisely what is inside this 'composite' map service, I can rename in in the map TOC (in this case, the 2nd layer 'test', and I know what I have in my datastore and can logically ID it - yes, this is weak, but may be one of your optional work-arounds with arcpy
>>> mapLyrs = arcpy.mapping.ListLayers(mxd)
>>> mapLyrs
[<map layer u'MonroeGISData.DBO.BM_MileMarkers'>, <map group layer u'test'>, <map group layer u'Overview'>, <map layer u'MileMarker'>, <map layer u'Overseas Hwy - US 1'>, <map layer u'Base Map Annotation Water'>, <map group layer u'Base Map Annotation'>, <map layer u'Overview'>, <map layer u'Overview Island Level'>, <map layer u'Monroe County Boundary'>, <map layer u'Miami-Dade County Boundary'>, <map group layer u'MCPA'>, <map layer u'Roads'>, <map group layer u'Parcel ID Text'>, <map layer u'Default'>, <map layer u'Parcels'>, <map group layer u'Historic Areas'>, <map layer u'Historical Structures'>, <map layer u'Tavernier Historic District'>, <map layer u'Marsh Rabbit Buffer'>, <map layer u'Marsh Rabbit Habitat'>, <map layer u'Endangered Species'>, <map layer u'Habitat 2009'>, <map group layer u'Tier Overlay District'>, <map layer u'Tier Overlay District'>, <map layer u'Tier Labels'>, <map group layer u'FEMA'>, <map layer u'Flood hazard zone lines'>, <map layer u'DFIRM panel labels'>, <map layer u'Flood hazard zone text'>, <map layer u'CBRS'>, <map layer u'Zoning'>, <map layer u'FLUM (Draft)'>, <map layer u'2006 Orthophotography'>, <map layer u'2009 Orthophotography'>, <map layer u'2012 image catalog'>]
EDIT:Interesting, I have never used this command before:ListMapServicesResource Center » Professional Library » Geoprocessing » The ArcPy site package » Mapping module » Functions » Managing Documents and Layershttp://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/ListMapServices/00s30000004s000000/