<?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 Is it Possible to Use Output of Powershell Script in Custom Field? in Network Security Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/network-security-discussions/is-it-possible-to-use-output-of-powershell-script-in-custom/m-p/1336626#M149</link>
    <description>I am using Venafi PS and was successful at getting the hostname field of all consumers of a certificate. I am trying to see if there is anyway to get the output of that into a custom field. It would be a simple way for us to view what hosts are using a certificate in the certificate inventory view without having to dig into the devices. Just attached the script for reference. I know this ultimately returns an object array, but converting to a string requires little effort.Import-Module VenafiPS$creds = Get-Credential$scope = @{'certificate'='manage,discover,approve';'configuration'='manage';'security'='manage'}$VenafiSession = New-VenafiSession -Server 'https://tpp.domain.com' -Credential $creds -ClientId 'VenafiPS' -Scope $scope -PassThru$cert = Get-VdcCertificate -ID 9baaca5d-3811-4141-a6fa-922de7864135$consumer = $cert.Consumers | Get-VdcObject$consumerPath = $consumer.ParentPath$consumerHost = @()foreach ($path in $consumerPath){  $consumerAttr = Get-VdcAttribute -Path $path -Attribute "Host"  $consumerHost += $consumerAttr.Host}.</description>
    <pubDate>Tue, 12 Mar 2024 15:02:57 GMT</pubDate>
    <dc:creator>dghort</dc:creator>
    <dc:date>2024-03-12T15:02:57Z</dc:date>
    <item>
      <title>Is it Possible to Use Output of Powershell Script in Custom Field?</title>
      <link>https://live.paloaltonetworks.com/t5/network-security-discussions/is-it-possible-to-use-output-of-powershell-script-in-custom/m-p/1336626#M149</link>
      <description>I am using Venafi PS and was successful at getting the hostname field of all consumers of a certificate. I am trying to see if there is anyway to get the output of that into a custom field. It would be a simple way for us to view what hosts are using a certificate in the certificate inventory view without having to dig into the devices. Just attached the script for reference. I know this ultimately returns an object array, but converting to a string requires little effort.Import-Module VenafiPS$creds = Get-Credential$scope = @{'certificate'='manage,discover,approve';'configuration'='manage';'security'='manage'}$VenafiSession = New-VenafiSession -Server 'https://tpp.domain.com' -Credential $creds -ClientId 'VenafiPS' -Scope $scope -PassThru$cert = Get-VdcCertificate -ID 9baaca5d-3811-4141-a6fa-922de7864135$consumer = $cert.Consumers | Get-VdcObject$consumerPath = $consumer.ParentPath$consumerHost = @()foreach ($path in $consumerPath){  $consumerAttr = Get-VdcAttribute -Path $path -Attribute "Host"  $consumerHost += $consumerAttr.Host}.</description>
      <pubDate>Tue, 12 Mar 2024 15:02:57 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/network-security-discussions/is-it-possible-to-use-output-of-powershell-script-in-custom/m-p/1336626#M149</guid>
      <dc:creator>dghort</dc:creator>
      <dc:date>2024-03-12T15:02:57Z</dc:date>
    </item>
  </channel>
</rss>

