Forum Discussion
- cmautnerPuritanCan you post the error? You have to connect to the array first with new-pfaarray and use the object that is returned as input into subsequent SDK calls. So in your loop, connect to the array with new-pfaarray and send that return into a variable $objArray for example. Then use $objArray as input to the array parameter for New-pfanamedcertificatesigningrequest. For the sake of session management, you can add a disconnect before your next iteration of the loop.
- Cody_HostermanPuritanhow does it fail?
- Scott_Stockton
Novice I
I tested with just one and it just does this: - Scott_Stockton
Novice I
certificate_signing_request --------------------------- -----BEGIN CERTIFICATE REQUEST-----. - Scott_Stockton
Novice I
With no data. - Scott_Stockton
Novice I
Here is exactly what I typed: $myCredential = Get-Credential $array = "dna-pure-01" #Add all the Arrays Needed Import-Module PureStoragePowerShellSDK New-PfaArray -EndPoint $array -Credentials $myCredential -IgnoreCertificateError | New-PfaNamedCertificateSigningRequest -CertificateName management -CommonName http://dna-pure-01.polsinelli.law|dna-pure-01.polsinelli.law -Country US -Email mailto:storageadmin@polsinelli.com|storageadmin@polsinelli.com -Organization 'Polsinelli P.C.' -OrganizationalUnit Infrastructure -State KS -Locality Lenexa -Confirm - Cody_HostermanPuritanany chance it is a piping problem? i didnt think our SDK1 properly supported piping variables. but i feel like that would spit out a clear error...so maybe not.
- cmautnerPuritanSo that is not outputting a string, but rather an object…. so Assign your request to a variable, then use that property to display the full CSR string
- Scott_Stockton
Novice I
cmautner Wonderful, even better if I could out-file name.csr - cmautnerPuritanYou can, that’s a good idea
Related Content
- 3 years ago