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
- Remote into your TPF server.
- Open a PowerShell window as Administrator and run the following code:
-
$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
-
- You will prompted to enter the full path of your adaptable script (See example path below).
-
C:\Program Files\Venafi\Scripts\AdaptableWorkflow\Auto_Approve_Based_On_Deivce_Type.ps1
-
- 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.
- Next, open a PowerShell window as the TPF service account user using the "Run as a different user" option and run the following code:
-
$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
-
- You will prompted to enter the full path of your adaptable script.
- 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.
- Collect both files and upload them to the support case.
- Process complete.
Using Script
- Remote into your TPF server.
- Download the script attached at the bottom of this article and place it somewhere on your TPF server (adaptable-diag.ps1).
- Open a PowerShell window as Administrator and run the script.
-
PS C:\Users\shako1admin2\Desktop> .\adaptable-diag.ps1
-
- You will be prompted to enter the full path to your adaptable script (See example path below).
-
C:\Program Files\Venafi\Scripts\AdaptableWorkflow\Auto_Approve_Based_On_Deivce_Type.ps1
-
- 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.
- Entering 'Y' will prompt for credentials. Enter the TPF service account credential and click OK.
- 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.
- Process complete.