Need script corrected

<#

.SYNOPSIS

This is a script to Get time of computer last restart and length of time on or up

.DESCRIPTION

This script provides the date and time of last restart and lenght of time logged on

.EXAMPLE

Get-Restart and timeup.ps1

This example starts the program and displays the data needed to determine if the machine needs to be restarted

#>

#Written by Atiya Brown 5/6/2018

#initialization

#This section contains variable declarations and assignments

#initialization

$computers=("DC1","W7")

#Functions

#This section contains function definitions

#Functions

Get Restart and Uptime data

#Main Body

#This section contains the code that implements that main function of the script.

While ($menu_choice -ne "X")

Clear-Host #Clears the console screen

$menu

$menu_choice=Read-host -Prompt "Choose a menu option"

switch ($menu_choice)

'A' {

Write-Host "Inventory Installed Software..."

for($i=0; $i-lt $computers.length;$i++)

$computers[$i]

Get-WmiObject Win32_ComputerSystemProduct -ComputerName $computers[$i]

Read-Host -Prompt "Press Enter to Continue..."

'B' {

Write-Host "Inventoring Installed Hardware..."}

foreach (DC1", "W7-Client")

Get-WmiObject -Class Win32_Processor -ComputerName DC1

Get-WmiObject -Class Win32_PhysicalMemory -ComputerName W7-Client

Get-WmiObject -Class Win32_LogicalDisk -ComputerName W8-Client

read-Host -Prompt "Press enter to Continue..."

'X' }

{

Write-Host "Exiting..."

Default {Write-Host "Please choose a menu option"}