From 59a6c442262353da936d3fe070560af577e5d849 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sat, 15 Jul 2017 10:47:35 +0200 Subject: [PATCH] reformat restart-computer --- scripts/computers/restart-computer.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/computers/restart-computer.ps1 b/scripts/computers/restart-computer.ps1 index e15193b..639cf82 100644 --- a/scripts/computers/restart-computer.ps1 +++ b/scripts/computers/restart-computer.ps1 @@ -5,11 +5,11 @@ function Restart-Domain-Computer sleep 30 while ($status -eq $null) { - if(Test-Connection ` - -Computername $computername ` - -BufferSize 16 ` - -Count 1 ` - -Quiet){break} + $test-connection-params = @{'Computername'=$computername; + 'BufferSize'=16; + 'Count'=1; + 'Quiet'} + if(Test-Connection $test-connection-params {break} Write-Host 'Still offline' sleep 5 }