janos_pesti
3 years agoNovice I
good morning, codyhosterman I used the PureStorage.Pure1
good morning, codyhosterman I used the PureStorage.Pure1 module to get load metrics from Pure1, which worked fine yesterday. But when I run the same script with same cert, etc, I get the message JWT expired.
How can I make this authentication process work so if I run it once every hour, I can get authenticated properly?
```$mypwd = "xxxx"
$CertObj = Get-PfxCertificate -FilePath C:\Stash\PowerShell-Projects\Pure1\mypfx.pfx -Password $mypwd
$pure1_appid = "pure1OSWa2R7FOwejvETD"
$PureOneConn = New-PureOneRestConnection -certificate $CertObj -pureAppID $pure1_appid```
reply: `Exception: The Pure1 Organization with ID 1001 is already connected.`
```$PureOneArrays = Get-PureOneArray -arrayProduct FlashArray
Invoke-RestMethod: {"message":"JWT is expired"}```