-
Hi peops, I've come across a wee problem that I can't get my head around and I was hoping that someone here might be able to help. I'm a complete newbie to powershell (and scripting generally), but am very excited about the possiblities it appears to be able to offer. I've managed to...
Posted to
General
(Forum)
by
cmcknz77
on
04-01-2009
Filed under: PowerShell, CSV, Import-CSV, Export-CSV, Type Operators
-
well, a hash is just string data so you could pipe it to Out-File. Or, in order to save more than one hash in a file, consider adding them to an object and writing objects to a CSV. Here is an example: $object = 1 | Select-Object "Filename", "Hash" $object.FileName = "bla"...
Posted to
General
(Forum)
by
Tobias
on
09-08-2009
Filed under: Import-CSV, Export-CSV, Select-Object
-
I have a script to try to go through a list of servers we have, ping them return if they are alive or not. $FilePath = "c:\Scripts\SPing.csv" $colComputers = get-content “C:\Scripts\AllSvr1.txt” foreach ($strComputer in $colComputers) { $ping = New-Object System.Net.NetworkInformation...
-
$Ping = New-Object System.Net.NetworkInformation.Ping -ErrorAction SilentlyContinue # initialize an array that will be output $Responses = @() Get-Content 'C:\Scripts\AllSvr1.txt' | % { Write-Host "Checking server: $_" $PingReply = $Ping.Send($_, 5000) # create an object that will be...
-
Is there a way to make import/export-csv work with special characters? Try this: cd $home md öttö dir | select-object Name | export-csv test.csv import-csv test.csv All special characters appear as "?". -Tobias