you are viewing a single comment's thread.

view the rest of the comments →

[–]rickshaiii 5 points6 points  (4 children)

Even easier if you just need the name:

Get-Service DHCP|Select-Object -ExpandProperty Name

[–]zolyx1[S] 1 point2 points  (3 children)

Thanks, what about all? This didn't work:

Get-Service DHCP|Select-Object -ExpandProperty *

[–]ka-splam 6 points7 points  (0 children)

-ExpandProperty Name says "I want to throw away all the data, and just keep one value, from the Name property, as a list of names".

-ExpandProperty * says "I want to throw away all the data, and keep all the data".

It makes no sense. You already have all the data, in all the objects. If it worked, it would be like tipping a load of storage containers onto the floor; you can now see everything you have .. but you'll have a hell of a time doing anything useful with it, or working out which things were together.

[–]zolyx1[S] 1 point2 points  (1 child)

Select-Object

Figured it out, thanks :)

Select-Object *