Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to select only the 'Name' property from the process list.
PowerShell
Get-Process | Select-Object [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-ExpandProperty' instead of '-Property' when you want to keep the property as an object.
Using '-InputObject' which is not valid here.
Using '-Filter' which is not a parameter for Select-Object.
✗ Incorrect
Use '-Property Name' with Select-Object to select the 'Name' property.
2fill in blank
mediumComplete the code to select the 'Id' property from the process list.
PowerShell
Get-Process | Select-Object [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-ExpandProperty' which extracts the value instead of keeping it as a property.
Using '-InputObject' or '-Filter' which are not valid parameters here.
✗ Incorrect
Use '-Property Id' to select the 'Id' property from the process objects.
3fill in blank
hardFix the error in the code to select the 'CPU' property from the process list.
PowerShell
Get-Process | Select-Object [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-ExpandProperty' which returns only the value, not an object with property.
Using '-InputObject' or '-Filter' which are invalid here.
✗ Incorrect
Use '-Property CPU' to select the CPU property correctly. Other options cause errors or wrong output.
4fill in blank
hardFill both blanks to select 'Name' and 'Id' properties from the process list.
PowerShell
Get-Process | Select-Object [1] [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-ExpandProperty' which only works for one property at a time.
Mixing '-Property' and '-ExpandProperty' in the same command.
✗ Incorrect
Use '-Property Name' and '-Property Id' together to select both properties.
5fill in blank
hardFill all three blanks to select 'Name', 'Id', and 'CPU' properties from the process list.
PowerShell
Get-Process | Select-Object [1] [2] [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-ExpandProperty' which only works for one property and returns values, not objects.
Mixing '-Property' and '-ExpandProperty' in the same command.
✗ Incorrect
Use '-Property' for each property to select multiple properties correctly.