This PowerShell script provides a tool to search for any tag name in files within directories. It presents the user with options to either search a default directory and file type or to specify a custom directory, file name, and other options. The script then uses Get-ChildItem and Select-String to search files recursively for the provided tag name and returns the file paths where a match is found.
This PowerShell script provides a tool to search for any tag name in files within directories. It presents the user with options to either search a default directory and file type or to specify a custom directory, file name, and other options. The script then uses Get-ChildItem and Select-String to search files recursively for the provided tag name and returns the file paths where a match is found.
This PowerShell script provides a tool to search for any tag name in files within directories. It presents the user with options to either search a default directory and file type or to specify a custom directory, file name, and other options. The script then uses Get-ChildItem and Select-String to search files recursively for the provided tag name and returns the file paths where a match is found.
Write-Host "Authors: Le Minh Duc - 1024230 - NSRP/PC&A"
Write-Host "Version: 1.0 - 05 January 2023" Write-Host "Description: Tool to search any Tag Name in any files in any Directories (and its sub-directories)`n" while($true) { $Option = Read-Host -Prompt "Enter option:`n`t1-Default:`n`t`tFile name: *.html`n`t`tDirectory: C:\ProgramData\Honeywell\Experion PKS\Client\Abstract`n`t2- Advanced: use Wildcard and options for File name and Directory name`n`t" Write-Output "`t==> Option is: $Option" $TagName = Read-Host -Prompt "1. Enter Tag Name to search (for example: 014*7101, *7101, 014UZU*)" Write-Output "`t==> TagName is: $TagName" if ($Option -like '1') {