Jump to content

Recommended Posts

Guest /u/Boolog
Posted

I have a strange one.

 

While trying to run Get-BpaModel I'm running into:

 

[iCODE]Get-BpaModel : There has been an error while trying to set the process wide execution policy. (Inner Exception:[/iCODE]

 

[iCODE]Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a[/iCODE]

 

[iCODE]more specific scope. Due to the override, your shell will retain its current effective execution policy of[/iCODE]

 

[iCODE]Unrestricted. Type "Get-ExecutionPolicy -List" to view your execution policy settings. For more information please see[/iCODE]

 

[iCODE]"Get-Help Set-ExecutionPolicy".)[/iCODE]

 

[iCODE]At line:1 char:1[/iCODE]

 

[iCODE]+ Get-BpaModel[/iCODE]

 

[iCODE]+ ~~~~~~~~~~~~[/iCODE]

 

[iCODE]+ CategoryInfo : NotSpecified: (:) [Get-BpaModel], CommandLetException[/iCODE]

 

[iCODE]+ FullyQualifiedErrorId : SetExecutionPolicyError,Microsoft.BestPractices.Cmdlets.GetModelCommand[/iCODE]

 

The result of get-executionpolicy:

 

[iCODE]PS C:\Windows\system32> Get-ExecutionPolicy[/iCODE]

 

[iCODE]Unrestricted[/iCODE]

 

[iCODE]PS C:\Windows\system32> Get-ExecutionPolicy -list[/iCODE]

 

[iCODE]Scope ExecutionPolicy[/iCODE]

 

[iCODE]----- ---------------[/iCODE]

 

[iCODE]MachinePolicy Unrestricted[/iCODE]

 

[iCODE]UserPolicy Unrestricted[/iCODE]

 

[iCODE]Process RemoteSigned[/iCODE]

 

[iCODE]CurrentUser Bypass[/iCODE]

 

[iCODE]LocalMachine Unrestricted[/iCODE]

 

Running the same command with set-execution policy set:

 

P[iCODE]S C:\Windows\system32> Set-ExecutionPolicy Unrestricted | Get-BpaModel[/iCODE]

 

[iCODE]Execution Policy Change[/iCODE]

 

[iCODE]The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose[/iCODE]

 

[iCODE]you to the security risks described in the about_Execution_Policies help topic at[/iCODE]

 

[iCODE]http://go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?[/iCODE]

 

[iCODE][Y] Yes [A] Yes to All [N] No [L] No to All Suspend [?] Help (default is "N"): y[/iCODE]

 

[iCODE]Get-BpaModel : There has been an error while trying to set the process wide execution policy. (Inner Exception:[/iCODE]

 

[iCODE]Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a[/iCODE]

 

[iCODE]more specific scope. Due to the override, your shell will retain its current effective execution policy of[/iCODE]

 

[iCODE]Unrestricted. Type "Get-ExecutionPolicy -List" to view your execution policy settings. For more information please see[/iCODE]

 

[iCODE]"Get-Help Set-ExecutionPolicy".)[/iCODE]

 

[iCODE]At line:1 char:36[/iCODE]

 

[iCODE]+ Set-ExecutionPolicy Unrestricted | Get-BpaModel[/iCODE]

 

[iCODE]+ ~~~~~~~~~~~~[/iCODE]

 

[iCODE]+ CategoryInfo : NotSpecified: (:) [Get-BpaModel], CommandLetException[/iCODE]

 

[iCODE]+ FullyQualifiedErrorId : SetExecutionPolicyError,Microsoft.BestPractices.Cmdlets.GetModelCommand[/iCODE]

 

From the GPO:

 

[iCODE]Policy[/iCODE]

[iCODE]Setting[/iCODE]

[iCODE]Winning GPO[/iCODE]


[iCODE]Turn on Script Execution[/iCODE]

[iCODE]Enabled[/iCODE]

[iCODE]Default Domain Policy[/iCODE]


[iCODE]Execution Policy Allow all scripts[/iCODE]


 

Any ideas how to solve this?

 

submitted by /u/Boolog

[link] [comments]

 

Continue reading...

  • Replies 0
  • Created
  • Last Reply

Popular Days

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...