Add-Type -AssemblyName Microsoft.VisualBasic

$folderPath = Split-Path -Parent $MyInvocation.MyCommand.Path

$oldNamePart = [Microsoft.VisualBasic.Interaction]::InputBox('Enter the part of the file name to replace', 'Input', '')
$newNamePart = [Microsoft.VisualBasic.Interaction]::InputBox('Enter the new part of the file name', 'Input', '')

Get-ChildItem -Path $folderPath -Recurse -File | Where-Object { $_.Name -match $oldNamePart } | 
ForEach-Object {
    $newName = $_.Name -replace $oldNamePart, $newNamePart
    Rename-Item -Path $_.FullName -NewName $newName
}