Perhaps this is specifically a perforce problem, but I think not. At least, in some way, it involves a difference between cmd.exe and powershell, involving how it passes parameters to a command line program.
This perforce command, issued at the cmd.exe prompt, is problematic:
p4 files //this/that/*
as it takes a long time to respond. BUT if I quote the path like this:
p4 files "//this/that/*"
The response is immediate. However, from a powershell prompt, quoting the path doesn't help. I can't find a way to get a quick response at the PS prompt. So there is some difference between the cmd.exe and powershell way of invoking the app.
Don't be distracted by the form of the path with its forward slashes. This is a path in the p4 repository and isn't meant to be interpreted as a file system path.
PowerShell does not add quotes around parameter when passing it to native apps when parameter does not contains space or begins with quote. So this PowerShell command:
p4 files "//this/that/*"
will result in this command line:
p4 files //this/that/*
To solve your issue, you need to put quotes literally in the parameter string:
p4 files '"//this/that/*"'
or
p4 files `"//this/that/*`"
or
p4 files """//this/that/*"""