0%

0/1 Lessons

Course Introduction

• 5min

0 / 2 lessons complete

Getting Started with Windows PowerShell

• 56min

0 / 8 lessons complete

Getting Help and Finding Commands

• 39min

0 / 6 lessons complete

PowerShell Command Syntax

• 33min

0 / 5 lessons complete

PowerShell Objects and Properties

• 35min

0 / 6 lessons complete

The PowerShell Pipeline

• 24min

0 / 2 lessons complete

PowerShell Providers

• 30min

0 / 5 lessons complete

PowerShell Arrays and Variables

• 28min

0 / 4 lessons complete

PowerShell Loops

• 19min

0 / 3 lessons complete

PowerShell Conditional Statements

• 11min

0 / 1 lessons complete

On Premises Lab Setup

• 36min

0 / 8 lessons complete

Basic Domain Administration with Windows PowerShell

• 2hr 27min

0 / 10 lessons complete

Send Emails with PowerShell

• 22min

0 / 2 lessons complete

PowerShell Desired State Configuration (DSC) Basics

• 1hr 48min

0 / 6 lessons complete

PowerShell Modules

• 58min

0 / 7 lessons complete

Powershell Challenges

• 1hr 55min

0 / 23 lessons complete

Section Overview
Full Access Account Required

Video | 5 min

The Trusted Hosts List Challenge
Full Access Account Required

Text | 5 min

The Trusted Hosts List Answer
Full Access Account Required

Video | 5 min

Starting a Remote Session Challenge
Full Access Account Required

Text | 5 min

Starting a Remote Session Answer
Full Access Account Required

Video | 5 min

Rename a Computer Challenge
Full Access Account Required

Text | 5 min

Rename a Computer Answer
Full Access Account Required

Video | 5 min

Change a Password on a Remote Computer Challenge
Full Access Account Required

Text | 5 min

Change a Password on a Remote Computer Answer
Full Access Account Required

Video | 5 min

How to Copy Files To-From a Remote Machine Challenge
Full Access Account Required

Text | 5 min

How to Copy Files To-From a Remote Machine using VSC Answer
Full Access Account Required

Video | 5 min

How to Export Logs to a CSV File Challenge
Full Access Account Required

Text | 5 min

How to Export Logs to a CSV File Answer
Full Access Account Required

Video | 5 min

How to Create Multiple Folders on the Host Machine using Powershell
Full Access Account Required

Text | 5 min

How to Create Multiple Folders on the Host Machine using Powershell Answer
Full Access Account Required

Video | 5 min

Who Rebooted the Server ID1074 Challenge
Full Access Account Required

Text | 5 min

Who Rebooted the Server
Full Access Account Required

Video | 5 min

How can you get Info on all your Hard Drives Challenge
Full Access Account Required

Text | 5 min

How can you get Info on all your Hard Drives Answer
Full Access Account Required

Video | 5 min

How can I get a list of CPU's and Installed Printers, Last Boot-up Time Challenge
Full Access Account Required

Text | 5 min

How can I get a List of CPU's and Installed Printers, Last Boot-up Time Answer
Full Access Account Required

Video | 5 min

How can I Automate Tasks with Task Scheduler Challenge
Full Access Account Required

Text | 5 min

How can I Automate Tasks with the Task Scheduler Answer
Full Access Account Required

Video | 5 min

Course Conclusion

• 1min

0 / 1 lessons complete

How can you get Info on all your Hard Drives Answer

Instructions

Q&A (0)

Notes (0)

Resources (0)

Saving Progress...

Resources

There are no resources for this lesson.

Notes can be saved and accessed anywhere in the course. They also double as bookmarks so you can quickly review important lesson material.

Create note

Getting Hard drive Information

In this lecture I will show you how to access your local or remote systems hard drives including model numbers, Health status.

From the Host, open PowerShell ISE in admin mode:

Go ahead and copy and paste the Get-Disk command
 
Get-Disk | select model, HealthStatus

Here is the Explanation:
The PowerShell Get-Disk cmdlet is used to retrieve information about disks on a Windows system and the select cmdlet to display specific properties. Here's an explanation of each part:

Get-Disk: This cmdlet is used to retrieve information about disks (storage devices) connected to the computer. It returns a list of disk objects, each representing a physical disk or storage device.

| (Pipe Operator): The pipe operator is used to pass the output of one cmdlet as input to another cmdlet. In this case, it takes the output of Get-Disk and passes it to the next cmdlet, which is select.

select: This cmdlet is used to select and display specific properties of the objects in the input stream. In this case, it's used to select two properties: Model and HealthStatus.

Model: This property represents the model or type of the disk. It typically provides information about the manufacturer and the specific model of the disk. For example, it might display "Samsung SSD 850 EVO" for a Samsung solid-state drive.

HealthStatus: This property represents the health status of the disk. It indicates whether the disk is in a healthy or unhealthy state. The possible values for HealthStatus can include "Healthy," "Warning," "Unhealthy," or other similar states, depending on the disk's condition.

When you run this one-liner, it will retrieve information about all disks on the system and display only the Model and HealthStatus properties for each disk. This allows you to quickly check both the disk model and its health status for all disks in your computer.

Here is how you get a list of Hard drives, and also list the free space on each drive.

Copy and Paste the Get-WMIObject command

Get-WmiObject -Class Win32_LogicalDisk | Select-Object DeviceID, Size, FreeSpace

Here is the Explanation:
Get-WmiObject -Class Win32_LogicalDisk
: This cmdlet retrieves information about logical disks on the computer using Windows Management Instrumentation (WMI). It queries the Win32_LogicalDisk class, which provides information about disks, including their drive letters and storage details.

Select-Object DeviceID, Size, FreeSpace: This cmdlet is used to select and display specific properties of the objects returned by Get-WmiObject. In this case, we are selecting three properties:

DeviceID: This property represents the drive letter of the logical disk, such as "C:", "D:", etc.

Size: This property represents the total size of the disk in bytes.

FreeSpace: This property represents the amount of free space available on the disk in bytes.

When you run this PowerShell command, it will retrieve information about all logical disks on your computer and display the drive letter (DeviceID), total size (Size), and free space (FreeSpace) for each disk.

Server Academy Members Only

Sorry, this lesson is only available to Server Academy Full Access members. Become a Full-Access Member now and you’ll get instant access to all of our courses.

0 0 votes
Lesson Rating
Subscribe
Notify of
profile avatar
0 Comments
Inline Feedbacks
View all comments