PowerShell Objects and Properties
In this lab, you will learn that PowerShell commands return objects, not plain text. You will examine the properties and methods of PowerShell objects, select specific properties, and sort and filter object data.
Session duration: 30 minutes· Typical launch: ~3 min
Difficulty
Beginner
Lab level
Lab VMs
1
1 Windows
XP Reward
150 XP
On completion
Virtual machines
Lab VMs
Windows
SADC01
Windows
Username / Password
user / password123
Connection type
In-browser RDP / RDP
CPU / RAM
—
Lab instructions
Follow the steps below to complete the lab.
In this task, students will learn that PowerShell commands return objects, not plain text.
- Login with username
ladminand passwordpassword123. - Open Windows PowerShell as Administrator.
- Display a list of running processes:
Powershell
- Examine the properties and methods of a process object:
Powershell
- Display only the Name, Id, and CPU properties of each process:
Powershell
- Display the Name, Status, and DisplayName properties of all services:
Powershell
- Display the properties available for a service object:
Powershell
- Display the five processes using the most memory:
Powershell
- Display only running services:
Powershell
- Display the operating system version:
Powershell
- Let’s use the get-childitem command.
Powershell
- Export the running services to a CSV file in the Downloads folder:
Powershell
- Click Check step to proceed.