Corrections needed for script to run in Power Shell iSE without errors
Need Script to run in Power Shell iSE without errors
<# .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”}
Why Choose Us
- 100% non-plagiarized Papers
- 24/7 /365 Service Available
- Affordable Prices
- Any Paper, Urgency, and Subject
- Will complete your papers in 6 hours
- On-time Delivery
- Money-back and Privacy guarantees
- Unlimited Amendments upon request
- Satisfaction guarantee
How it Works
- Click on the “Place Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
- Fill in your paper’s requirements in the "PAPER DETAILS" section.
- Fill in your paper’s academic level, deadline, and the required number of pages from the drop-down menus.
- Click “CREATE ACCOUNT & SIGN IN” to enter your registration details and get an account with us for record-keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
- From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.