Forum Discussion

Dzej27's avatar
Dzej27
Copper Contributor
Mar 02, 2021
Solved

Select-Object -Property

Hi everOne!   I'm completely beginner in this field saying "PowerShell"  And maybe it could be a stupid question but like someone said "stupid question doesn't exist" soo , here i am 😜    I have...
  • farismalaeb's avatar
    Mar 02, 2021

    Dzej27 

    Hi Jacob,
    There is no silly, question you are welcome to ask what you want, we all been through the learning process.
    There is a nice command in PowerShell called, Get-Member
    You can use it after a pipeline of any command, and you will get all the property and methods.
    for example. the 

    Get-WMIObject -class Win32_operatingsystem

    will return only few information about the OperatingSystem class.

    but if you need to know more and other property, you will Pipeline the command to | Get-Member so it will be like

    Get-WMIObject -class Win32_operatingsystem | Get-Member

    from here you can know what are the available things you can place in your select.

    I recommend having also a look at the different between the Property and Method.

    Enjoy

     

     

    -----------------

    If this answer help, please click on best response.

Resources