Write the powershell code necessary to loop through element

Assignment Help Computer Engineering
Reference no: EM134031331

Problem

For the following questions you can use any one of your VM's (dc, dm, or sws). All screen shots must have your VM# in the corner. All code and output must be clearly legible.

Task

Part I

A. Write the Powershell code necessary to prompt the user to enter a number and store that value in a variable called $userPIN using a datatype of Int32. Type out a listing of your code and paste a screen shot of it running here:

B. Check if the userPIN entered is positive and if not print out an error message. Type out a listing of your code and paste a screen shot of it running here:

C. Check if the userPIN entered is at least 4 digits long (i.e. > 999) and if not print out an error message. Type out a listing of your code and paste a screen shot of it running here:

Part II

A. Write the Powershell code to store the following values in string datatype variables as follows:

$ip1 = "172.23.99.10"
$ip2= "172.23.99.15"
$ip3 = "127.0.0.1"
$ip4 ="172.23.99.100"

Next write the Powershell code to create an array called $ip_array that contains all of the above variables. Type out a listing of your code and paste a screen shot of it running here. Get the instant assignment help.

B. Write the Powershell code necessary to loop through the elements of the array from #1 and display a message that the element is "Not Local host" or "Local Host" depending whether the ip address in the element is the same as the localhost address.

Reference no: EM134031331

Questions Cloud

Which is a short-range wireless communication : Which is a short-range wireless communication that does not require device pairing and has range limited to few centimeters to prevent interference or hijacking
Define movement efficiency in the context of your activity : Define movement efficiency in the context of your activity. What does movement efficiency look like in your activity?
Calculate the total amount of time spent on instruction : Determine which recording form is best used for recording. Calculate the total amount of time spent on instruction based on recording form (e.g. summary data).
What happens to the host per subnet field and why : Some of the reasons to subnet network is to improve network performance and speed reduce network congestion. What happens to the Host per Subnet field and why?
Write the powershell code necessary to loop through element : Write the Powershell code necessary to loop through the elements of the array from #1 and display a message that the element is Not Local host or Local Host.
Explain two proximal causes of obesity : Name and explain at least two proximal causes of obesity and diabetes in relation to material circumstances of the individual.
Describe the organizations communications strategy : Describe the organization's communications strategy. What messages does it promote? How does it distinguish itself? Is the strategy successful?
Identifying the oels or recommended exposure levels : The contractor removing mastic from the floor using Bean-E-Doo has expressed concerns about a strong odour and complained of headache, nausea, and vomiting.
How has informatics changed patient care and safety : Think about your current or former health care organization. How has informatics changed patient care and safety?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd