I created csv file by script. I like to output full data and filtered data separating by “+”
However, I always get “+” on the top and full data and filtered data together.
import-csv .\tempdata.csv write-host '+++++++++' -Backgroundcolor Yellow import-csv .\tempdata.csv |where {$_.hostname -notmatch "2xx"}
Here is my output
+++++++++++++++++++++++ 10.10.101.111 K-2xx1234 10.10.101.123 K-3wxy123 10.10.101.31 K-1wxy234 10.10.101.123 K-3wxy123 10.10.101.31 K-1wxy234
One more question: I learn from here but I forgot the correct syntax
write-output "The folder name is $1 and file name is $2" -f $a, $b
Can someone remind me the correct syntax?
Thanks in advance