In a word, no.
web.config
is an XML file, and should be edited as an XML document. The file contents are text (instead of binary), but the catch is that the XML element structure must be maintained. Editing the file as text is prone to mistakes, such as mixing up open/close element order, missing elements and encoding characters that are reserved.
If one makes a single mistake in editing XML as it would be an ordinary text file, any application that expects it to be a valid XML document will throw an error as the file is not valid.
To be honest, it is possible to update an XML config as it would be a text file. Why take the risk, though? Since .Net, and thus Powershell, is capable of parsing and processing XML, load the config file as an XML document, update the contents and save it. By processing it as an XML document, .Net libraries will take care about how to process the file so that the result is always a valid XML file.
There are existing questions at, SO, try searching for "powershell web.config $setting-you-want-to-change" for similar cases.
Also, the config can be updated via web administration cmdlets, for example, adding SSL settings.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…