Skip to content

Commit

Permalink
Fix tabs/spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
TomChantler committed May 1, 2019
1 parent df52505 commit 9f347dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions UpdateMultipleHostsFiles.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ ForEach ($server in $ServerList){
$destination = @{Object = $path; ForegroundColor = 'Yellow';}
$canGetHostsFileResult = $path | Start-Job { Get-Item } | Wait-Job -Timeout $TimeOut
If ($canGetHostsFileResult) {
# Make a backup of the remote hosts file
Copy-Item $path -Destination $remoteEtcDirectory\hosts.bak
# Make a backup of the remote hosts file
Copy-Item $path -Destination $remoteEtcDirectory\hosts.bak
# Write the local host file to the remote server
$newHostsFileContent | Out-File $path #Note that Out-File respects the -WhatIf parameter.
$newHostsFileContent | Out-File $path #Note that Out-File respects the -WhatIf parameter.
Write-Host "New hosts file written to " -NoNewLine
Write-Host @destination
}
Expand Down

0 comments on commit 9f347dc

Please sign in to comment.