How To: Gather diagnostic info for TPF adaptable script files

How To: Gather diagnostic info for TPF adaptable script files

85
Created On 11/10/26 10:59 AM - Last Modified 11/10/26 13:00 PM


Objective


This article covers how to collect diagnostic information for Adaptable script files on your Trust Protection Foundation server using built-in PowerShell cmdlets.



Environment


24.3;25.1;25.3;26.1 TPP/TLSPDC TLSPDC

Procedure


* If you are able to download and run a PS1 script on your server, use the steps in the section titled 'Using Script' for a scripted method, otherwise use the 'Manual Commands' section.

 

Manual Commands

  1. Remote into your TPF server.
  2. Open a PowerShell window as Administrator and run the following code:
    1. $adaptable_script_path = Read-Host "What is the full path of your adaptable script?"
      
      # Check Alternate Data Streams
      Write-Host "Current user is: $(whoami)"
      Write-Host "---Check Alternate Data Streams---" -ForegroundColor Green
      Get-Item $adaptable_script_path -Stream *
      
      # Check File Attributes
      Write-Host "---Check File Attributes---" -ForegroundColor Green
      Get-ItemProperty $adaptable_script_path | Select-Object Attributes
      
      # Check Security Zones (without opening file)
      Write-Host "---Check Security Zones (without opening file)---" -ForegroundColor Green
      Get-Content $adaptable_script_path -Stream Zone.Identifier -ErrorAction SilentlyContinue
      
      # PowerShell Execution Policy Check:
      Write-Host "---PowerShell Execution Policy Check---" -ForegroundColor Green
      Get-ExecutionPolicy -List
      Get-ExecutionPolicy -Scope CurrentUser
      
      # This should work even if file is blocked from execution
      Write-Host "---Return first five lines of the file---" -ForegroundColor Green
      Get-Content $adaptable_script_path -TotalCount 5
  3. You will prompted to enter the full path of your adaptable script (See example path below).
    1. C:\Program Files\Venafi\Scripts\AdaptableWorkflow\Auto_Approve_Based_On_Deivce_Type.ps1
  4. Once the script has completed, highlight all the text in the PowerShell window, save it to a text file and save it off to the side.
  5. Next, open a PowerShell window as the TPF service account user using the "Run as a different user" option and run the following code:
    1. $adaptable_script_path = Read-Host "What is the full path of your adaptable script?"
      Write-Host "Current user is: $(whoami)"
      
      Write-Host "---Testing Path---" -ForegroundColor Green
      Test-Path $adaptable_script_path
      
      Write-Host "--- Getting ACL---" -ForegroundColor Green
      Get-Acl $adaptable_script_path | Format-List
  6. You will prompted to enter the full path of your adaptable script.
  7. Once the script has completed, highlight all the text in the PowerShell window, save it to a text file and save it off to the side.
  8. Collect both files and upload them to the support case.
  9. Process complete.

 

Using Script

  1. Remote into your TPF server.
  2. Download the script attached at the bottom of this article and place it somewhere on your TPF server (adaptable-diag.ps1).
  3. Open a PowerShell window as Administrator and run the script.
    1. PS C:\Users\shako1admin2\Desktop> .\adaptable-diag.ps1
  4. You will be prompted to enter the full path to your adaptable script (See example path below).
    1. C:\Program Files\Venafi\Scripts\AdaptableWorkflow\Auto_Approve_Based_On_Deivce_Type.ps1
  5. The script will halt at step two which tests the TPF service account accessibility. Enter 'Y' to test the service account and 'N' to skip step two.
  6. Entering 'Y' will prompt for credentials. Enter the TPF service account credential and click OK.
  7. Once the script has completed, highlight all the text in the PowerShell window, save it to a text file and upload it to the support case.
  8. Process complete.


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000000uwnCAA&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail