<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic What is wrong with my Retirement script? in Network Security Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/network-security-discussions/what-is-wrong-with-my-retirement-script/m-p/1336767#M173</link>
    <description>I am attempting to write a script to do a mass retirement of certificates that are expired and no longer in use. For the sake of testing I am only doing the first path in the array. All of the VenafiPS commands work until I get to Invoke-VenafiCertificateAction to retire the first certificate in the array. It says thatA permissions error was encountered. Ensure both the permiUnfortunately the rest is cut off. I dont understand where the permissions issue is. I am a master admin and using my credentials. The API Application Integration is VenafiPS with all but Delete and Revoke permissions. The scope of the VenafiSession includes manage and discover for certificates. I am hoping someone with more experience with the API that myself might have a thought on this. My script is below.$creds = Get-Credential$VenafiSession = New-VenafiSession -Server 'https://venafi.company.com' -Verbose -Credential $creds -ClientId 'VenafiPS' -Scope @{'certificate'= 'manage,discover'} -PassThru$certPath = '\VED\Policy\Xpired_Revokd_Old Certs\Retired Certificates'$retFolder = Find-VenafiCertificate -Path $certPath -VenafiSession $VenafiSession$toRetire = @()#Extracts ONLY the full path to the certificate to be retired within the folder designated in $certPathforeach ( $retPath in $retFolder ){  $toRetire += $retPath.'Path'}echo $toRetire[0]Invoke-VenafiCertificateAction -VenafiSession $VenafiSession -CertificateID $toRetire[0] -Retire.</description>
    <pubDate>Wed, 18 Jan 2023 20:06:10 GMT</pubDate>
    <dc:creator>dghort</dc:creator>
    <dc:date>2023-01-18T20:06:10Z</dc:date>
    <item>
      <title>What is wrong with my Retirement script?</title>
      <link>https://live.paloaltonetworks.com/t5/network-security-discussions/what-is-wrong-with-my-retirement-script/m-p/1336767#M173</link>
      <description>I am attempting to write a script to do a mass retirement of certificates that are expired and no longer in use. For the sake of testing I am only doing the first path in the array. All of the VenafiPS commands work until I get to Invoke-VenafiCertificateAction to retire the first certificate in the array. It says thatA permissions error was encountered. Ensure both the permiUnfortunately the rest is cut off. I dont understand where the permissions issue is. I am a master admin and using my credentials. The API Application Integration is VenafiPS with all but Delete and Revoke permissions. The scope of the VenafiSession includes manage and discover for certificates. I am hoping someone with more experience with the API that myself might have a thought on this. My script is below.$creds = Get-Credential$VenafiSession = New-VenafiSession -Server 'https://venafi.company.com' -Verbose -Credential $creds -ClientId 'VenafiPS' -Scope @{'certificate'= 'manage,discover'} -PassThru$certPath = '\VED\Policy\Xpired_Revokd_Old Certs\Retired Certificates'$retFolder = Find-VenafiCertificate -Path $certPath -VenafiSession $VenafiSession$toRetire = @()#Extracts ONLY the full path to the certificate to be retired within the folder designated in $certPathforeach ( $retPath in $retFolder ){  $toRetire += $retPath.'Path'}echo $toRetire[0]Invoke-VenafiCertificateAction -VenafiSession $VenafiSession -CertificateID $toRetire[0] -Retire.</description>
      <pubDate>Wed, 18 Jan 2023 20:06:10 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/network-security-discussions/what-is-wrong-with-my-retirement-script/m-p/1336767#M173</guid>
      <dc:creator>dghort</dc:creator>
      <dc:date>2023-01-18T20:06:10Z</dc:date>
    </item>
  </channel>
</rss>

