OpsaC - Operating as PowerShell code
published: June 28, 2018 author: Tinu tags: Scripting categories: PowerShell
Mit PowerShell Text in einem File ändern, kann auch in einer Remote Session durchgeführt werden:
$file = "C:\Temp\file.txt"
$searchfor = "alpha"
$replacewith = "beta"
(Get-Content $file).Replace($searchfor, $replacewith) | Set-Content $file -Force -PassThru