我试图在使用PowerShell的html文件中删除所有内容之后删除所有内容。但是它的失败需要帮助
mMap.setMapType();
但是低于错误:
$s = get-content "C:\Users\admin\Desktop\File\sheet003.html"
$pos = $s.IndexOf(">0<")
$leftPart = $s.Substring(0, $pos)
#$rightPart = $s.Substring($pos+1)
$leftPart
答案 0 :(得分:2)
使用:
get-content "C:\temp\sheet003.html" -raw
因为否则你得到一个数组而不是字符串到$ s