- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
06-09-2023 03:40 AM
AppProvider version: 13.0.0.6
PVWA version: 13.0.0.13
Vault version: 12.6.0.21
Problem:
Try to get a secret via the CP CLI Application Password SDK.
The CLI SDK is called via Powershell.
The script is launched from a scheduled task in Windows Task Scheduler.
The Application's authentication is Hash authentication.
Even if the powershell.exe is added to the TrustedCLIShells in the CP config, the log says "APPAP309E Script run using untrusted shell"
06-09-2023 03:40 AM
Solution:
Add the "C:\Windows\System32\svchost.exe" to the TrustedCLIShells in the CP config additionally to the powershell.exe.
Add the Hash of the powershell script to the Application in PVWA.
Explanation:
The powershell.exe application is started from the svchost.exe within the Windows process tree.
This can be verified with the Sysmon tool (https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon)
You'll find the following output (truncated for readability:)
ParentImage: C:\Windows\System32\svchost.exe
ParentCommandLine: C:\WINDOWS\system32\svchost.exe -k netsvcs -p -s Schedule
ParentUser: NT-AUTORITÄT\SYSTEM
06-09-2023 03:40 AM
Solution:
Add the "C:\Windows\System32\svchost.exe" to the TrustedCLIShells in the CP config additionally to the powershell.exe.
Add the Hash of the powershell script to the Application in PVWA.
Explanation:
The powershell.exe application is started from the svchost.exe within the Windows process tree.
This can be verified with the Sysmon tool (https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon)
You'll find the following output (truncated for readability:)
ParentImage: C:\Windows\System32\svchost.exe
ParentCommandLine: C:\WINDOWS\system32\svchost.exe -k netsvcs -p -s Schedule
ParentUser: NT-AUTORITÄT\SYSTEM
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!

