-1

我有一个 csv 文件,即列标题和我的第一行值在ng.csv哪里ID,Envr,Domain,Rule Label,Output

CC,     Dev,    AD,     Regular account (user logon),   CC05

我已成功导入 csv 文件并使用以下命令将ng.csv其读入变量-$data

$data = import-csv "C:\Users\aghosh\Desktop\ng.csv" -header("ID","Envr","Domain","Rule Label","Output")

现在我想CC05使用 Powershell 2.0 命令行开关读取并保存变量中的值(即 row1 x column5)。你能帮忙吗?

4

1 回答 1

0

The space made no difference for me. Looks like you forgot brackets:

$data | where-object {$_."Rule Label" -eq "Regular service account}

于 2013-05-28T16:43:43.247 回答