Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Everything in Windows PowerShell is a .NET object, and is available for reflection, including cmdlets, services, and processes. Windows PowerShell extends the .NET type reflector

Everything in Windows PowerShell is a .NET object, and is available for reflection, including cmdlets, services, and processes. Windows PowerShell extends the .NET type reflector to allow simpler access for administrative purposes.

In this step, you will learn how to view the type members of those objects.

1. To view the type metadata for the object output by the Get-Service command, type the following command, and then press ENTER.

PS >Get-Service | Get-Member

The type metadata for the object output by Get-Service is displayed. Note that the data type, in this case the System.ServiceProcess.ServiceController class, is also displayed.

2. To view the type metadata for the object output by the Get-Process command, type the following command, and then press ENTER.

PS >Get-Process | Get-Member

3. To create a new object of type System.Diagnostics.Process and view the type metadata for the class, type the following command, and then press ENTER.

PS >New-Object System.Diagnostics.Process | Get-Member

The type metadata for the System.Diagnostics.Process class is shown.

4. Type the following command, and then press ENTER to view a list of services that the Spooler service depends on.

PS >Get-Service Spooler | Select-Object ServicesDependedOn

A list of services that the Spooler service requires to start is displayed.

USE WINDOWS POWERSHELL, SHOW INPUT AND OUTPUT FOR EVERY STEP MADE AND A SCREEN SHOT FOR EVERY STEP MADE AS WELL

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions