title: Powershell How To Input Computername To Check
body: <p>I want to check the services for a computer in Powershell. I've made the 'check services' part of the script. I cannot add the additional part to input which server in the domain to check. My script only checks my local computer. I need to be prompted to input which server to check in the LAN.</p>
  
  <p>bot$Servicename = "Security Center"</p>
  
  <pre><code>$ServiceName = "Security Center"
  function FuncCheckService{
  param($ServiceName)}
  $arrService = Get-Service -Name $ServiceName
  if ($arrService.Status -ne "Running"){
  Start-Service $ServiceName
  Write-Host "Starting " $ServiceName " service" }
  FuncCheckService -ServiceName "security center"
  </code></pre>