Help System Lab Answers 1-4
Here are the answers to the help system lab questions.
- Question number one
Get-service. The question was run get-service on the machine pick a service that is currently running. Now get the dependent services of the service that you have chosen. You can choose any service that is running, get-service, go ahead and check that out. We'll scroll up. And here's the status of our services. Some are stopped. Some are running OK.
We're going to choose BFE which is the base filtering engine. Now we can get a little bit of information on that we'll get-help and get-service. And -showwindow press return.
Here are our examples. OK, we want to find an example that says something about the dependent services of the service you have chosen. OK so let's get down to these examples. Get all the service on the computer. No that's not it. Example 2, 3, example 4, example 5. example 6, example 7, lists the services on the local computer, no
Example 8 sorts Service, No. Example 9 get service on multiple computers and example 10, get the dependent services of a service. Okay, that sounds like it. So we want to type this like what it says there. Get-service. Now we want quotes and BFE because that's the service we chose and quotes on the other side of that. Now our parameter -dependentservices press return now press return again. Now here are our dependent services. For the BFE or the base filtering engine.
- All right question number two
get event-log. We wanna to list all the logs that are currently on the computer. I've already shown you how to do that get-eventlog. And to list them you just type in -list. Ok, there's all our logs on the machine. Okay now, what we want to do is we want to get the 20 most recent entries from the system log. Okay, so we need to get some information a little bit help on get-event log. Get-help and get-EventLog and -showwindow and press return. Ok, we want to get down to the examples and find an example that talks about the newest entries to the to whatever log, see example two get the five most recent entries from a specific event log. Okay, that sounds pretty close to what we what we need here. Let's try that. Get-eventlog ok, and we want -newest ops is wrong OK. Whoops, that's wrong go back. Newest and the question says newest 20.
We want that, and now we want to type -logname, and we wanted the system log. Here's our logs and you just choose system and press return. We can minimize this. These represent the newest was the latest 20 entries in our system law. Ok cool.
- Question number three
We're going to be using the get-command. We've seen that before. We want to get all the commands of all types. So let's go ahead and type get-help. Ok. get-command and -showwindow. Let's take a look. Example 1 to example 6.
Now, look at 7 are and get dynamic parameters. You look and get all the commands of all types. Okay, that's what we want. There is the answer to our question. Get-command space asterisk. Let's try that get-command. Move this with over command space and then astricks. Okay hit return and look at all these commands. They just keep going and going. Okay great. Let's go ahead and clear the screen.
- Question number four
We’ll be using the get-content command here. The question was from the root of your C drive. Create a folder called content. Ok, we've already created that's possible. Okay, there's our folder we created a folder don't simply just right click and say new and folder and type content there. Okay so we've already done it, and there's no or there's no file here so let's go ahead and type notepad. So we want to go ahead and create a few lines. This is a test. Hello there. And we're going to save that, Save-as and we want to go down to the C Drive, and go to the content folder, and we're going to save that as test.txt. Okay. Now just go ahead and say that. Close that, now let's go ahead and get some help on get-content get-help get-content and -showwindow. I'm sure you're seeing by now how we can build these commands find these commands in the examples. And let's see what we can do with this. We want to get the contents of our text file. Let's see what we got. Here's example 1 and there we go. Looks good get content path chapters. Okay, great description this command gets the content of chapter 1.0 text down displays it in the console. It sounds like what we want to do.
Sign up to access the rest of this lesson
You must either log in or sign up to access this lesson.