I have the problem when I try to excecute file 3 (auth_test2.ps1), then I get the error-message (and the output):

AuthorizationManager check failed.
At C:\Users\systemCESCH\Documents\Workspace.\auth_test1.ps1:2 char:2
+ . <<<<  ($thisScript + '.\auth_test0.ps1')
    + CategoryInfo          : NotSpecified: (:) [], PSSecurityException
    + FullyQualifiedErrorId : RuntimeException

auth_test1
auth_test2

File 1 (auth_test0.ps1):

Write-Host "auth_test0"

File 2 (auth_test1.ps1):

$thisScript = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
. ($thisScript + '.\auth_test0.ps1')

Write-Host "auth_test1"

File 3 (auth_test2.ps1):

$thisScript = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
. ($thisScript + '.\auth_test1.ps1')

Write-Host "auth_test2"

The "ExecutionPolicy" is "RemoteSigned", "Unrestricted" makes no difference... I hope someone can help me solve the problem.

0

There are 0 best solutions below