Skip to main content

Notifications

Community site session details

Community site session details

Session Id :

Microsoft Dynamics 365 Finance - User PowerShell to search for labels fast

Anton Venter Profile Picture Anton Venter 20,034 Super User 2025 Season 1

Background

Here is a quick and simple method I use a lot to search for labels using PowerShell. It's seriously fast!

Let's start.

1. Open PowerShell and change the current directory to your LocalPackages folder. Change the path according to your system. Make sure you have enough permission on the local packages directory. This is why I always open PowerShell as Administrator.

cd C:\Users\mrbean\AppData\Local\Microsoft\Dynamics365\10.0.1935.92\PackagesLocalDirectory

2. Let's search for the label "Invoice" using the PowerShell "findstr" command. The command below will search in all the en-US label files.

findstr /s /l /i /n /E /c:"=Invoice" *en-US.label.txt

Explanation of the command arguments:

  • /s: Searches subdirectories.
  • /l: Performs a literal search (case-sensitive by default).
  • /i: Makes the search case-insensitive.
  • /n: Displays line numbers in results.
  • /E: Matches the pattern at the end of a line.
  • /c:"=Invoice": Searches for the exact string =Invoice.
  • *en-US.label.txt: Targets all files with the en-US.label.txt extension.

Note: The "/E" argument in the PowerShell command returns all lines of text that end with "Invoice". Because we are dealing with Dynamics 365 Finance label files that have and ID and label text separated with an "=" I've included "=" in the search. The causes the command to return the exact labels we search for. Copy and paste the label ID from the results.




This was originally posted here.

Comments

*This post is locked for comments