Hello,
I am using Jenkins 2.440.3.
one of the build script, I used powershell from windows batch file as:
powershell -File .\build.ps1 -BuildId %BUILD_ID% -PreviousTag %PREVIOUS_TAG% -NewTag %NEW_TAG%.
It used work. I change machine, the powershell policy changed.
the old machine
PS C:> Get-ExecutionPolicy -list
Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Unrestricted
LocalMachine Unrestricted
New machine policy
PS C:> Get-ExecutionPolicy -list
Scope ExecutionPolicy
----- ---------------
MachinePolicy AllSigned
UserPolicy Undefined
Process Undefined
CurrentUser RemoteSigned
LocalMachine RemoteSigned
So it did not work.
I can run the powershell locally.
But when I run in Jenkins, I got following error.
AuthorizationManager check failed.
+ CategoryInfo : SecurityError: ( , ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnauthorizedAccess
The new machine powershell policy cannot change cannot overwrite.
Has anyone saw this issue? resolved this issue?
Thanks,
Jean