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 I get a List of CPU’s and Installed Printers, Last Boot-up Time 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

Get a List of CPU’s & Installed Printers, Last boot-up Time

In this lecture we are going to use Powershell to perform several useful tasks starting with getting a list of CPU’s on your local or remote computer.

From the Host open PowerShell ISE in admin mode.

Go ahead and copy and paste the Get-WMIObject command into PowerShell

(Get-WMIObject CIM_Processor).Name

Here is the explanation:

The command Get-WmiObject CIM_Processor is used to retrieve information about the computer's processor(s) using Windows Management Instrumentation (WMI). It queries the "CIM_Processor" class, which contains various properties related to the computer's CPU(s).

.Name is used to access a specific property of the retrieved object. In this case, it's accessing the "Name" property of the processor(s). The "Name" property typically contains information about the processor's name or description, which often includes details about the CPU model and specifications.

So, when you run Get-WmiObject CIM_Processor).Name, it will return the name or description of the processor(s) installed in your computer as a text string. This can be useful when you need to identify and gather information about the CPU(s) in a PowerShell script or command.
and there is my i7 8700 CPU and the CPU speed is  3.20GHZ

Get a list of installed Printers

For this command,  we are going to take a look at the installed printers on a local or remote computer.

Go ahead and copy and paste the Get-WMIObject Win32_Printer command into powershell

(Get-WMIObject "Win32_Printer").name

Here is the explanation:

This PowerShell command is used to retrieve and display the names of all printers installed on your computer. Let's break down the command step by step:

(Get-WMIObject "Win32_Printer")

This part of the command uses Get-WmiObject to query information about printers.

"Win32_Printer" is a WMI class that represents printers on a computer.

.name:

Once the WMI objects representing the printers are retrieved, .name is used to access the "Name" property of each printer object. The "Name" property typically contains the name or description of the printer.

So, when you run this command, it will retrieve the names of all printers installed on your computer and display them as a list of text strings. This can be useful when you need to obtain a list of installed printers using PowerShell.
And listed is my HP7900 series printer.

The Last Boot up time

This command retrieves the last boot-up time of a Windows operating system using Windows Management Instrumentation (WMI).

Here is the command:

(Get-CimInstance Win32_OperatingSystem).LastBootUpTime

Here is the explanation:

1.  (Get-CimInstance Win32_OperatingSystem): This part of the command uses the Get-CimInstance cmdlet to retrieve information about the Windows operating system. Specifically, it's querying the Win32_OperatingSystem WMI class, which contains various properties related to the operating system.

2.  .LastBootUpTime: Once the information about the operating system is retrieved, this part of the command accesses a specific property of the returned object, which is LastBootUpTime. This property contains the date and time when the operating system was last booted up.

So, when you run (Get-CimInstance Win32_OperatingSystem).LastBootUpTime in PowerShell, it will display the date and time of the last system boot.
And there is the date and the time of the last boot up of my computer.

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