About 3,840,000 results
Open links in new tab
  1. Ping a list of host names and output the results to a csv in powershell

    Using a list of computers and -asjob works very well. The Responsetime property (confusingly the header is "Time (ms)") will be non-null if the host is up. Lately I do it this way. It requires threadjobs installed in powershell 5.1. Or just use get-port. I stick it in a mymod\mymod.psm1 module file somewhere in $env:psmodulepath.

  2. Getting IP addresses for hostnames using nslookup in Powershell

    I have a list of server hostnames and I need to get IP addresses of those servers and write the results in a file. The hostnames are one column in Excel spreadsheet but I can format them into anything (csv, simple txt file with one hostname per line etc.).

  3. Powershell - Get server name and IP from text list

    If I run this PowerShell script, I can get the host name and the correct IP address in the results pane. I just need to know how to transfer the results to a .csv file. $servers = get-content "C:\TEMP\servers.txt" foreach ($server in $servers) { $addresses = [System.Net.Dns]::GetHostAddresses($server) foreach($a in $addresses) { "{0},{1}" -f ...

  4. PowerShell: Resolve IP address to name and export to CSV

    Oct 16, 2019 · The script that we are going to discuss will read a list of IP addresses from a text file, resolves them to hostnames, and finally exports them to CSV file. We are going to use [System.Net.DNS] DotNet class for this purpose.

  5. PowerShell - Read File with Hostnames and Perform Task

    Aug 9, 2014 · PowerShell quick reference on how to read a file with hostnames and perform a function or task. Ping hostnames, Get Registry values, Get Systems UpTimes.

  6. How to read host files with PowerShell: Local & remote - PDQ

    Apr 26, 2017 · Reading the hosts file with PowerShell is a breeze. In order to do this, we are going to make use of the Get-Content cmdlet. This cmdlet will read the contents of a file. If you only need to quickly see the entire contents of the hosts file, then this super simple one-liner should do the trick:

  7. Powershell Script to pull domain computers from a .txt list using …

    Mar 30, 2023 · If so how to have it look at each entry in the .txt file separately? Here is the script. $Computers = Get-Content c:\ADClean\computers.txt. ForEach ($Computer in $Computers) { $ADComputer = $null $ADComputer = Get-ADcomputer -Filter * | Where-Object {$_.Name -like "$Computers" } | Select -Property Name | export-csv c:\ADClean\computersfound.txt ...

  8. Get Hostnames For Range of IP Addresses - PowerShell Help

    Apr 12, 2020 · You can use a csv file to combine both information: Get-Content C:\IP-Address.txt | ForEach-Object {[PSCustomObject]@{ip = $_ hostname = ([system.net.dns]::GetHostByAddress($_)).hostname}} | Export-Csv -NoTypeInformation -Path c:\hostnameList.csv

  9. powershell - Find read-host value in file list - Stack Overflow

    Jun 18, 2015 · Look for the server name in your $file array, which will output an object representing that line in the CSV, then get its iPiDRAC property: ($file | Where-Object {$_.computername -eq $machine}).iPiDRAC 10.122.2.11

  10. powershell - How to fetch ip address and status of services from a list ...

    Nov 30, 2017 · I want to add ip address in the table where status of services is fetched of the list of host names saved in TXT file . One host may contain more than one service .services name starts with I . How I do it.

  11. Some results have been removed
Refresh