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

}

Share:

Facebook
Twitter
LinkedIn

Contact Us

Name
=
On Key

More Posts

Microsoft EndPoint Management

Sync ConfigMgr Collections to Intune

ConfigMgr collection sync is a feature that has been in ConfigMgr for a few versions. At a high level, it syncs the membership of a collection to a group in Entra ID that can then be

Read More »
WME Microsoft 365 Updates No. 025
Azure

WME Microsoft 365/Azure Updates 22 August 2025

1. Exchange Online: Temporary Mailbox Access Disruption via MAPI Overview Some Exchange Online users experienced mailbox access issues via the Messaging API (MAPI) on August 20, 2025. The disruption occurred after Microsoft reverted a recent service

Read More »