I need to pull the account of the user that has a Microsoft Store application installed from the string below. In this example it would be Pete. It should only return what's in the first set of [] brackets and no others. What's the best method in PowerShell to do this?
{S-1-5-21-2622660536-623557165-1234864593-1001 [Pete]: Installed, S-1-5-18 [S-1-5-18]: Staged}