Powershell 语法 - 用双引号传递值
Powershell syntax - Passing value with double quote
如何在 powershell 中将双引号作为参数传递?例如,我需要执行这一行,但 K="Key words" 必须在双引号中
$Ie.Navigate2("http://inside.nv.com/demo/Search/Pages/results_Table.aspx?k="Boiling Point"(CreatedBy:Broussard AND Write>=6/1/2015 AND Write<=6/30/2015)", 0x10000)
使用编码。 (") 字符对应于 %22.
尝试使用
转义作为参数字符串一部分的 "
`
因此,在您的情况下,它将如下所示 -
$Ie.Navigate2("http://inside.nv.com/demo/Search/Pages/results_Table.aspx?k=`"Boiling Point`"(CreatedBy:Broussard AND Write>=6/1/2015 AND Write<=6/30/2015)", 0x10000)
如何在 powershell 中将双引号作为参数传递?例如,我需要执行这一行,但 K="Key words" 必须在双引号中
$Ie.Navigate2("http://inside.nv.com/demo/Search/Pages/results_Table.aspx?k="Boiling Point"(CreatedBy:Broussard AND Write>=6/1/2015 AND Write<=6/30/2015)", 0x10000)
使用编码。 (") 字符对应于 %22.
尝试使用
转义作为参数字符串一部分的"
`
因此,在您的情况下,它将如下所示 -
$Ie.Navigate2("http://inside.nv.com/demo/Search/Pages/results_Table.aspx?k=`"Boiling Point`"(CreatedBy:Broussard AND Write>=6/1/2015 AND Write<=6/30/2015)", 0x10000)