Tip / Trick of the week

Use this PowerShell script to replace a string in all files in a directory. This can be helpful when moving applications from one server to another, or changing server names. The ” | Where-Object { $_.Name -like “*.” }” can be dropped if you aren’t looking for a particular file type. Be sure to match the output file encoding.

$files = (get-childitem -recurse | Where-Object { $_.Name -like “*.” }).fullname

ForEach ( $file in $files ) {

(get-content $file).replace(”,”) | out-file $file -encoding ASCII




Contact Us

On Key

More Posts

WME Cybersecurity Briefings No. 004
Cyber Security

WME Security Briefing 11 April 2024

Mispadu Trojan Exploits Windows Vulnerability to Target Financial Data Overview The Mispadu banking trojan has intensified its operations as it’s exploiting an already patched Windows SmartScreen flaw. Since its initial identification in 2019, Mispadu has primarily preyed on

Read More »
WME Cybersecurity Briefings No. 003
Cyber Security

WME Security Briefing 29 March 2024

Russian hackers escalating their cyber warfare, deploying TinyTurla-NG to breach European NGOs. Cisco Talos reveals a targeted attack against organizations advocating democracy and supporting Ukraine. With their sophisticated methods, these cyber attackers are bypassing antivirus defenses

Read More »
Be assured of everything

Get WME Services

Stay ahead of the competition with our Professional IT offerings.