build 6ddc7a35 | content blog-content@417154f · 338 posts | profiles 32 · corpus 315 | ● 0 skipped | format run

$ soultec get post/powershell-script-to-test-multiple-ip-addresses -o yaml$ soultec get post/powershell-script-to-test-multiple-ip-addresses -o json$ soultec get post/powershell-script-to-test-multiple-ip-addresses -o toml$ soultec get post/powershell-script-to-test-multiple-ip-addresses -o xml$ python3 powershell-script-to-test-multiple-ip-addresses.pyPS> ./powershell-script-to-test-multiple-ip-addresses.ps1$ go run powershell-script-to-test-multiple-ip-addresses.go$ node powershell-script-to-test-multiple-ip-addresses.js

apiVersion: soultec.ch/v1kind: Postmetadata: name: powershell-script-to-test-multiple-ip-addresses locale: en labels: author: dario-doerflinger series: scripting capability/automation: 1.81 vendor/vmware: 0.98 annotations: source: blog-content/posts/en/powershell-script-to-test-multiple-ip-addresses.md route: /en/insights/powershell-script-to-test-multiple-ip-addresses/ schema: /nerd/schema/posts.json markdown: /en/insights/powershell-script-to-test-multiple-ip-addresses.mdspec: title: PowerShell Script to test multiple IP Addresses date: 2024-02-04 author: dario-doerflinger locale: en summary: >- This small scriptlet reads a CSV with a column called “IPaddress” and pings its way through the addresses. In a lot of projects I have to confirm that a set of IPs is free. capabilities: [automation] vendors: [vmware] series: scripting hero: /blog-assets/powershell-script-to-test-multiple-ip-addresses/hero.webp migrated: 2026-08-24 translationReviewed: false draft: false sections: - body: | This small scriptlet reads a CSV with a column called "IPaddress" and pings its way through the addresses. In a lot of projects I have to confirm that a set of IPs is actually free. This scriptlet colour-codes the result and can be re-run whenever you need it, at almost no effort. ```powershell Param( [Parameter(Mandatory=$true, position=0)][string]$csvfile ) $ColumnHeader = "IPaddress" Write-Host "Reading file" $csvfile $ipaddresses = import-csv $csvfile | select-object $ColumnHeader Write-Host "Started Pinging.." foreach ($ip in $ipaddresses) { if (test-connection $ip.("IPAddress") -count 1 -quiet) { write-host $ip.("IPAddress") "Ping succeeded." -foreground green } else { write-host $ip.("IPAddress") "Ping failed." -foreground red } } Write-Host "Pinging Completed." ```status: corpus: 315 alsoLike: - {ref: posts/vmware-explore-las-vegas-hackathon-2025, score: 1.00} - {ref: posts/vmware-hackathon-2024-project, score: 1.00} - {ref: solutions/vmware/vmware-cloud-foundation/addon/business-operations, score: 0.60} search: /en/search.json
{ "apiVersion": "soultec.ch/v1", "kind": "Post", "metadata": { "name": "powershell-script-to-test-multiple-ip-addresses", "locale": "en", "labels": { "author": "dario-doerflinger", "series": "scripting", "capability/automation": 1.81, "vendor/vmware": 0.98 }, "annotations": { "source": "blog-content/posts/en/powershell-script-to-test-multiple-ip-addresses.md", "route": "/en/insights/powershell-script-to-test-multiple-ip-addresses/", "schema": "/nerd/schema/posts.json", "markdown": "/en/insights/powershell-script-to-test-multiple-ip-addresses.md" } }, "spec": { "title": "PowerShell Script to test multiple IP Addresses", "date": "2024-02-04", "author": "dario-doerflinger", "locale": "en", "summary": "This small scriptlet reads a CSV with a column called “IPaddress” and pings its way through the addresses. In a lot of projects I have to confirm that a set of IPs is free.", "capabilities": [ "automation" ], "vendors": [ "vmware" ], "series": "scripting", "hero": "/blog-assets/powershell-script-to-test-multiple-ip-addresses/hero.webp", "migrated": "2026-08-24", "translationReviewed": false, "draft": false, "sections": [ { "body": "This small scriptlet reads a CSV with a column called \"IPaddress\" and pings its way through the addresses.\n\nIn a lot of projects I have to confirm that a set of IPs is actually free. This scriptlet colour-codes the result and can be re-run whenever you need it, at almost no effort.\n\n```powershell\nParam(\n[Parameter(Mandatory=$true, position=0)][string]$csvfile\n)\n$ColumnHeader = \"IPaddress\"\nWrite-Host \"Reading file\" $csvfile\n$ipaddresses = import-csv $csvfile | select-object $ColumnHeader\nWrite-Host \"Started Pinging..\"\nforeach ($ip in $ipaddresses) {\n if (test-connection $ip.(\"IPAddress\") -count 1 -quiet) {\n write-host $ip.(\"IPAddress\") \"Ping succeeded.\" -foreground green\n } else {\n write-host $ip.(\"IPAddress\") \"Ping failed.\" -foreground red\n }\n}\nWrite-Host \"Pinging Completed.\"\n```" } ] }, "status": { "corpus": 315, "alsoLike": [ { "ref": "posts/vmware-explore-las-vegas-hackathon-2025", "score": "1.00" }, { "ref": "posts/vmware-hackathon-2024-project", "score": "1.00" }, { "ref": "solutions/vmware/vmware-cloud-foundation/addon/business-operations", "score": "0.60" } ], "search": "/en/search.json" }}
apiVersion = "soultec.ch/v1"kind = "Post"[metadata]name = "powershell-script-to-test-multiple-ip-addresses"locale = "en"[metadata.labels]author = "dario-doerflinger"series = "scripting""capability/automation" = 1.81"vendor/vmware" = 0.98[metadata.annotations]source = "blog-content/posts/en/powershell-script-to-test-multiple-ip-addresses.md"route = "/en/insights/powershell-script-to-test-multiple-ip-addresses/"schema = "/nerd/schema/posts.json"markdown = "/en/insights/powershell-script-to-test-multiple-ip-addresses.md"[spec]title = "PowerShell Script to test multiple IP Addresses"date = 2024-02-04author = "dario-doerflinger"locale = "en"summary = "This small scriptlet reads a CSV with a column called “IPaddress” and pings its way through the addresses. In a lot of projects I have to confirm that a set of IPs is free."capabilities = ["automation"]vendors = ["vmware"]series = "scripting"hero = "/blog-assets/powershell-script-to-test-multiple-ip-addresses/hero.webp"migrated = 2026-08-24translationReviewed = falsedraft = false[[spec.sections]]body = '''This small scriptlet reads a CSV with a column called "IPaddress" and pings its way through the addresses.In a lot of projects I have to confirm that a set of IPs is actually free. This scriptlet colour-codes the result and can be re-run whenever you need it, at almost no effort.```powershellParam([Parameter(Mandatory=$true, position=0)][string]$csvfile)$ColumnHeader = "IPaddress"Write-Host "Reading file" $csvfile$ipaddresses = import-csv $csvfile | select-object $ColumnHeaderWrite-Host "Started Pinging.."foreach ($ip in $ipaddresses) { if (test-connection $ip.("IPAddress") -count 1 -quiet) { write-host $ip.("IPAddress") "Ping succeeded." -foreground green } else { write-host $ip.("IPAddress") "Ping failed." -foreground red }}Write-Host "Pinging Completed."```'''[status]corpus = 315search = "/en/search.json"[[status.alsoLike]]ref = "posts/vmware-explore-las-vegas-hackathon-2025"score = "1.00"[[status.alsoLike]]ref = "posts/vmware-hackathon-2024-project"score = "1.00"[[status.alsoLike]]ref = "solutions/vmware/vmware-cloud-foundation/addon/business-operations"score = "0.60"
<?xml version="1.0" encoding="UTF-8"?><manifest kind="Post"> <apiVersion>soultec.ch/v1</apiVersion> <metadata> <name>powershell-script-to-test-multiple-ip-addresses</name> <locale>en</locale> <labels> <author>dario-doerflinger</author> <series>scripting</series> <entry key="capability/automation">1.81</entry> <entry key="vendor/vmware">0.98</entry> </labels> <annotations> <source>blog-content/posts/en/powershell-script-to-test-multiple-ip-addresses.md</source> <route>/en/insights/powershell-script-to-test-multiple-ip-addresses/</route> <schema>/nerd/schema/posts.json</schema> <markdown>/en/insights/powershell-script-to-test-multiple-ip-addresses.md</markdown> </annotations> </metadata> <spec> <title>PowerShell Script to test multiple IP Addresses</title> <date>2024-02-04</date> <author>dario-doerflinger</author> <locale>en</locale> <summary>This small scriptlet reads a CSV with a column called “IPaddress” and pings its way through the addresses. In a lot of projects I have to confirm that a set of IPs is free.</summary> <capabilities> <item>automation</item> </capabilities> <vendors> <item>vmware</item> </vendors> <series>scripting</series> <hero>/blog-assets/powershell-script-to-test-multiple-ip-addresses/hero.webp</hero> <migrated>2026-08-24</migrated> <translationReviewed>false</translationReviewed> <draft>false</draft> <sections> <section> <body>This small scriptlet reads a CSV with a column called "IPaddress" and pings its way through the addresses.In a lot of projects I have to confirm that a set of IPs is actually free. This scriptlet colour-codes the result and can be re-run whenever you need it, at almost no effort.```powershellParam([Parameter(Mandatory=$true, position=0)][string]$csvfile)$ColumnHeader = "IPaddress"Write-Host "Reading file" $csvfile$ipaddresses = import-csv $csvfile | select-object $ColumnHeaderWrite-Host "Started Pinging.."foreach ($ip in $ipaddresses) { if (test-connection $ip.("IPAddress") -count 1 -quiet) { write-host $ip.("IPAddress") "Ping succeeded." -foreground green } else { write-host $ip.("IPAddress") "Ping failed." -foreground red }}Write-Host "Pinging Completed."``` </body> </section> </sections> </spec> <status> <corpus>315</corpus> <alsoLike> <item> <ref>posts/vmware-explore-las-vegas-hackathon-2025</ref> <score>1.00</score> </item> <item> <ref>posts/vmware-hackathon-2024-project</ref> <score>1.00</score> </item> <item> <ref>solutions/vmware/vmware-cloud-foundation/addon/business-operations</ref> <score>0.60</score> </item> </alsoLike> <search>/en/search.json</search> </status></manifest>
# Code generated by the soultec.ch build. DO NOT EDIT.import jsonPAGE = { "apiVersion": "soultec.ch/v1", "kind": "Post", "metadata": { "name": "powershell-script-to-test-multiple-ip-addresses", "locale": "en", "labels": { "author": "dario-doerflinger", "series": "scripting", "capability/automation": 1.81, "vendor/vmware": 0.98, }, "annotations": { "source": "blog-content/posts/en/powershell-script-to-test-multiple-ip-addresses.md", "route": "/en/insights/powershell-script-to-test-multiple-ip-addresses/", "schema": "/nerd/schema/posts.json", "markdown": "/en/insights/powershell-script-to-test-multiple-ip-addresses.md", }, }, "spec": { "title": "PowerShell Script to test multiple IP Addresses", "date": "2024-02-04", "author": "dario-doerflinger", "locale": "en", "summary": "This small scriptlet reads a CSV with a column called “IPaddress” and pings its way through the addresses. In a lot of projects I have to confirm that a set of IPs is free.", "capabilities": ["automation"], "vendors": ["vmware"], "series": "scripting", "hero": "/blog-assets/powershell-script-to-test-multiple-ip-addresses/hero.webp", "migrated": "2026-08-24", "translationReviewed": False, "draft": False, "sections": [ { "body": ( "This small scriptlet reads a CSV with a column called \"IPaddress\" and pings its way through the addresses.\n" "\n" "In a lot of projects I have to confirm that a set of IPs is actually free. This scriptlet colour-codes the result and can be re-run whenever you need it, at almost no effort.\n" "\n" "```powershell\n" "Param(\n" "[Parameter(Mandatory=$true, position=0)][string]$csvfile\n" ")\n" "$ColumnHeader = \"IPaddress\"\n" "Write-Host \"Reading file\" $csvfile\n" "$ipaddresses = import-csv $csvfile | select-object $ColumnHeader\n" "Write-Host \"Started Pinging..\"\n" "foreach ($ip in $ipaddresses) {\n" " if (test-connection $ip.(\"IPAddress\") -count 1 -quiet) {\n" " write-host $ip.(\"IPAddress\") \"Ping succeeded.\" -foreground green\n" " } else {\n" " write-host $ip.(\"IPAddress\") \"Ping failed.\" -foreground red\n" " }\n" "}\n" "Write-Host \"Pinging Completed.\"\n" "```" ), }, ], }, "status": { "corpus": 315, "alsoLike": [ { "ref": "posts/vmware-explore-las-vegas-hackathon-2025", "score": "1.00", }, { "ref": "posts/vmware-hackathon-2024-project", "score": "1.00", }, { "ref": "solutions/vmware/vmware-cloud-foundation/addon/business-operations", "score": "0.60", }, ], "search": "/en/search.json", },}if __name__ == "__main__": print(json.dumps(PAGE, indent=2, ensure_ascii=False))
# Code generated by the soultec.ch build. DO NOT EDIT.$Page = [ordered]@{ apiVersion = 'soultec.ch/v1' kind = 'Post' metadata = [ordered]@{ name = 'powershell-script-to-test-multiple-ip-addresses' locale = 'en' labels = [ordered]@{ author = 'dario-doerflinger' series = 'scripting' 'capability/automation' = 1.81 'vendor/vmware' = 0.98 } annotations = [ordered]@{ source = 'blog-content/posts/en/powershell-script-to-test-multiple-ip-addresses.md' route = '/en/insights/powershell-script-to-test-multiple-ip-addresses/' schema = '/nerd/schema/posts.json' markdown = '/en/insights/powershell-script-to-test-multiple-ip-addresses.md' } } spec = [ordered]@{ title = 'PowerShell Script to test multiple IP Addresses' date = '2024-02-04' author = 'dario-doerflinger' locale = 'en' summary = 'This small scriptlet reads a CSV with a column called “IPaddress” and pings its way through the addresses. In a lot of projects I have to confirm that a set of IPs is free.' capabilities = @('automation') vendors = @('vmware') series = 'scripting' hero = '/blog-assets/powershell-script-to-test-multiple-ip-addresses/hero.webp' migrated = '2026-08-24' translationReviewed = $false draft = $false sections = @( [ordered]@{ body = @'This small scriptlet reads a CSV with a column called "IPaddress" and pings its way through the addresses.In a lot of projects I have to confirm that a set of IPs is actually free. This scriptlet colour-codes the result and can be re-run whenever you need it, at almost no effort.```powershellParam([Parameter(Mandatory=$true, position=0)][string]$csvfile)$ColumnHeader = "IPaddress"Write-Host "Reading file" $csvfile$ipaddresses = import-csv $csvfile | select-object $ColumnHeaderWrite-Host "Started Pinging.."foreach ($ip in $ipaddresses) { if (test-connection $ip.("IPAddress") -count 1 -quiet) { write-host $ip.("IPAddress") "Ping succeeded." -foreground green } else { write-host $ip.("IPAddress") "Ping failed." -foreground red }}Write-Host "Pinging Completed."```'@ } ) } status = [ordered]@{ corpus = 315 alsoLike = @( [ordered]@{ ref = 'posts/vmware-explore-las-vegas-hackathon-2025' score = '1.00' } [ordered]@{ ref = 'posts/vmware-hackathon-2024-project' score = '1.00' } [ordered]@{ ref = 'solutions/vmware/vmware-cloud-foundation/addon/business-operations' score = '0.60' } ) search = '/en/search.json' }}$Page | ConvertTo-Json -Depth 32
// Code generated by the soultec.ch build. DO NOT EDIT.package mainimport ( "encoding/json" "os")var page = map[string]any{ "apiVersion": "soultec.ch/v1", "kind": "Post", "metadata": map[string]any{ "name": "powershell-script-to-test-multiple-ip-addresses", "locale": "en", "labels": map[string]any{ "author": "dario-doerflinger", "series": "scripting", "capability/automation": 1.81, "vendor/vmware": 0.98, }, "annotations": map[string]any{ "source": "blog-content/posts/en/powershell-script-to-test-multiple-ip-addresses.md", "route": "/en/insights/powershell-script-to-test-multiple-ip-addresses/", "schema": "/nerd/schema/posts.json", "markdown": "/en/insights/powershell-script-to-test-multiple-ip-addresses.md", }, }, "spec": map[string]any{ "title": "PowerShell Script to test multiple IP Addresses", "date": "2024-02-04", "author": "dario-doerflinger", "locale": "en", "summary": "This small scriptlet reads a CSV with a column called “IPaddress” and pings its way through the addresses. In a lot of projects I have to confirm that a set of IPs is free.", "capabilities": []any{"automation"}, "vendors": []any{"vmware"}, "series": "scripting", "hero": "/blog-assets/powershell-script-to-test-multiple-ip-addresses/hero.webp", "migrated": "2026-08-24", "translationReviewed": false, "draft": false, "sections": []any{ map[string]any{ "body": "This small scriptlet reads a CSV with a column called \"IPaddress\" and pings its way through the addresses.\n" + "\n" + "In a lot of projects I have to confirm that a set of IPs is actually free. This scriptlet colour-codes the result and can be re-run whenever you need it, at almost no effort.\n" + "\n" + "```powershell\n" + "Param(\n" + "[Parameter(Mandatory=$true, position=0)][string]$csvfile\n" + ")\n" + "$ColumnHeader = \"IPaddress\"\n" + "Write-Host \"Reading file\" $csvfile\n" + "$ipaddresses = import-csv $csvfile | select-object $ColumnHeader\n" + "Write-Host \"Started Pinging..\"\n" + "foreach ($ip in $ipaddresses) {\n" + " if (test-connection $ip.(\"IPAddress\") -count 1 -quiet) {\n" + " write-host $ip.(\"IPAddress\") \"Ping succeeded.\" -foreground green\n" + " } else {\n" + " write-host $ip.(\"IPAddress\") \"Ping failed.\" -foreground red\n" + " }\n" + "}\n" + "Write-Host \"Pinging Completed.\"\n" + "```", }, }, }, "status": map[string]any{ "corpus": 315, "alsoLike": []any{ map[string]any{ "ref": "posts/vmware-explore-las-vegas-hackathon-2025", "score": "1.00", }, map[string]any{ "ref": "posts/vmware-hackathon-2024-project", "score": "1.00", }, map[string]any{ "ref": "solutions/vmware/vmware-cloud-foundation/addon/business-operations", "score": "0.60", }, }, "search": "/en/search.json", },}func main() { enc := json.NewEncoder(os.Stdout) enc.SetEscapeHTML(false) enc.SetIndent("", " ") if err := enc.Encode(page); err != nil { os.Exit(1) }}
// Code generated by the soultec.ch build. DO NOT EDIT.const page = { apiVersion: "soultec.ch/v1", kind: "Post", metadata: { name: "powershell-script-to-test-multiple-ip-addresses", locale: "en", labels: { author: "dario-doerflinger", series: "scripting", "capability/automation": 1.81, "vendor/vmware": 0.98, }, annotations: { source: "blog-content/posts/en/powershell-script-to-test-multiple-ip-addresses.md", route: "/en/insights/powershell-script-to-test-multiple-ip-addresses/", schema: "/nerd/schema/posts.json", markdown: "/en/insights/powershell-script-to-test-multiple-ip-addresses.md", }, }, spec: { title: "PowerShell Script to test multiple IP Addresses", date: "2024-02-04", author: "dario-doerflinger", locale: "en", summary: "This small scriptlet reads a CSV with a column called “IPaddress” and pings its way through the addresses. In a lot of projects I have to confirm that a set of IPs is free.", capabilities: ["automation"], vendors: ["vmware"], series: "scripting", hero: "/blog-assets/powershell-script-to-test-multiple-ip-addresses/hero.webp", migrated: "2026-08-24", translationReviewed: false, draft: false, sections: [ { body: "This small scriptlet reads a CSV with a column called \"IPaddress\" and pings its way through the addresses.\n" + "\n" + "In a lot of projects I have to confirm that a set of IPs is actually free. This scriptlet colour-codes the result and can be re-run whenever you need it, at almost no effort.\n" + "\n" + "```powershell\n" + "Param(\n" + "[Parameter(Mandatory=$true, position=0)][string]$csvfile\n" + ")\n" + "$ColumnHeader = \"IPaddress\"\n" + "Write-Host \"Reading file\" $csvfile\n" + "$ipaddresses = import-csv $csvfile | select-object $ColumnHeader\n" + "Write-Host \"Started Pinging..\"\n" + "foreach ($ip in $ipaddresses) {\n" + " if (test-connection $ip.(\"IPAddress\") -count 1 -quiet) {\n" + " write-host $ip.(\"IPAddress\") \"Ping succeeded.\" -foreground green\n" + " } else {\n" + " write-host $ip.(\"IPAddress\") \"Ping failed.\" -foreground red\n" + " }\n" + "}\n" + "Write-Host \"Pinging Completed.\"\n" + "```", }, ], }, status: { corpus: 315, alsoLike: [ { ref: "posts/vmware-explore-las-vegas-hackathon-2025", score: "1.00", }, { ref: "posts/vmware-hackathon-2024-project", score: "1.00", }, { ref: "solutions/vmware/vmware-cloud-foundation/addon/business-operations", score: "0.60", }, ], search: "/en/search.json", },};console.log(JSON.stringify(page, null, 2));

# 60 lines · YAML · validated at build# 61 lines · JSON · validated at build# 73 lines · TOML · validated at build# 83 lines · XML · validated at build# 85 lines · Python · read back at build, equals the JSON record# 82 lines · PowerShell · read back at build, equals the JSON record# 95 lines · Go · read back at build, equals the JSON record# 80 lines · JavaScript · read back at build, equals the JSON record · served at /en/insights/powershell-script-to-test-multiple-ip-addresses.md

Scripting · 2024-02-04

PowerShell Script to test multiple IP Addresses

This small scriptlet reads a CSV with a column called “IPaddress” and pings its way through the addresses. In a lot of projects I have to confirm that a set of IPs is free.

2024-02-04Date
Dario DörflingerAuthor
1Min read
Vendors VMware 0.98

This small scriptlet reads a CSV with a column called “IPaddress” and pings its way through the addresses.

In a lot of projects I have to confirm that a set of IPs is actually free. This scriptlet colour-codes the result and can be re-run whenever you need it, at almost no effort.

Param(
[Parameter(Mandatory=$true, position=0)][string]$csvfile
)
$ColumnHeader = "IPaddress"
Write-Host "Reading file" $csvfile
$ipaddresses = import-csv $csvfile | select-object $ColumnHeader
Write-Host "Started Pinging.."
foreach ($ip in $ipaddresses) {
    if (test-connection $ip.("IPAddress") -count 1 -quiet) {
        write-host $ip.("IPAddress") "Ping succeeded." -foreground green
    } else {
        write-host $ip.("IPAddress") "Ping failed." -foreground red
    }
}
Write-Host "Pinging Completed."

You might also like