Is it Possible to Use Output of Powershell Script in Custom Field?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

Is it Possible to Use Output of Powershell Script in Custom Field?

L3 Networker
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}.
0 REPLIES 0
  • 64 Views
  • 0 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!