I have a situation where I need to modify the contents of a file using PowerShell. The string already there will be similar to ToolsVersion="3.5"
. However I can not be positive that "3.5"
will always be what is inside the quotes. I need to change the value inside the quotes to "12.0"
. Is there a way to find the "ToolsVersion="
in the file, then modify the value inside the quotes that follows it?
相关问题
- How to Debug/Register a Permanent WMI Event Which
- What is the best way to do a search in a large fil
- How can I do variable substitution in a here-strin
- Spring Integration - Inbound file endpoint. How to
- How to use a default value with parameter sets in
相关文章
- 在vscode如何用code runner打开独立的控制台窗口,以及设置好调试模式时窗口的编码?
- C#调用PowerShell的问题
- EscapeDataString having differing behaviour betwee
- What is the correct way to declare and use a FILE
- Making new files automatically executable?
- PowerShell Change owner of files and folders
- How to serialize data into indented json [duplicat
- Creating a custom file like object python suggesti
You can use
Get-Content
,-replace
, andOut-File
: