Hello, so I'm trying to write a simple script for one of our users to restart a computer that's running a display in the lobby. The display sometimes freezes up and all we have to do is restart the compute and it loads the display on startup. So I got a simple script here:
param( [Parameter(Mandatory=$True)] [ValidateSet("localhost,Computer1,Computer2")] [String] $ComputerName ) Restart-Computer -ComputerName $ComputerName -Force -Verbose
It works just fine, but it looks like this when it's ran:
cmdlet Restart Computer.ps1 at command pipeline position 1 Supply values for the following parameters: ComputerName[0]:
I'd like to get rid of the top two lines and replace it with some instructions like:
"Type the NETBIOS name, IP address, or fully-qualified domain name of one or more computers in a comma-separated list.
I'm still pretty new to PowerShell, so I don't know if this is even possible.
Any help would be appreciated. Thanks!