2
votes

I am running the below cmdlet which I need to use in a script.

Connect-Pfa2Array -Endpoint 10.10.10.10 -Username pureapiuser -Password $psw -IgnoreCertificateError

I get the below output which I am trying to suppress. I just need for the cmdlet to make the connection. Is there a way this can be done? I checked the cmdlet and did not see an option to do a silent connection.

ArrayName    ApiVersion
---------    ----------
10.100.24.50 2.2 
1
Try | Out-Null or > $nullSantiago Squarzon

1 Answers

4
votes

As Santiago Squarzon mentioned, there are a couple of options you can use:

[void](Connect-Pfa2Array ... )

or

Connect-Pfa2Array | Out-Null

or

Connect-Pfa2Array > $null

or

$null = Connect-Pfa2Array