Question

Explain the following command scripts in your own words, provide sample scripts, run that script, show...

Explain the following command scripts in your own words, provide sample scripts, run that script, show screenshot and explain (Windows PowerShell)

1. Restore-Computer

2. Add-Content

3. Get-Content cat/type/gc

4. Set-Content

5. Clear-Content

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution

1.Restore-computer

"Restore-computer" command used to restore the local computer to the specified system restore point

when you execute this command first it will restart the computer after the restart restore operation will be completed

---

2. Add-Content

"Add-Content" used to append the data to the text file

Example

I have already text file that contains the data

Welcome

To

Now i am going to add the text Chegg

---

3. Get-Content cat/type/gc

"Get-Content" command used to get the content of the item at the location specified as such as text in the file

--

4. Set-Content

"Set-Content" used to write a new content/replace existing content in a file

---

5. Clear-Content

"Clear-Content" used to clear the contents of file but it will not delete the file

---

all the best

Add a comment
Know the answer?
Add Answer to:
Explain the following command scripts in your own words, provide sample scripts, run that script, show...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Task 12: Working with Windows PowerShell ISE You can use the Windows PowerShell Integrated Scripting Environment...

    Task 12: Working with Windows PowerShell ISE You can use the Windows PowerShell Integrated Scripting Environment (ISE) to create, run, and debug commands and scripts. The Windows PowerShell ISE consists of the menu bar, Windows PowerShell tabs, the toolbar, script tabs, a script pane, a console pane, a status bar, a text-size slider and context-sensitive Help. It works for both local and remote scripts. Using the Windows PowerShell ISE gives you many different advantages when creating scripts. Although it can...

  • Task 10: Creating functions In Windows PowerShell, you can declare functions. Functions are reusable pieces of...

    Task 10: Creating functions In Windows PowerShell, you can declare functions. Functions are reusable pieces of code that can be called as many times as you want after you declare them. In this step, you will declare a function, learn about using different types of parameters, and specify default values for these parameters. 1. In the Windows PowerShell ISE, press CTRL+N. 2. In the script pane, type the following code. function Get-Soup ( [switch] $please, [string] $soup = "chicken noodle"...

  • 1. Provide a VERY short review for the ipconfig/ifconfig command. 2. Run the following command: i...

    1. Provide a VERY short review for the ipconfig/ifconfig command. 2. Run the following command: ipconfig /all (Windows) ifconfig /all (Linux/MAC) Report the IP addresses of your DNS servers. These IPs could be IPv6 and/or IPv4, identify them accordingly. Provide a snapshot of the results. 3. Provide a VERY short review for the tracert/traceroute command. 4. Run the following command: tracert www.louvre.fr (Windows) traceroute www.louvre.fr (Linux/MAC) Report the number of hops and time needed to reach the remote location. Provide...

  • SHELL SCRIPT: Provide the following questions with the codes and command line Problem 5: Take 5...

    SHELL SCRIPT: Provide the following questions with the codes and command line Problem 5: Take 5 input arguments in a for loop, but only add the even i values to sum and display the result. Problem 6: Write a shell script that accepts path of the directory and returns a count of all the files within the specified directory. (Hint: use alias to perform cd operation) Problem 7: Write a shell script that takes an ‘count’ value as an input...

  • Question 3 Run the following code and explain, using your own words, what is happening with...

    Question 3 Run the following code and explain, using your own words, what is happening with each variable (w,x,y,z) and what is the difference between ++x and w++ (is there any influence on the result between prefix or postfix ++ operator?). Provide a snippet of the output showing the result. int main() { int w = 20, x = 20; int y = 5, z = 5; y = y + (++x); z = z + (w++); cout << "x="...

  • Copy/Paste your script from 5b here. 4. Let's look at a more complicated script executable. a....

    Copy/Paste your script from 5b here. 4. Let's look at a more complicated script executable. a. Write the following as script6.sh and change its permissions to count for num in d do if num eq 100 then count (count+1) done echo The number 10 was found $count times What is the output? Run the script as ./script6.sh 10 20 30 10 40 20 50 10 60 <enter Summarize what the script does r using the read command. The following script...

  • 1) In your own words, explain what elasticity of supply is signifying. (Put in your own...

    1) In your own words, explain what elasticity of supply is signifying. (Put in your own words – just don’t copy and paste the notes.) 2) Explain why a tax levied on a good with elastic supply will bring in less revenue for the government than one placed on a good with inelastic supply.     3) Briefly explain why both the Elasticity of Demand and the Elasticity of Supply are greater (that is, more elastic) at longer time horizons compared...

  • use TOLEDO OHIO USA IP ADDRESS and typed please! 1 of 1 Environment variables are some of the most useful tools avai...

    use TOLEDO OHIO USA IP ADDRESS and typed please! 1 of 1 Environment variables are some of the most useful tools available to command shell script writers. By default, all Windows systems include a host of environment variables that can provide important information about the system and the current user a Run ipconfig /all in the command line. What is your computer's running Ipv6 address? 2) To list all your system's environment variables, you can type "set". What the COMPUTERNAME...

  • 1) Answer the following questions regarding Photosynthesis: A) In your own words, describe the steps of...

    1) Answer the following questions regarding Photosynthesis: A) In your own words, describe the steps of the linear electron flow pathway of photosynthesis (3 pts). Answer: B) Compare and contrast the cyclic electron flow pathway and the linear electron flow pathway (2 pts). Answer: 2) Describe the following regarding bacterial and archacal membranes and cell wall structures and indicate which groups of organisms (phyla of bacteria or genera of archaea) each type of cell wall is found: A) The membrane...

  • Please i need a good answer and a perfect answer.. i need unique answer use your own words. pleas...

    please i need a good answer and a perfect answer.. i need unique answer use your own words. please i need a good answer and a perfect answer.. i need unique answer use your own words. please i need a good answer and a perfect answer.. i need unique answer use your own words. don't use handwriting Q3: a) Specify the two factors used to determine the capacity of memory. Find out the memory capacity, if the number of bits...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT