Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Right click and "Run with PowerShell" Evasive Error

$
0
0

Hi, I create scripts for others to use.  They do not know powershell, but can right click and run.  It's hard to support a script if the user can't see the error long enough to read it.  It's also hard for me to support the script because I have also been unable to see or log the error myself, no matter what I try.  I can guess that it's a policy or elevation issue, but I need a way to know for sure. 

I get the error when I right-click and run with powershell.  I thought, no problem.  I'll run it in an ISE or command window to get and see the error.  Problem is, it runs fine no matter how else I run it.  I also added the sendto item as described in the following link.  The script runs without error. 

http://social.technet.microsoft.com/Forums/windowsserver/en-US/cfb64674-240b-4fb7-b9ed-143f408a7e00/run-with-powershell?forum=winserverpowershell

I tried to grab the error message with FullShot, but the timing just does not work.  It's driving me crazy. 

I looked at the eventlogs.  There are events 40961 and 40962 for the console, but nothing obvious to me.  I do notice a CAPI2 event 81 for powershell. 

Log Name:      Microsoft-Windows-CAPI2/Operational
Source:        Microsoft-Windows-CAPI2
Date:          2/11/2014 12:51:46 PM
Event ID:      81
Task Category: Verify Trust
Level:         Error
Keywords:      Trust Verification

<UserData>
    <WinVerifyTrust>
      <ActionID>{00AAC56B-CD44-11D0-8CC2-00C04FC295EE}</ActionID>
      <UIChoice value="2">WTD_UI_NONE</UIChoice>
      <RevocationCheck value="0" />
      <StateAction value="0">WTD_STATEACTION_IGNORE</StateAction>
      <Flags value="80000100" WTD_SAFER_FLAG="true" CPD_USE_NT5_CHAIN_FLAG="true" />
      <FileInfo filePath="C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1" hasFileHandle="true" />
      <DigestInfo digestAlgorithm="" digest="" />
      <RegPolicySetting value="23C00" WTPF_OFFLINEOK_IND="true" WTPF_OFFLINEOK_COM="true" WTPF_OFFLINEOKNBU_IND="true" WTPF_OFFLINEOKNBU_COM="true" WTPF_IGNOREREVOCATIONONTS="true" />
      <StepError stepID="3" stepName="TRUSTERROR_STEP_SIP">
        <Result value="57">The parameter is incorrect.</Result>
      </StepError>
      <StepError stepID="9" stepName="TRUSTERROR_STEP_MSG_SIGNERCOUNT">
        <Result value="57">The parameter is incorrect.</Result>
      </StepError>
      <StepError stepID="32" stepName="TRUSTERROR_STEP_FINAL_OBJPROV">
        <Result value="800B0003">The form specified for the subject is not one supported or known by the specified trust provider.</Result>
      </StepError>
      <StepError stepID="33" stepName="TRUSTERROR_STEP_FINAL_SIGPROV">
        <Result value="800B0100">No signature was present in the subject.</Result>
      </StepError>
      <StepError stepID="34" stepName="TRUSTERROR_STEP_FINAL_CERTPROV">
        <Result value="800B0100">No signature was present in the subject.</Result>
      </StepError>
      <EventAuxInfo ProcessName="powershell.exe" />
      <CorrelationAuxInfo TaskId="{3B47B6AD-542A-4B0E-AAD6-CD74EA298B9E}" SeqNumber="2" />
      <Result value="800B0100">No signature was present in the subject.</Result>
    </WinVerifyTrust>
  </UserData>

Is there any way to get the right-click "run with powershell" error text? 

If I sign the script, would this avoid the issues I'm having with right-click and run with powershell? 

Thanks


Randy in Marin


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>