0

I used grpcurl command line tool for grpc requests. I include my grpc requests in PowerShell script.

when some requests have a failure statue PowerShell script will throw errors.

I want to block the errors from being shown in script's output.

I tried -ErrorAction Stop and Try/Catch methods but it doesn't work with grpc request.

here an example of my grpc request within the PowerShell script.

$GetParameters = grpcurl -plaintext -import-path <path> -proto service.proto <IP>:<port> descriptors./GetParameters 
user17508887
  • 57
  • 1
  • 7

1 Answers1

1

This is how to hide errors of external commands. '2' is 'standard error'.

grpcurl 2>$null
js2010
  • 23,033
  • 6
  • 64
  • 66