Table of Contents
$ServerName = Get-Content "C:\Users\vb\Desktop\computerslist.txt"
foreach ($Server in $ServerName) { if (test-Connection -ComputerName $Server -Count 2 -Quiet ) { "$Server is Pinging " } else {"$Server not pinging" } }
For Example the Computerslist Text file can have one entry on each line like below having either PC name or IP Addresses
pc1.domain.com
pc2.domain.com
10.100.128.10
Results will be like below for above text file.
pc1.domain.com is Pinging
pc2.domain.com is Pinging
10.100.128.10 is Pinging
How to install of FireFox browser using PowerShell Sometimes you would like to install Firefox…
Quick way to install chrome on windows with Powershell? Launch the Powershell and run below…
How to Fix PowerShell Script Not Digitally Signed Error? When a script with a .ps1…
Powershell Cheat Sheet for beginners PowerShell has become something of an ace in the hole…
Today we discuss one of a few questions a lot of sysadmins and IT Admins…
Backing Up an SQL Database with PowerShell Before making any changes in the production environment,…
This website uses cookies.